alpacahq/alpaca-backtrader-api

Replay with historical data only retrieve daily bars instead replaying every minute

AravindaDP opened this issue · 0 comments

Not sure if it is an issue in this package, or bug in back trader core logic. When following setup is used, It requests only fully formed daily bars from backend.

data0 = DataFactory(dataname=symbol,
                            historical=True,
                            fromdate=datetime.now()-timedelta(days=5),
                            todate=datetime.now()-timedelta(days=1),
                            timeframe=bt.TimeFrame.Minutes,
                            data_feed='iex')

cerebro.replaydata(data0, timeframe=bt.TimeFrame.Days, compression=1)

This issue does not occur on streaming data though (Tested without backfill)