Walk forward explained

walk forward

You must have hear a lot about this new wonder new method of optimization called Walk Forward analysis. It is regarded as a holy grail among EA traders. Well, it;s not exactly a holy grail but for sure it deserves out attention because it tells us a lot about robustness, more than any method does. Suppose you have a system and you optimize it from 2000 to 2013 with great results. But past performances is not a guarantee for future performance, nothing guarantees you that the market is not going to change and never looks like it used to. What guarantees do you have that the future changes won’t will your profitable system? It happened before. And for sure it will happen again. Walk Forward is nothing but a stress test that shows the robustness of the system and avoids curve fitting.

Step 1: Optimize the system for a given period of time, let’s say 8 months and choose the best performing parameters.

Step 2: Backtest the system for 2 months, starting date is the end of optimization period. Expert recommend that the backtest period should not exceed 25% of optimization period, therefore I’m going to perform the backtest for 2 months starting with the end of 8 months optimization period.

Step 3: Write down the result and start from step 1, but this time the optimization period is shifted forward with 2 months, like in the following picture:

walk forward analysis

Walk forward analysis

After many rounds of optimization we compare the average daily profit of optimization periods with average daily profit of forward backtest period. This calculation is called Walk Forward Efficiency Ratio (WFER).  If WFER is greater than 0.5 then the system, is profitable and the strategy is sound and very robust. If WFER is negative or less than 0.5, then the system will probably fail on the long run and is probably curve fitted.

So far, so good but that is mean that old way of optimization over a long period of time is wrong? And if a system does not pas WFA is it necessary bad?  Not exactly. If a system that obeys all long term profitability rules  is optimized over a long period of time, let’s say 14 years and it survives with good results than it should be a good system because it survived to all past market conditions and because the history tend to repeat itself there are good chances that it will survive in the future. Please note I’m talking about survival, not great profits here!
WFA just tests the system’s ability to chase the market, its speed of reaction.

So, what’s the recipe to create a good trading system? There is no such thing, trading is more of an art than an exact science, it’s all about statistics not certitudes. Get used to it and learn how to accept your loses without trying to get revenge on the market. This is the first step to profitability 🙂

I hope you enjoyed reading this!