From the December/January 2013 issue of Futures Magazine • Subscribe!

How to set profit targets and control losses

Walk-forward analysis

If a system is backtested across an entire historical data series, the results of such tests will indicate only how the system would have fared had it been operational during the time period covered by the historical data. The results tell us nothing about how the system will fare going forward in real time.

One way to address this limitation is walk-forward analysis and optimization, popularized within the trading community by Robert Pardo. With this approach, the historical data are broken up into smaller periods of time. The system then can be backtested and optimized against just a portion of data, called the in-sample data. After the system parameters have been optimized, it then can be tested on the portion of the data that immediately follows, or the out-of-sample data.

The out-of-sample data period usually is a percentage of the in-sample data period. The results of the out-of-sample tests are recorded. The process then is repeated by “sliding forward” the in-sample data period and then re-optimizing the parameters. The amount by which the in-sample data is slid forward is equal to the length of the initial out-of-sample data period (see “Walk-forward testing,” below).

In the chart, the in-sample data period is six months and the out-of-sample data period is two months. The first optimization is run on the data from January through June. The test is run on the data from July through August. The out-of-sample results are recorded. The in-sample data period then slides forward by two months. A new optimization is run and the parameters are re-set accordingly. Another out-of-sample test is run September through October.

This walk forward through the data removes some of the limitations of basic backtesting. Profitable results from this method of testing should provide a higher level of confidence in the system when traded in real time in a live account.

<< Page 2 of 5 >>
comments powered by Disqus
Check out Futures Magazine - Polls on LockerDome on LockerDome