I would like to get some best practice guidance on doing backtest on Emini futures. If there is a pointer to an existing thread and if you could point that would be grateful.
Currently using historical data from IB for my backtest, hence using data0 as ES-FUT-GLOBEX-USD-201903 for the March Emini futures. Using fromdate as 2018-12-13 todate as 2019-03-13. This works fine.
When I run this on 2018 June futures and use the following params
--data0 ES-FUT-GLOBEX-USD-201806 --fromdate 2018-03-13 --todate 2018-06-14 I get the following error:
File "C:\ProgramData\Anaconda3\lib\site-packages\backtrader\indicators\basicops.py", line 364, in once
dst[i] = math.fsum(src[i - period + 1:i + 1]) / period
IndexError: array assignment index out of range
So is this a data provider issue and if there is a best practice to do symbols which have rollover constraints.
Thanks for your time.