Why is backtesting so powerful?
Backtesting is one of the most powerful tools in a technical trader’s toolbox. With modern backtesting software you can backtest your trading rules over thousands of stocks, over the last 20+ years of market history in just seconds.
Why is this helpful?
Countless traders are making their decisions using indicators and rules they assume should be profitable. Maybe they read about them in a book or a magazine or maybe they took a course and learned the rules. These approaches are lacking because the trader has to put their faith and trust in the author of the trading rules. The trader does not have any other reason to trust the rules other than they were told they work.
This is nothing more than blind faith!
Having faith in rules you are told are profitable is ok, until the market tests you with a string of losses, hands you a large drawdown or worse, demonstrating that the rules are not profitable after all. Unless you have absolute confidence in your rules, it is practically impossible to trade through a large drawdown. Backtesting is the tool that can give you the confidence you need to keep following the rules when the inevitable drawdown occurs.
What backtesting does do for your trading
Backtesting your rules can give you the answers to many questions that traders routinely struggle with such as:
- Has this trading system made money in the past?
- Is the edge of this system profitable and stable over time?
- Are these rules robust across a wide range of parameter values or are they fragile?
- What was the maximum historical drawdown for these rules in the past?
Backtesting also allows you to answer questions about the trading system itself. These are the questions we frequently see in online forums and trading groups. They are questions from new traders wondering what they should do. If you have your trading system programmed into your trading software and you can automatically backtest then you can quickly and easily answer questions like:
- Should I take profits when I am 50% up?
- Should I move my stop up to breakeven?
- Should I use a 50 day moving average or a 100 day moving average?
All of these questions are quick and easy to address with automated backtesting. For example, for the 50% profit target question, all you need to do is add a 50% profit target to the system code, backtest it, and then compare it to the original version without a profit target. If the profit target makes the system more profitable then you have your answer – no blind faith required.
What backtesting can’t do for your trading
While backtesting is the most powerful tool in your trading toolbox, there are some limitations. The biggest one being you can only backtest on past data, not future data.
While you can easily backtest over 20-30 years of stock market history, it is quite possible that either your stock, or the market as a whole could do something that it has never done in your backtest. If this happens you are at risk because your backtest has not “experienced” this new, unexpected behaviour and so you can’t 100% rely on your backtest to tell you the likely system performance under this uncertain scenario in the future.
The difficulty is we can’t predict the future either, so we donβt know what market behaviour we will need our trading system to deal with. This is where we need to move beyond the backtest and think about possibilities – scenarios that could happen, and then look at our system rules to see how they will perform.
This forward looking, scenario planning approach to trading system design is important because it allows us to forsee problems in our trading system design before they hurt us financially.
Possible market behaviour scenarios
If you are going to evaluate your trading system against potential future market scenarios it pays to have a framework so you don’t miss anything that could happen. The key is to think through all possibilities and figure out if any of them would really hurt your system and cause you a larger than expected drawdown.
For each scenario ask yourself these questions: Compared to my backtest, would this scenarioβ¦
- β¦ increase the size of my losing trades?
- β¦ reduce my % winners dramatically?
- β¦ reduce the size of my winning trades?
- β¦ give me more losses in a row / simultaneous losing trades?
- β¦ give me a bigger drawdown?
- β¦ reduce my compound annual return?
Letβs think through the scenarios that may not appear in your backtest to ensure your trading system is prepared for anything.
If we are prepared for anything the market could do, then it doesn’t matter what the market will do.
When you are defining your trading system rules, think about the following scenarios:
Scenario 1: The market could become more volatile and ‘gappy’
Scenario 2: The market could become less volatile
Scenario 3: The market could move with increasing magnitude of corrections against the trend
Β Scenario 4: The market could move with reducing magnitude of corrections against the trend
Scenario 5: The market could have a sudden reversal without retracements
Scenario 6: The market could have a V shaped Recovery from a bear market
Scenario 7: The market could move for a unusually sustained period down with no up days
Scenario 8: The market could move for an unusually sustained period up with no down days
Of course this is not an exhaustive list of the possible scenarios, the key message stands⦠as traders we cannot afford to rely on what has happened in the past to ensure our trading rules are complete and will keep us out of trouble. We must instead think about what could happen in the future and ensure that the rules in our system keep us safe in the markets.
When you are testing a trading system, consider each of these scenarios along with as many others as you can come up with. Looking at your entry and exit rules you can deduce what could happen to your system in each scenario. If you find that one of the scenarios could hurt you financially then you may need to add an additional rule to the system.
Conclusion
Backtesting is the most powerful tool in your technical trading toolbox. But like all tools, it is not perfect. Because backtesting is reliant on past data we need to think beyond the backtest to ensure there are no future scenarios that could cause problems for our trading systems.
This style of scenario analysis will give you more robust trading systems that are better prepared for whatever the future in the markets may hold for you.
This article was written by Adrian Reid, Founder of Enlightened Stock Trading and was first published inΒ Your Trading Edge Magazine