Last Updated on 8 January, 2022 by Samuelsson
Both small retail traders and big institutions use backtesting to verify their trading strategies before making use of them in live trading. Even some of the world’s most successful hedge funds, such as Jim Simons’ Medallion Fund, use backtesting continuously to develop new strategies.
But do you know why backtesting works? That’s what we want to show you in this article: the 5 main reasons why backtesting works. Before we go further, let’s first understand what backtesting means.
What is backtesting?
Backtesting is a procedure you use to know how a strategy performs on historical price data. That is, after coding a strategy, you can use backtesting to find out how the strategy has performed in the past by loading the strategy on a historical dataset using a software called strategy tester, which allows past data to playback.
Of course, backtesting doesn’t give any certainties about the future, but it can tell you how the strategy has performed in the past. If a strategy has performed poorly in the past it’s unlikely that it will perform well in the future. On the other hand, performing well in the past means it may continue to perform into the future, but there’s no way to guarantee mean that it will. So, it tells whether to go further with testing the strategy or to discard it entirely.
Backtesting is just one of the steps in developing a strategy. The process includes the following steps:
- Generate a trading idea to test.
- Convert the idea to a trading strategy by clearly and concisely defining the entry and exit parameters
- Specify the market and the timeframe you want to test on.
- Code the strategy into a trading algorithm.
- Run the strategy on your in-sample data
- Validate the result with your out-of-sample data.
If the backtesting result is promising, you forward-test the strategy with a demo account for several months before you commit real money. This can save your trading capital!
Why backtesting works
Here are five reasons why backtesting works:
1. You can use it to confirm or falsify a trading idea
Backtesting allows you to easily check if your trading idea has worked in the past or not.
- For example, if you want to know whether the Turnaround Tuesday is real or just a myth, you simply define the rules and backtest the idea. In less than five minutes, you’ll find out.
- Or, maybe you think you have stumbled on an interesting pattern on the chart. Then, you quantify it with strict buy and sell rules and backtest it.
From the testing, you would know if it worked on past price data. If it didn’t perform well, you just drop the strategy and go on to test another idea.
Since most ideas don’t work, you should not spend much time testing a strategy. Some traders waste a lot of time programming software and tweaking their strategies only to find out it was a waste of time. You don’t need “perfect” strategies to make money in the markets; what you need are many strategies that complement each other. So, you have to keep generating trading ideas all the time, but you don’t spend much time in testing.
2. You can easily automate the trading strategy after backtesting
When you have successfully backtested a trading strategy and it performs well, you can easily automate it to trade on a demo account and then later on a live account. In Tradestation, you simply check a box and you are good to go, but in Amibroker, you need to add code to automate and let Amibroker keep track of your positions and strategies.
3. Backtesting enables you to exploit the law of large numbers
Since the computer can easily trade and monitor hundreds of strategies, you exploit the law of large numbers by loading multiple strategies at once. This enables you to diversify into multiple timeframes, asset classes, and strategies.
For instance, the main reason for the success of the Medallion Fund include:
- They use enormous amounts of data to generate hundreds of uncorrelated strategies
- Because of the low internal correlation among the strategies they can use leverage to boost returns
However, note that leverage is dangerous, and we certainly do not recommend it; you only use it if you are experienced enough to manage the risks.
4. Backtesting reduces the effects of emotions in your trading
It is true that individual investors underperform the averages and women are better investors than men. The main reason for this is that emotions cloud our judgment when trading. Investors tend to sell into a panic and buy after a big rise, while they need to do the complete opposite.
Backtesting may not help remove such mistakes if you are trading manually, which is why you need to stick to the trading plan. To be able to stick to a trading plan, you need to trade smaller position sizes than you’d like. This is the best way to be detached from the money and keep your emotions under check.
For an automated system, your emotions are in check because you don’t directly execute the orders. However, the closer you follow the markets, the more likely you are to overrule your systems when your “intuition” tells you to sell or buy. This is a wrong habit because, most of the time, intuition is plain wrong. Overruling your systems and strategies is unlikely to work.
Women do better because they save, invest, and forget about it. They are not trying to be geniuses, and they don’t have any ego issues!
5. Backtesting saves time
You can use this process to generate and test hundreds of strategies in just a single day. You confirm the good ideas and quickly drop the poor ones. Trading is a game of trial and error. Interestingly, backtesting is a great tool that can help you trial more ideas in a short time.
Read more: How Do You Manually Backtest a Strategy?