I have a little snippet of code for each of my strategy to start trading from 1 day before rollover until 1 day before the next rollover.
This is too make sure I do not enter a trade too close to rollover time.
Having this rule is causing differences in my back testing. Because the backtest seems to only trade the live contact on the rollover date.
When testing a specific contact my back test contain one day less of trade than market replay.
Eg : CL 01-17.
Market replay from 16-01-2017 to 15-02-2017: Trades between: 17-01-2017 and 13-02-2017
Back test from 16-01-2017 to 15-02-2017: Trades between : 19-01-2017 and 13-02-2017
Using market replay is fine but takes time.
Is their a snippet of code or a setting that I could use to disable the auto roll over in back test? (changing the rollover date wouldn't be good solution as it would then screw my market replay)
Cheers,
Chris
Comment