The offbeat term “backtesting” refers to checking the trading systems effectiveness based on historical data. This is to see how they would have worked over the prior time period. In other words, when you get the virtual result of a trading strategy in the past, it is in fact the process of trading strategy called backtesting.
Backtesting can be applied to any trading strategy or model. But it is important that you have enough historical data (e.g. closing prices for a certain period of time) and mathematically described set of rules for a trading strategy. When an analyst creates an investment model and tests it on historical data, we can also consider it as a backtesting example.
Most modern trading platforms support backtesting option, so that you can quickly analyze some ideas without risking your money. The only challenge is to find the right backtesting software platform. There is a lot of scam over the internet linked to trading software.
How to Backtest Your Trading Strategy?
So, what can make the trading strategy backtesting really effective? What are the key points to remember when backtesting? Let’s check out this ready reckoner.
Use a large sample of historical data for proper backtesting
The longer the period of historical time is, the more valid strategy results are. Use at least one year of historical data and don’t forget to test it on several markets as well.
Test your strategy in various market conditions
You’re already aware of the ever-changing market and how it can affect the curve. Test your strategy in all phases including trending and corrective ones.
Record your results, both bad and good ones
It’s not a great discovery that trading is full of sudden turns that can lead both to winning or losing outcomes. Still, there’s a cheer-up tip for you: successful traders don’t lose, they either win or learn. Keeping records on strategy results while back-testing gives chance to analyze its weaknesses and strengths, therefore, to improve your skills.
Keep an eye at your strategy performance metrics
To tell whether you made a profit or loss your strategy must be back-tested on a large amount of historical price action, however, there are other important metrics you should pay attention to:
- What is your win/loss mid-coefficient?
- What’s your risk VS reward mid-coefficient?
- What’s the highest number of winning trades in a row?
- Did you note a drawdown? How long did it last?
Review your strategy thoroughly. Maybe it needs to be modified or wiped out
Accept all your strategy results. It wouldn’t do any harm to tweak it a bit or give it up and start with a clean slate. But remember! To avoid too much aberration in results tweak your strategy before back-testing again.
Stick to the rules of your strategy
A common mistake that traders make is changing their strategy rules or overcomplicating them during backtesting, thinking it can boost their performance. Avoid such an error.
Always test your strategy on a simulated account first
Once you gave your strategy the green light, the next move will be to test it in the real-rime. But before trading with real money, try first with the simulated account. Take your time to prove the profitability of trading strategy without any risk.
Sometimes to achieve consistency traders develop, backtest and trade strategy in a simulated account. This is done for months or even years before you start real sessions with real capital.
Factors Leading to a Successful System of Backtesting
It would be a truly perfect world if you reached a flawless system. A system that would work out in any market and with any tool. Yet, you should focus on 3 main criteria in order to achieve a more prudent approach in the trading system (TS) backtesting.
- Optimization criterion
- TS “survival” criterion
- Psychological criterion
Drawbacks in the Backtesting Trading Strategy
Yes, backtesting works. However, it happens quite a lot that a model yields amazingly good results during backtesting but it fails to repeat them in real trading sessions. This may be the case when information, a trading strategy was tested on is not actual anymore e.g. market volatility has changed.
You can ride the ship though by optimizing the system, i.e. fitting its parameters to the current market conditions.
Another possible reason for the strategy failure in real trading is slippage associated with high competition as well as drop in liquidity which is difficult or impossible to address.
Above all this, technical issues can lead to a drop in the speed of market orders execution, quality deterioration, and other failures. Therefore, while analyzing backtesting results one should adjust such unpredictable events.
It is also believed and mathematically justified, that the longer is the time period for strategy testing, the greater the likelihood of strategy results are valid in future trading. This is because the strategy that’s being tested over a small time range can be adapted to random conditions that are not typical for this market. Long testing time periods, in turn, let trading strategy to adapt to general conditions that may occur in the future as well.
Why do we need Forward Testing?
There are several 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;
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:
- You would need to have a rule-based trading method;
- Be sure to backtest your trading system on the currency pair and a necessary timeframe at least 3 times;
- 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– 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:
- Will the trading model be profitable after optimization?
- What will be the level of profitability after optimization?
- 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.
Advantages of Forward Testing
- The topmost advantage of forward testing is a validation of the model’s ability to yield profit in real trading. 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. 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.
- 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.
Are Backtesting and Forward Testing a key to building a profitable system?
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 test 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 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.
Even though both backtesting and forward testing will provide you some insight about your strategy, there’s no such 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 Versus Forward Testing
When optimizing backtesting results, there’s always a chance of overfitting strategy parameters. You may tweak it totally 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. This is because 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 you stayed on backtesting stage.
Q. How different could the results come between back and forward tests?
No limit here, it depends on the future market conditions compared to your backtesting period and market data you use against your broker market data.
Q. What is the importance of the deviation and why do we need it (or don’t)?
In Backtesting it’s easier to adjust your strategy but forward testing will double check if this strategy is future proof.