Categories
Forex System Design

Introduction to Walk-Forward Analysis – Part 1

Introduction

Once completed the optimization process of a trading system, the developer could develop an advanced strategy optimization method, the walk-forward analysis. In this educational article, we will introduce the basic concepts of this methodology.

What is Walk-Forward Analysis?

The Walk-Forward Analysis (WFA) is an advanced method for testing, validating, and optimizing a trading strategy, by measuring its performance using out-of-sample results. The WFA attempts to achieve the three objectives identified as follows.

600x600
  1. Determine if the trading strategy continues being profitable using unseen or out-of-sample price history.
  2. Find out the optimal values of the parameters to be used in real-time trading.
  3. Delimit the optimization window size and the period at which the system should be reoptimized.

Measuring the Robustness of a Trading System

A robust trading system is profitable, even when the actual market conditions change. These profits tend to be consistent, with the results obtained in the historical simulation stage. In other words, a walk-forward analysis allows the system’s developer to determine if the trading strategy can produce real-time profits.

The system’s developer is able to compute the robustness of a trading strategy using a statistical criterion called Walk-Forward Efficiency (WFE) ratio, which measures the current optimization process’s quality.

The WFE ratio is computed by the out-of-sample annualized rates of return divided by the in-sample returns. A robust trading strategy should achieve reliable performance, both in-sample and out-of-sample data. A 100% ratio would indicate that the out-of-sample figures match exactly the returns obtained with the backtests. That would indicate the system is sound and reliable.  Pardo, in his book The Evaluation and Optimization of Trading Strategies, comments that “robust trading strategies have WFEs greater than 50 or 60 percent and in the case of extremely robust strategies, even higher.”  A WFE ratio below 50% would indicate poor performance. Finally, ratios over 100% are suspicious, and the system should be analyzed to discover the reason for this behavior.

WFA and Overfitting

Overfitting is a condition resulting from an excessive readjustment of the strategy’s parameters aimed at artificially improve its performance. An overfitted strategy is likely to lose money in real-time trading, even when a historical simulation would present terrific gains.

By its nature, a walk-forward analysis is a cure for overfitting abuse. This edge comes from the fact that the WFA evaluates the strategy’s performance using data not belonging to the optimization process.

By using WFA, the developer is certain about the robustness of a trading strategy. In other words, a not too robust trading strategy would not pass a walk-forward analysis.

Considering that a large number of samples increase the statistical validity and confidence, it is unlikely that an unprofitable trading strategy would make significant profits using a large number of samples. Consequently, a poor trading strategy delivering gains could be the product of chance.

Conclusions

The Walk-Forward Analysis (WFA) is a powerful tool for testing, validating, and measure the quality of a trading strategy, which is characterized by the use of out-of-sample data to evaluate its performance. In this educational article, we have presented the advantages of using WFA to evaluate the strategy’s robustness and how WFA can help the developer avoid overfitting, increasing confidence through an objective statistical measure.

In the next educational post, we will continue reviewing the benefits of using the walk-forward analysis and setting up the walk-forward analysis.

Suggested Readings

  • Jaekle, U., Tomasini, E.; Trading Systems: A New Approach to System Development and Portfolio Optimisation; Harriman House Ltd.; 1st Edition (2009).
  • Pardo, R.; The Evaluation and Optimization of Trading Strategies; John Wiley & Sons; 2nd Edition (2008).
970x250

By Eduardo Vargas

Eduardo Vargas is a technical analyst and independent trader based in Buenos Aires, Argentina. He is an Industrial Engineer and holds a Master in Finance degree. In 2008 began to trade Chilean stocks listed on IPSA. From 2013 started to trade CFDs on Forex, Commodities, Indices and ETFs markets. He analyses different markets combining the Elliott Wave analysis with Fibonacci tools. He provides a market mid-long-term vision.

Leave a Reply

Your email address will not be published. Required fields are marked *