How to backtest a trading strategy

The underlying theory behind backtesting is that a strategy that performed well in the past is likely to perform well in the future. And the other way around — a strategy that worked poorly is likely to work poorly going forward. 

You need to be careful about seeking patterns, though, because there is a phenomenon called the “clustering illusion.” One of the most amusing examples of it is a 10-year-old sandwich that supposedly had the face of the Virgin Mary. That said, the sandwich was sold on eBay for $28,000, so it could be worse. 

This article will teach you how to work with patterns in an unbiased way. Find out the steps involved in backtesting, what kind of data is obtained, and how to put it to use.

Earn profit in 1 minute
Trade now

Step 1. Define the rules you’ll be testing

If you think you can make things up as you go along, you might as well not bother. To get accurate results from backtesting, you need to have established rules, including those regarding: 

  • Stop-losses
  • Take-profits
  • Entry signals
  • Exit signals

If you don’t have these already, spend some time defining them. The good thing is that there are no restrictions on which strategies you can backtest, so be as conservative or as creative as you want.

Step 2. Select an asset and a timeframe

It’s better to backtest your strategy for the same instrument and timeframe that you plan to trade with real funds. You can choose any asset; just make sure you are skilled enough for a certain market. 

Triple Bottom candlestick pattern

The reason why you can’t really expect strategies to translate perfectly across markets is that there are asset-specific factors affecting trade performance. For instance, they can be supply and demand, volatility, seasonality, and external risks like regulation or political news. At the very least, select reasonably similar assets.

Step 3. Begin looking for trades manually or use the software

Most retail traders test their strategies manually. Depending on how far back you wish to go, you can look for trades from a year, a month, or a week in the past. As you can guess, looking over years of data manually and taking trades based on what they see is time-consuming and subject to human error. 

Trading with up to 90% profit
Try now

So, you can try automated testing. It’s not perfect either, but it is more objective and accurate. The automated system will not be able to run itself, interpret results, or make adjustments without your involvement, so there’ll be work for you, too.

5 of the best scalping indicators to use right away
You can experiment with various indicators, but there are some you can use right away to build your best scalping strategy.
Read more

Step 4. Rerun the process

After you get the initial results, you need to confirm them over another set of data. Repeat the test at least a couple of times for different market conditions. This step helps you cut off potential bias and the random effect factor — not entirely but as much as possible.

Step 5. Analyze the results

Finally, look over the data. Determine the trading performance manually or using your testing tool by calculating the risk, return, drawdown, winning percentage, and other parameters with which you measure your strategies.

How do the gross and net returns compare with required capital? Did the strategy produce the expected outcome? If not, what can be improved?

Take into account the necessary context, such as the market environment at the time and the strategy’s unique characteristics. For example, some strategies are designed to be riskier. So, at the end of the backtest, you’ll have different thresholds of what’s considered satisfactory.

Final thoughts

Backtesting is no longer reserved for the big sharks in hedge funds. However, while this article described clear steps any trader can follow, there are numerous ways to approach it. You don’t have to copy anyone’s method — just follow the basic rules and develop your own system to assess the expected efficacy of a trading strategy.

Disclaimer: No strategy can guarantee a 100% correct outcome of the trade.

Start from $10, earn to $1000
Trade now
<span>Like</span>
Share
RELATED ARTICLES
4 min
Which strategies can be used at Christmas time?
4 min
4 simple and short trading plans for first-time traders
4 min
5 Best options trading strategies for beginners
4 min
How to trade using divergence
4 min
The pin bar trading strategy: a complete guide
4 min
The use of CPR in trading strategies

Open this page in another app?

Cancel Open