I noticed that the walk-forward test window results includes trades that happened during the optimization window. This seems to be a serious bug that is introducing a look-ahead bias and inflating walk-forward performance results. This happens for different lengths of optimization and WF test windows. Heres an example -
I collected trades from the Optimization tab (window 6/27-6/30) and from the Walk-Forward tab (test window 7/1-7/1).
- 30% of trades in the Test Window are from 6/30 and these are the more profitable trades - if i exclude these, the trades from 7/1 walk-forward run are collectively unprofitable. The performance reported includes these 30% trades that were conducted during the Optimization window.
- Another strange thing is that the Optimization window also has 20% of its trades on 7/1 (after the window). I'm attaching my spreadsheet with the trades (WF trades and Opt trades tabs), so you can see examples of such trades.
This is confirmed by the fact that my Walk-forward performance on Sunday/Monday is the worst because the markets are closed on Saturday and there are no "biased" trades in the Optimization window to inflate the results on Sunday/Monday.
Question - How do i run a WFO where the Optimization window and Walk-forward window don't overlap and trades are on distinctly separate dates or time periods?

Comment