INNER CODE UNIT · Python

inplace

WISEPLAT/Learn-BackTrader · main.py:106

                  inplace=True)  # Чтобы получить дату/время переименовываем колонки
    data.index = pd.to_datetime(data['datetime'])
    print(data)

    cerebro = bt.Cerebro()

    # Add a strategy
    cerebro.addstrategy(TestStrategy)

    cerebro.broker.setcash(100000.0)

    # Set the commission - 0.1% ... divide by 100 to remove the %
    cerebro.broker.setcommission(commission=0.001)

    # modpath = os.path.dirname(os.path.abspath(sys.argv[0]))
    # datapath = os.path.join(modpath, 'GAZP.ME (1).csv')
    # Create a Data Feed
    # data = bt.feeds.YahooFinanceCSVData(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…