ReplayData not working
Ravi Vidap last edited by
cerebro.adddata(data) is working in below code, but when I replace that call with cerebro.replaydata(data,timeframe=bt.TimeFrame.Days,compression=1)
Its not working, no errors also.
stockkwargs = dict(
historical=True, # only historical download
fromdate=datetime.datetime(2020, 9, 1), # get data from..
todate=datetime.datetime(2020, 9, 3) # get data from..
cerebro = bt.Cerebro(stdstats=False)
store = bt.stores.IBStore(port=7496)
data = store.getdata(dataname='TCS-STK-NSE-INR',**stockkwargs)
vladisld last edited by
Could be the same behavior as the one reported in the following post:
It seems the IB store was designed with live trading in mind. The capability of loading the historical data was added as a mean for backfilling the historical data during live trading . So in this regard it less suitable for pure backtesting scenario.
Am I wrong ? Anyone having a different experience ?