Are Backtesting and Forward Testing a Key to Building a Profitable System?

In the previous article, we discussed the importance of backtesting trading strategies, but this is only half of a story. We now know that backtesting is essential for learning how your trading system would have behaved in the past, but it’s equally important to know how it would perform in the present.

You can check it with the help of out-of-sample trading or, like most traders call it, paper trading or forward testing.

It’s a simulation of a trading situation reflecting the most accurately the way an optimized trading system could be used in real sessions. To put in simple words, forward testing is one of the backtesting stages.

Still, there’s one thing to bear in mind.

Even though both backtesting and forward testing will provide you some insight about your strategy, there’s no such a test that is able to tell how exactly a trading system would behave during live trading.

Most traders think that more testing won’t make the strategy better, however, you can establish a level of confidence that covers risking real cash.

Backtesting VS Forward Testing

When optimizing backtesting results, there’s always a chance of overfitting strategy parameters. You may tweak it hand and foot until the settings lead to buy and sell just the right time, but the point is that such settings may fail to predict price movements.

With forward testing, traders are able to see the true value of the idea since any overfitting will be easily detected.   

So what is it in forward testing that makes it part and parcel of strategy evaluating?

The answer is live data.

This can aid in tackling some deployment issues you wouldn’t have found out if stayed on backtesting stage.

Why Need Forward Testing

There are things in backtesting trading that cannot be forecasted in live trading conditions. Here you can see several reasons (or there can be more) pointing you’d need to test your trading system as close to real trading environment as possible:

  • you may sleep away the moment when good setups occur;
  • live charts and backtesting charts may be widely different;
  • profitability may be affected by spread and swap difference;
  • your trading behavior may be different when real money is in the game;

These by far not all the reasons, but enough for making up your mind to carry out forward testing, don’t you think so?

Still, one cannot simply leapfrog to forward testing. You should not ignore these 3 important things before you decide to move on to out-of-sample trading:

  1. You’d need to have a rule-based trading method;
  2. Be sure to backtest your trading system on the currency pair and a necessary timeframe at least 3 times;
  3. Check if the backtesting results are stable and satisfying.

So, if the optimization of the trading system shows improved results, it’s time to move on to the final testing stage (…you guessed right) – the forward testing.

Forward testing evaluates the trading system’s performance solely on the basis of post-optimization trading or testing on the data that are not included in the optimization sample.

This level of testing gives clear and useful insights into 3 primary questions:

  1. Will the trading model be profitable after optimization?
  2. What will be the level of profitability after optimization?
  3. How will market volatility and liquidity affect trading results?

You have to face the fact that sometimes after the brilliant performance a backtesting shows, forward testing results can bring you back to earth. Still, there are pure and simple advantages of such kind of testing –  let’s have a look at them.

Advantages of Forward Testing

➕  The topmost advantage of forward testing is a validation of the model’s ability to yield profit in real trading.

In other words, it clears up basic points, like:

  • should you apply the model after optimization?
  • will the model make profit after optimization?

At this stage, you should be aware that optimizing can lead to overfitting – the process of applying too many rules and variables, or manipulating data. In fact, overfitting adapts the variables of the trading model too close to the data the system is tested on. The point is the model adapts to random or unpredictable aspects of price movement.

How to tell overfitting?

Excellent results during optimization – poor results during real trading.

It would be really frustrating to watch a good trading idea yielding loss in real sessions because it was overfitted or optimized incorrectly. The forward analysis helps to reveal this and THIS is one of the main advantages.

➕  The next plus of the forward testing, if comparing to backtesting, is more accurate and reliable measurement of risk & profit levels.

For example

If the model yields only 25% of optimized profit in forward trading then it’s below expectations. A suitable model should show the efficiency level comparable to the one that’s reached during optimization. If a good model shows lower results than in the optimization process, it’s probably excessively aligned to the sample. Even if after further testing this low-efficiency threshold cannot be jumped over then it’s time to let go of this bad model.  

➕   One more advantage of the forward testing is that it gives a clue about the impact of trends, volatility, and liquidity on trading performance.

The experience of many traders says that rapid changes in volatility have a great and mostly negative impact on trading performance. A good, sustainable model though, will be more able to “take the heat” or respond profitably to such changes.   

The forward analysis that “scrolls” over big time periods divided into many consecutive sets, can tell a lot about such market changes impact on trading performance. The user can easily identify and evaluate positive & negative effects of unusual, non-repetitive events.

So once we acknowledged the pluses of conducting forward testing let’s learn the basics of carrying such kind of testing.

How to Conduct Forward Testing

Once again, forward analysis allows to see how correctly the parameters were selected on the assigned historical section as well as to identify whether your Expert Advisor is in an optimization trap.

The forward testing, as well as simple testing, is usually performed on an analytical tool called strategy tester or in real-time mode (via demo account).

To do this:

  1. take the historical interval you want your EA to adapt on;
  2. split it the way one-fourth of this interval is not affected by optimization and is forward of the optimizable period.

The obvious question you might have is “What time period is ideal for optimization and forward test?”

Though there’s no definite answer to this, generally at least one-fourth of the historical segment goes for forward testing.

Still, as practice shows, the more source data is involved in optimization process and the bigger time period is set for forwarding testing, the more reliable and stable parameters you obtain.

Another question could arise like “What is more effective: to conduct forward testing in real time or on the strategy tester?”  

Since time costs are truly incommensurable, most traders suggest that only a high-quality forward test in real-time can fully uncover the potential of the trading system and the selected settings as its conditions are as close as possible to real trading.   

Summing up

Forward testing might be time-consuming, but it’s an integral part of the verification of trading idea’s viability.

The whole verification process can be simply split into 3 stages:

  1. Strategy backtesting – is the first wise move.
  2. After that you run forward test for a reasonable amount of time (depending on trading frequency).
  3. And the final step would be committing some real capital in live trading.

When building the trading system, many prefer to think they work than to acknowledge they don’t. But what’s better: go the extra mile with forward testing to get a profitable system, or stick to your fantasies and lose a few thousands?

Fintatech team is happy to remind you that our Trading Platform Designer can help you unlock the true power of your strategy with the inbuilt backtesting module. Up to 5 years of historical data is in your hands to perform insightful testing.