Walk Forward Optimization

<< Click to Display Table of Contents >>

Navigation:  Operations > Strategy Analyzer >

Walk Forward Optimization

Previous page Return to chapter overview Next page

Show/Hide Hidden Text

Walk Forward optimization is the process by which 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:

 

Access to historical data

Custom NinjaScript *strategy

A thorough understanding of the Strategy Analyzer's backtesting and optimization capabilities

 

Tip:  There are several pre-defined sample strategies that are installed with NinjaTrader that you can explore.

 

 

playVideo

 

Note: The IncludeTradeHistoryInBacktest property is set to false by default when a strategy is applied in the Strategy Analyzer for optimization. This provides for leaner memory usage, but at the expense of not being able to access Trade objects for historical trades. Thus, fields such as SystemPerformance.AllTrades.Count that rely on references to Trade objects will not have any such references to work with. If you would like to save these objects for reference in your code, you can set IncludeTradeHistoryInBacktest to true in the Configure state. For more information, see the Working with Historical Trade Data page.

 

tog_minus        How to run a Walk Forward Optimization 

tog_minus        Understanding Walk Forward properties

tog_minus        Understanding Walk Forward results