Multiple Timeframe Backtesting – A Quick Robustness Test

Jul 20, 2021

Multiple timeframe backtesting can be a valuable addition to your strategy development workflow.

Here I explain why you should do it, and how to conveniently do it in MT4 and StrategyQuant.

Most retail traders are time-crunched in one way or another.

While live algorithmic trading requires little screen time, the initial strategy development phase requires much time and effort.

Multiple timeframe backtesting can be a great tool in your bid to efficiently churn out robust strategies.

Why Backtest on Multiple Timeframes?

1. Verify Your Strategy’s Robustness

Robustness is a measure of your strategy’s insensitivity to changing prices. A robust strategy will remain profitable in the face of changing market conditions.

Market structure often changes significantly when viewed on different timeframes. Below I compare USDJPY on the 15, 30 and 60-minute timeframes.

By changing your backtest timeframe, you conveniently perform an out-of-sample test that can verify your strategy’s robustness.

2. Fast Computation

This is a big deal if you’re evaluating a large pool of promising strategies.

Multiple timeframe backtesting is much faster than other popular robustness tests like walk-forward optimization and Monte Carlo simulations.

Unlike backtesting on multiple markets, you also won’t need to download additional data.

Backtest Considerations

Changing your backtest timeframe is straightforward. You leave the original strategy untouched, while changing only the chart’s timeframe.

There’s no harm in backtesting on all the available timeframes. In fact, the more timeframes you’re profitable on, the more robust your strategy probably is.

Nonetheless, not all timeframes are equal. Here are three things to keep in mind:

1. Your Strategy Type

The various timeframes contain varying levels of noise, which has a big impact on your strategy performance.

Noise is random price movement that is unrelated to any underlying trend. It can be measured using the Kaufman Efficiency Ratio.

The lower the timeframe, the more noise it contains.

Mean reversions strategies are great at exploiting the noise on the lower timeframes, while trend following strategies benefit from smooth moves on the higher timeframes.

This means that if you developed a trend following strategy on the 1-hour timeframe, and tested it on the 1-minute timeframes, you’re almost guaranteed to see losses.

2. Your Strategy Elements

If your strategy contains many adaptive elements, for example ATR-based stop losses, you may have a better chance of performing well across many timeframes.

For example, if you use a 3*ATR stop, your stop distance will automatically increase as you progress to the higher timeframes.

This isn’t the case if you use a pip-based stop. A 20-pip stop may work well on the 15-minute timeframe, but will be too tight on the 4-hour timeframe.

3. Number of Trades

In general, you want your backtests to contain as many trades as possible. Your backtest standard error is inversely proportional to the square root of the number of trades.

A large sample size creates a smaller standard error, meaning your backtest results are more reliable.

When you backtest your strategy on a higher timeframe, for example going from the 30-minute to the daily timeframe, you’re going to see a drastic reduction in number of trades.

It’s for this reason that I never develop strategies for the daily timeframe, since it’s difficult to get a large sample size, even with 20 years of historical data.

With these three considerations in mind, I generally only backtest on the next higher and next lower timeframes.

So if I have a strategy that originally trades on the 30-minute timeframe, I’ll use the 15 and 60-minute timeframes for robustness testing.

Passing Criteria

Compared to the original timeframe, you should expect some performance deterioration. Here are some aspects worth considering:

1. Equity Curve

The equity curve speaks a thousand words. You want to see an overall uptrend, without any deep drawdowns.

2. Performance

Like most things in trading, this is highly subjective.

At the bare minimum, the strategy should remain profitable. If you’re using the default MT4 report, profit factor and expectancy are decent choices.

With StrategyQuant, you can consider additional metrics like Return/Drawdown, Sharpe ratio, and stagnation.

3. Number of Trades

Getting sufficient trades is often challenging when backtesting on the higher timeframes.

I consider this robustness test to be a verification of your strategy’s performance on the original timeframe. I therefore consider anything above 30 trades to be acceptable.

This measly number could mean your backtest isn’t as reliable as hoped, but I wouldn’t want to reject a strategy simply because it had too few trades on a higher timeframe. Since you aren’t actually trading on the higher timeframe, I think this is a fair trade-off.

Example of Multiple Timeframe Backtesting

I’ll use a 30-minute USDJPY trend following strategy from here on out. It has a decent equity curve with a 1.5 profit factor.

How will it perform on the 15 and 60-minute timeframes?

Let’s do some backtests in both StrategyQuant and MT4.

Using StrategyQuant

This can be conveniently done using the Retester module.

Here I’ll use the Backtest on additional markets cross-check.

In StrategyQuant, you can also partition your data into multiple segments as shown below:

You passing criteria can be applied to each individual segment. This helps to verify your strategy’s consistency over the backtest period.

Using MT4

To do this robustness test in MT4, you only need to change the backtest Period.

To save time, you can run multiple instances of MT4 and run the backtests concurrently.

I then imported the MT4 reports into QuantAnalyzer for an overlay of the results.

So does the strategy pass this robustness test?

The 15 and 60-minute equity curves display some deterioration, but there are no deep drawdowns. The profit factor and number of trades are acceptable to me.

Wrapping Up

Backtesting your strategy on multiple timeframes is a quick way to evaluate its robustness. Ideally, your strategy will remain profitable across several timeframes.

You can increase the difficulty of this robustness test by:

  • Testing on more timeframes
  • Widening the gap between timeframes
  • Applying more stringent passing criteria (equity curve, profit factor etc.)

Hopefully this will accelerate your quest to create a pool of robust strategies!

Powered By

Development Platform

Forex VPS

FXVM Forex VPS

Popular Posts

Laguerre RSI Trend Following Strategy

The Laguerre RSI attempts to improve the responsiveness of the regular RSI, whilst keeping whipsaw trades to a minimum. Let’s see how well it detects short-term pullbacks for a trend following strategy!

read more

What is Fixed Ratio Money Management?

Have you heard of fixed ratio money management? How does it compare to the popular fixed fractional approach? Here I’ll explain how fixed ratio works, and see how it stacks up against fixed fractional money management.

read more

Build a Diversified Portfolio With QuantAnalyzer

The ability to efficiently trade a diversified portfolio of strategies is one of the biggest advantages of algorithmic trading. Here we will use QuantAnalyzer’s Portfolio Master to build a portfolio consisting of high performing, uncorrelated strategies.

read more

What Is the QQE Indicator?

The QQE is a mysterious indicator that sometimes pops up in trading forums. Does it deserve a place alongside the more traditional momentum indicators like the RSI and CCI? Let’s add it to a trend following strategy to find out!

read more

Make your money work for you!

Get promotions, trading ideas and strategy development tips delivered to your inbox!

Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Trading Strategies

What’s the Best Time to Trade Forex?

What’s the Best Time to Trade Forex?

The forex markets are open 24/5, but not all hours are created equal. Here I dissect my broker data to determine the best time to trade forex.

Forex Weekend Gaps: Can You Exploit Them?

Forex Weekend Gaps: Can You Exploit Them?

Have you noticed that forex weekend gaps usually reverse within 3 days? Here I’ll program a mean reversion strategy to exploit gaps over the last 18 years!

Money Flow Index: An Improved RSI?

Money Flow Index: An Improved RSI?

The Money Flow Index is sometimes called the volume-weighted RSI. Can it outperform the RSI in this trend following strategy?

Automated Bollinger Bands Squeeze Forex Strategy

Automated Bollinger Bands Squeeze Forex Strategy

StrategyQuant’s BBWR indicator is the perfect tool to detect a Bollinger Bands squeeze. Here I explain how it’s calculated, and use it to program a breakout strategy for the AUDJPY!

Should You Use the Kelly Criterion for Forex Trading?

Should You Use the Kelly Criterion for Forex Trading?

The Kelly criterion is a famous mathematical formula that attempts to maximize your long-term capital growth. In this post, I’ll apply it to a EURUSD breakout strategy and explain some of its potential shortcomings when applied to forex trading.

Can a Trading Pause Improve Your Trend Following Results?

Can a Trading Pause Improve Your Trend Following Results?

A temporary trading pause can improve your win rate if you’re trend following a volatile market. Here I’ll program a trading pause into a simple breakout strategy, and test its effectiveness on the Widow Maker – the GBPJPY.

Laguerre RSI Trend Following Strategy

Laguerre RSI Trend Following Strategy

The Laguerre RSI attempts to improve the responsiveness of the regular RSI, whilst keeping whipsaw trades to a minimum. Let’s see how well it detects short-term pullbacks for a trend following strategy!

How to Use the Supertrend Indicator

How to Use the Supertrend Indicator

Despite its cool name, the Supertrend indicator often seems to slip under the radar. Here I explain how it’s calculated, and combine it with moving averages to produce a simple trend following strategy.

Strategy Development

Do You Know Your System Quality Number?

Do You Know Your System Quality Number?

The System Quality Number measures the profitability & consistency of your trading system. Here’s how to calculate your SQN and use it to improve your trading!

How to Get a Realistic Backtest Spread

How to Get a Realistic Backtest Spread

Your choice of backtest spread can certainly make or break a strategy. This post will show you how to study the intraday spread variations of your market, and suggest several ways to avoid paying ridiculous spreads.

Do You Know Your Strategy’s Optimization Profile?

Do You Know Your Strategy’s Optimization Profile?

Your strategy’s optimization profile often reveals its robustness, helping you select strategies that will remain profitable in live trading. Here I explain why an optimization profile is important, and how you can easily obtain one using StrategyQuant’s optimizer.

Which MT4 Backtest Report Metrics Should You Use?

Which MT4 Backtest Report Metrics Should You Use?

Understanding your backtest report is an essential part of being a successful strategy developer. Here I explain what the numbers mean, and how you can make use of each metric during strategy development.

Out-of-sample Testing Using Monte Carlo Simulations

Out-of-sample Testing Using Monte Carlo Simulations

Traders often use Monte Carlo simulations to estimate worst-case drawdowns, but did you know they can be used for out-of-sample testing too? This post demonstrates the use of StrategyQuant’s Monte Carlo simulator to randomize historical prices and strategy parameters, helping you select robust strategies for live trading.

How Many Trades Should Your Backtest Have?

How Many Trades Should Your Backtest Have?

We all want a large sample of trades in our backtests, but practical limitations such as data availability often get in the way. Here I’ll explain why 30 trades is insufficient, and how you can use standard error to quantify the uncertainty arising from a small sample size.

Build a Diversified Portfolio With QuantAnalyzer

Build a Diversified Portfolio With QuantAnalyzer

The ability to efficiently trade a diversified portfolio of strategies is one of the biggest advantages of algorithmic trading. Here we will use QuantAnalyzer’s Portfolio Master to build a portfolio consisting of high performing, uncorrelated strategies.

Strategy Optimization Using MT4

Strategy Optimization Using MT4

How do you improve your trading strategy in MT4? This post will show you how to optimize the entry and exit parameters for a moving average crossover strategy. Finally, an intraday time filter will be added to help avoid false breakouts.

Debugging & Backtesting Using MT4

Debugging & Backtesting Using MT4

With a fresh algorithm at your fingertips, how do you verify that it has been programmed correctly? This guide will show you how to use Metatrader 4’s visual backtester to debug and backtest your strategy.

Create Your Trading Algorithm in 15 Minutes (FREE)

Create Your Trading Algorithm in 15 Minutes (FREE)

Converting your trading idea into an algorithm is the first step towards reaping the benefits of automated trading. This guide will cover the creation of a simple moving average crossover algorithm, without any actual programming.

What Is Drawdown in Trading?

What Is Drawdown in Trading?

Are you getting a comprehensive assessment of your strategy’s downside? This post will discuss several methods to measure drawdowns, helping you build and select strategies that better suit your risk appetite.

How to Select the Best Trading Strategy Entry

How to Select the Best Trading Strategy Entry

With an abundance of technical indicators available, selecting your strategy’s entry conditions can be overwhelming. This post will illustrate a method to graphically compare the profitability of different entries.

Live Trading

What’s the Best Time to Trade Forex?

What’s the Best Time to Trade Forex?

The forex markets are open 24/5, but not all hours are created equal. Here I dissect my broker data to determine the best time to trade forex.

How to Find a Real Trading Guru

How to Find a Real Trading Guru

Every day I come across a trading guru offering educational content on the internet. Many of them speak of huge returns with minimal effort. Should these be trusted? Here’s some tips on how to separate the wheat from the chaff.

How to Enjoy Stress-Free Trading

How to Enjoy Stress-Free Trading

Trading is a great way to make some additional income, but not if you’re constantly pulling your hair out. Here I offer 7 tips to help make your trading profitable and stress-free.

How to Select the Best Forex VPS

How to Select the Best Forex VPS

A virtual private server (VPS) is a virtual computer that you can rent and access remotely. It provides a reliable platform on which to execute your forex strategies. This post will help you decide whether you need a VPS, and show you how to select an optimal VPS.

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Pin It on Pinterest

Share This