Walk Forward Analysis (WFA) is considered by many seasoned traders to be the gold standard methodology for back testing and optimizing algorithmic trading systems. However, some less experienced traders who are new to WFA, can struggle to use the technique effectively and then sadly, revert to less robust methodologies.
From our own experience we will explain why that doesn’t have to be the case, and if done properly, WFA can completely transform a trading system that has lost its edge in the market.
This article is a case study of why Trade Like A Machine turned to using Walk Forward Analysis and why. It covers our experience of it, what it has taught us, and how we have now put the effort into making the software we developed commercially available to other traders.
The article covers why we believe Walk Forward Analysis to be the very best way of back testing and optimizing trading strategies - if undertaken using a best practice, scientific approach.
Why we started to use Walk Forward Analysis (WFA)
Back in 2014 we started trading a new long/short system based on overbought / oversold price action within a trending market. The system performed exceptionally well up until the end of 2015 with an overall risk adjusted return of 57.2% for the 16 month period as shown in our equity curve below (return risk adjusted to 20% VaR, or Value at Risk).
All results in this article are from our real money, live Darwinex trading account, and returns are adjusted on a 20% VaR (Value at Risk) basis. All results can be independently verified here.
However, following December 2015 things started to take a turn for the worse. It wasn't even a gradual change - it was as if someone had flicked a switch. All of a sudden the trading system that had seemed to be fully in tune with the market, now appeared to be out of tune with it. Our system hadn't changed, but the market had. What had previously been a great system, appeared to have lost its edge completely, as you can see from the chart below.
...things started to take a turn for the worse. It wasn't even a gradual change - it was as if someone had flicked a switch.
By the way, the large equity spike in the middle of this new region (highlighted by the red ellipse) was simply because we got lucky and happened to be on the right side of a price spike during Brexit (we understand we were lucky and we could equally have been on the wrong side of the move - we have learnt our lesson!). However, if you try to ignore the spike, you’ll see that the equity curve is otherwise moving steadily downwards. The chart below with the equity spike artificially removed shows how the equity curve otherwise was only ever really going south!
Early on in the decline, of course, we thought this was just a normal equity drawdown. Then it quickly became our maximum drawdown. Ok, so every system needs a max drawdown, right? But unfortunately, it just kept going. By about March we knew something was seriously wrong. We started researching better ways to optimize our system to keep it in tune with changing market dynamics and changing market personality. The subject that kept on coming up in our research was walk forward analysis. Despite trying it once, we'd always been put off from using WFA because of the time involved and because, (being honest) we just didn't really understand it that well. However, the more we read, the more we knew we needed to invest the time to properly research it, and to actually try using it in earnest.
We started researching better ways to optimize our system to keep it in tune with changing market dynamics and changing market personality. The subject that kept on coming up in our research was walk forward analysis.
The indications from the results of our initial research were that this could indeed make some really impressive improvements to our systems and most importantly keep them in tune with changing market conditions. After researching the market for software to help us with this, we found a huge gap. Either software did not support the trading platforms we needed (MetaTrader MT4 and MT5), or they simply didn't perform WFA in a way that we considered best practice. Many of the platforms for example, in our opinion used functionality that actually 'encouraged' the user to over-optimize or curve fit their strategy – resulting in really great looking back tests but dreadful results in walk-forward real-time live trading.
At Trade Like A Machine, we have no interest whatsoever in producing great looking back tests! We only have an interest in improving our live account equity charts. We therefore, after much deliberation decided to build our own application to automate the whole WFA process and to do it the way we knew it needed to be done – using statistically sound, best practice.
After much effort to build the application and then to fine tune it while optimizing and back testing our own systems, we were finally ready to replace our old trading system parameters (that we’d used since way back in 2014), with our new system parameters informed by walk forward analysis.
The results were everything we had hoped for. The new parameters seemed to be working in the current market and finally after over 10 months of decline, our equity curve started to rise again.
Best Practice MT4 and MT5 EA Optimization Software Walk Forward Pro
Amongst many other features, Walk Forward Pro calculates the statistical significance of both in-sample and out-of-sample phases for you automatically.
Walk Forward Pro helps the user improve the predictive power.of optimizations, leading to more robust systems.Read More
Since then we have re-optimized a couple more times to continue to keep the system in tune with the market and so far all is going well (see below)
So that's our story of WFA. As you can understand, we are absolute converts to merits of this approach, and we would encourage anyone who is currently considering it to put in the effort to make it work for them. We are sure you will not regret it. There is a caveat however – We also know that WFA only works if undertaken using a scientifically based, best practice methodology. If you don’t fully understand what you are doing, you can choose WFA settings that will not give you the results in live trading that you expect.
For any MT4 or MT5 users out there who are interested in pursuing walk forward analysis, you might want to consider our product, Walk Forward Pro, to help you. We have tried our best to produce a product that makes walk forward analysis a quick and easy process. We have also endeavoured to build best-practice into the product itself. So even if you are a beginner to back testing in this way, you can still benefit from it without being an expert in statistics and WFA.