Categories: Trading

How Long Should You Backtest a Trading System?

This is a common question that new entrepreneurs ask, but there is no simple answer. In this post, I will break down how to determine how long you should test a trading system.

As a general rule, you should backtest a trading system as long as you have the confidence to trade the system for real money.

In other words, it depends on a few different factors.

Let’s take a look at what you need to know about backtesting and how long it should take you to do it.

It all starts with defining our terms…

The Meaning of “High”

The first thing I need to clarify is what “high” means because there can be some confusion here.

There are different interpretations of this word, so here are the definitions that I will discuss in this post.

  • Amount of time spent on backtesting
  • Amount of historical data used
  • Number of backtested trades

If we look at the 3 definitions, we know that “high” can mean different things.

So I’ll go through each one to clear up any confusion, and show you what’s important.

Amount of Time Spent Backtesting

As with many things in life, the amount of time you spend on backtesting is not an indicator of the quality of work done during that time.

Therefore, the idea that you should spend the least amount of time on backtesting is not useful.

In an extreme example, you can backtest for 4 months, but only have 2 backtested trades.

That doesn’t tell you how profitable the trading strategy is.

So if you are looking for a minimum amount of backtesting to prove a trading strategy, you should reject the idea that backtesting work should be done in a certain period of time.

Amount of Historical Data Used

Image: NakedMarkets

Another way to measure the amount of backtesting done by a trader is to track the amount of historical data used in the test.

In other words, you can backtest a system on 3 years or 30 years of historical data.

Obviously, more data is better.

If you have a lot of historical data, you will know how your trading strategy has performed in many different market cycles.

This is very important to find out if you have a strong trading strategy or if your trading strategy only works in certain market conditions.

For example, if your trading strategy was not tested during the financial crisis of 2007, you will never know what will happen in a more volatile market.

So while the amount of historical data you use to create your backtest is an important factor in determining a valid test, there are other things you should consider…

How many times should you backtest a trading strategy?

That brings me to the last measure of backtesting…

The most useful metric to look at is the total number of backtested trades.

If you test a trading strategy with more than 300 trades, that is more reliable than if you test the strategy with 10 trades.

That’s pretty obvious.

But what is less obvious is the minimum number of trades that will give you confidence in the system you are testing.

There may be a gray area where you are not sure if you have enough trades in your test.

When in doubt, zoom out and think about the bigger picture.

Consider a day trading strategy…

If you only try 100 trades, then you can have 2-3 months of data. That is not enough to get a good idea if the strategy is reliable or not.

Even 500 trades may not be enough.

You don’t have to test every single day for the last 20 years, but you should have samples from different market conditions.

Must have trades from:

  • Colorful markets
  • Silent markets
  • Trending markets
  • News shock markets

The more trades you have from each of these types of markets, the more confidence you will have in your strategy.

Now consider a swing trading strategy…

With a swing trading strategy, you may have a small number of trades in your backtest.

For example, let’s say you backtested the RSI Divergence trading strategy on the daily chart of EURUSD.

With this trading strategy, you can only get 25 trades in 20 years.

Does that mean you should discard the strategy, even if it is profitable?

Of course not.

But you probably don’t trust it enough to sell it live.

In that case, it is important to test the strategy until you reach a point where you are confident that the strategy will work.

The next test will take some time.

But this is the best way to gain confidence, if you have little data.

You can also test the strategy on other markets and timeframes.

If you find other instances where the strategy works, that can also give you more validation that the strategy is reliable.

The 100 Trades Myth

There is a meme on the internet that you need at least 100 backtested trades to prove that a strategy works.

That is not true.

100 trades is a good number of trades to have.

But again, the number of trades you have in a test only tells you part of the story.

Here’s what you need to know about 100 trading myths…

?

The biggest issue with setting a blanket minimum number of trades is that it ignores the timeframe being tested and the nature of the specific market.

Some statistics professors may tell you that you need a minimum of 30 trades to prove that a trading strategy works.

Some say 500 trades.

In all fairness, that’s a good place to start, from a strictly mathematical point of view.

But in reality, there is a lot of diversity between markets, market cycles and trading systems.

What works in one market or cycle may not work in another.

That’s why you need to consider all factors, not just the number of trades alone.

Final Thoughts

That’s what you need to know about how long you need to backtest.

There is no simple answer to this question.

On the surface, you could say that you should have as many backtested trades as possible, over as long a historical period as possible.

But you need to consider the nuances.

You need to consider your trading strategy, your goals and the confidence level of your test.

Don’t worry though, once you start backtesting, you’ll get a feel for what’s reliable and what’s not.

Just get started.

Learn more about backtesting in these posts.

cleantechstocks

Recent Posts

Aduro’s Disruptive Oil Upgrading Technology Moves Closer to Commercialization

  Aduro's Disruptive Oil Upgrading Technology Moves Closer to Commercialization Alberta's oil sands produce vast…

1 year ago

Global Markets: Retail sales increase in July

WINNIPEG – The following is a glance at the news moving markets in Canada and…

1 year ago

Top picks in REIT sector from BMO and RBC analysts

Daily roundup of research and analysis from The Globe and Mail’s market strategist Scott Barlow…

1 year ago

Investors look to AI-darling Nvidia’s earnings as US stocks rally wobbles

The logo of technology company Nvidia is seen at its headquarters in Santa Clara, California…

1 year ago

China’s ‘Lehman Moment’? Which domino will fall next as property crisis grows? – South China Morning Post

China’s ‘Lehman Moment’? Which domino will fall next as property crisis grows?  South China Morning Post…

1 year ago

Slide in euro zone service sector sharpens ECB’s rates dilemma

LONDON, Aug 23 (Reuters) - Euro zone business activity declined far more than thought in…

1 year ago