Walk forward optimization is the process by where you optimize strategy input parameters on a historical segment of market data, then test the strategy forward in time on data following the optimization segment using the optimized input values. The central idea is that you evaluate strategy performance data on the test data, not the data used in the optimization. This process is then repeated by moving the optimization and test segments forward in time. To run a walk forward optimization you will need:
*There are several pre-defined sample strategies that are installed with NinjaTrader that you can explore.
Start a Walk Forward Optimization
Select either an instrument or an instrument list (to basket test the entire list of instruments) and via the right mouse button click context menu, select the sub-menu "Walk Forward...". Alternatively, you can press the "w" icon from the tool bar or press the short cut key combination Ctrl-W.
The "Walk Forward Optimization" properties dialog window will appear. Select the strategy you would like to walk forward optimize and set your parameters. Apart from the walk forward optimization specific properties described below, the properties are identical to the ones found in the Optimizer dialog window.
1. Optimization period (days) - Sets the number of days used for the "in sample" optimization data set
2. Test period (days) - Sets the number of days used for the "out of sample" real back test using the optimized input values generated from the "in sample" period