We use cookies to give you the best possible experience on our website. By continuing to browse this site, you give consent for cookies to be used. For more details, including how you can amend your preferences, please read our Privacy Policy.
More Info Accept
81% of retail accounts lose money when trading CFDs with this provider. CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 81% of retail investor accounts lose money when trading CFDs with this provider. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money. expand_more

How to backtest a trading strategy

August 20, 2020 15:19 UTC
Reading time: 8 minutes

Learning how to backtest a trading strategy is one of the most important skills in improving trading performance. After all, trading is about making decisions and it is difficult to make decisions when the outcome is unknown. While past performance does not guarantee future performance, backtesting a strategy to learn about the frequency of wins and losses and other data points, can help the trader have more confidence in implementing their system.

How to backtest a trading strategy

What is backtesting trading?

In order to do backtesting successfully a trader first needs to have a trading strategy with a set of rules. This could be a manual strategy where traders find the setups themselves or even an automated trading strategy in which a computer algorithm takes the trades. The two approaches differ when it comes to backtesting.

When learning how to backtest a trading strategy manually a trader would go back in history to find all of the trades that would have met their trading strategy rules and then record that data in a journal. With this data, the trader can then see the historical wins and losses, the largest run-ups in the account, the largest drawdowns, the consecutive win to loss ratio and many other data points. This will then give the trader confidence in how effective the system is and whether to trade it live.

Another option is to learn how to backtest a trading strategy in MT4 (MetaTrader 4) or MT5 (MetaTrader 5), a popular trading and backtesting platform that can be downloaded for free from Admiral Markets UK Ltd. This method is very popular among automated traders. Once they have programmed their trading system using an Expert Advisor or using a free one from the MetaTrader Market place, then the MetaTrader trading platform will automatically find all of the previous trades that met the rules coded into the system and provide a historical and detailed report, similar to the one below:

How to backtest a trading strategy MT5

A screenshot of a hypothetical trading system's historical backtested results from MetaTrader.

Did you know that you can download the MetaTrader 4 trading platform provided by Admiral Markets completely FREE? With this trading platform you can trade directly from the chart and use algorithmic trading strategies as well! Start your FREE download by clicking the banner below:

How to backtest a trading strategy and Trade With MetaTrader 4

How to backtest a trading strategy

Whether you are learning how to backtest a Forex trading strategy or learning how to backtest a stock strategy, learning how to backtest a trading strategy using Excel is important. It is one of the best ways to get started in the financial markets, to build confidence in yourself and your system.

The process of backtesting a strategy manually is powerful because it allows beginner traders to condition their minds with the right visual image. Trading is as much about pattern recognition as it is analysing the numbers. The more you can build your memory bank of what you should be trading and what you should not be trading, the more likely you are to make better decisions in the future.

However, in order to start backtesting, a trader first needs a trading strategy to test.

How to build a trading strategy

There are a variety of ways to build a trading strategy. The core and most basic components should be the following inputs:

1. Which instruments will you trade on?

Identifying the markets and symbols you want to trade on is essential. A strategy that may be effective on indices may not work at all on Forex markets. While it doesn't matter which markets you will trade on, it is important to have a focus. For example, many Forex traders would first start with the major currency pairs against the US dollar. With Admiral Markets you can trade CFDs ( Contracts for Difference) on more than 3,000+ instruments which include Forex, indices, stocks, commodities and others.

2. Which time frames will you trade on?

Backtesting a strategy on the daily chart and then trying to trade it on an hourly chart would lead to some very different results. It is important to identify the time frame you plan to trade on. Will it be the daily chart, four-hour or one-hour chart for example? The MetaTrader trading platform provided by Admiral Markets provides access to a variety of different time frames to trade on.

How to backtest a trading strategy MT5 tools

An example chart showing a variety of different trading tools and indicators. DISCLAIMER: Charts for financial instruments in this article are for illustrative purposes and do not constitute trading advice or a solicitation to buy or sell any financial instrument provided by Admiral Markets (CFDs, Exchange Traded Funds, Shares). Past performance is not necessarily an indication of future performance.

3. What tools will you use to buy or sell?

When traders make trading decisions they usually use different tools to help them. These tools could be from technical analysis or fundamental analysis with the former being the most popular. In technical analysis, traders will use chart patterns and trading indicators to make trading decisions on when to buy or sell. Defining your tools is essential in backtesting as you need to know what you are looking for.

4. How will you risk manage your trades?

Risk management is a key component of long-term trading success. How much will you risk per trade? Where will you put your stop loss and take profit? When looking back at historical trades it's important to have this information ready to make the backtesting results more meaningful.

Did you know that you can upgrade your MetaTrader trading platform provided by Admiral Markets to the Supreme Edition? This will allow you access to automated analytical tools which scan for a wide variety of trading patterns on more than 3,000+ asset classes! Start your upgrade completely FREE by clicking on the banner below:

Download MetaTrader 5 Supreme Edition and backtest a trading strategy

How to perform a backtest

Once you are armed with your trading strategy rules you can now look back historically to find examples of when they have occurred in the past. This data should be recorded in an Excel spreadsheet so you can quickly filter for best performing days and quickly see data points such as consecutive winning and losing trades.

The Excel spreadsheet for backtesting could like this (a hypothetical example with random figures):

Month

Day

Strategy

Symbol

L/S

Entry

SL

TP

Risk

Reward

W/L

Comments

August

Tues

Forex H4

EURUSD

Long

1.19

1.18

1.2

-100

100

W


August

Wed

Forex H1

EURUSD

Short

1.19

1.2

1.18

-100

-100

L


After a larger sample size has developed, users can then add up the wins and losses and see how effective certain months and days have been, as well as how effective the strategy has been to the long side and short side. However, it is the process of building the memory bank of what meets the rules and what does not meet the rules which is a very powerful aid in making trading decisions for the future.

Why start trading with Admiral Markets?

  • Begin your trading with a well-established, reputable company that is authorised and regulated by the Financial Conduct Authority (FCA).
  • Start trading on the world's most popular trading platform called MetaTrader for PC, Mac, Web, Android and iOS operating systems so you can also trade on the go.
  • Supercharge and upgrade your trading platform completely FREE to the Supreme Edition for actionable trading ideas on thousands of different markets.
  • Open a Trade.MT4 or Trade.MT5 trading account to trade via CFDs and potentially profit from both rising and falling markets.

One of the best ways to get started is to test-drive the trading platform and practice your ideas and strategies in a virtual trading environment. Did you know that you can open a FREE demo trading account with Admiral Markets? This means you can trade in a virtual trading environment until you are ready for a live account.

Get started today - completely FREE - by clicking on the banner below!

Trade With A FREE Demo Trading Account

About Admiral Markets

Admiral Markets is a multi-award winning, globally regulated Forex and CFD broker, offering trading on over 8,000 financial instruments via the world's most popular trading platforms: MetaTrader 4 and MetaTrader 5. Start trading today!

This material does not contain and should not be construed as containing investment advice, investment recommendations, an offer of or recommendation for any transactions in financial instruments. Please note that such trading analysis is not a reliable indicator for any current or future performance, as circumstances may change over time. Before making any investment decisions, you should seek advice from independent financial advisors to ensure you understand the risks.