Testing a trading strategy with backtesting software

Before reading through this lesson, you should have read through:

Backtesting 30 trades manually with a demo account can help you decide whether a strategy is worth pursuing. However, if you are looking to trade a new strategy over a much longer term, then you do not want to have to wait for months before you can make a decision on whether to use the strategy on a real money account.

Different ways of backtesting a trading strategy automatically

This is where backtesting a strategy using software helps. You can get an idea if the principles of the strategy hold up over a longer term much more quickly. You can do this in two ways: using backtesting software or using a robot.

Using backtesting software

You can use special backtesting software, such as FOREX TESTER, that allows you to test a strategy over a longer period of time, using real historical data. This type of software allows you to rewind the historical market data and trade through a number of days, weeks or months by speeding up the time.

Using a robot

An alternative to using backtesting software is to use a robot or an Expert Advisor. The robot would go through the historical data at a fast pace and mimic the trades that you could have taken using the strategy, allowing you to see what your results would have been like.

Considerations to bear in mind

Past performance is not indicative of future results. You will never know how much you will make in the markets or what kind of performance you can achieve each month.

Whether you use backtesting software, such as FOREX TESTER, or you use a robot to test historical data, you must bear in mind that past performance is not indicative of future results.

When you are testing a strategy, you should not be trying to see how much percentage increase you can make on your account or how much money you could make. The simple fact is that you will never know what the markets will do and so from one month to the next you will not know what kind of performance you can achieve.

When backtesting a trading strategy, do not focus on what kind of performance it has achieved in the past, but rather focus on whether the principles of the strategy hold up for certain asset classes.

When you are backtesting a strategy, you are seeing if the principles of the strategy will work with certain assets or in certain market conditions.

If, for example, you are looking to test a strategy that captures part of a trend and successfully filters out trades in a ranging market, then by testing the strategy using software, it will allow you to see if the strategy actually manages to achieve this.

If the results turn out to be unprofitable, then you may want to consider ways to filter out unprofitable trades and reduce losses. If the results turn out to be profitable, then you may have a strategy that you can work with in a live market environment.

Avoid curve fitting

Curve fitting is optimising your trading strategy to maximise profitability based on past data.

However you must bear in mind that you should never tweak your strategy to the point where you achieve maximum profitability. This is known as curve fitting and means that you have optimised your strategy to achieve the maximum performance possible based on what has happened in the past.

Past performance is not indicative of future results

This will not help you in the future, because the conditions in the past that gave you a substantial performance on your over-optimised strategy will change, even if slightly, and you will not achieve the same results.

You need to stick to making sure that the principles of the strategy work and look to optimise your strategy in a live environment based on current market conditions, not past market conditions.

Looking for a mentor?

Matthias from our Tradimo Premium team will design a learning plan tailored to you that gives you access to new courses and live webinars every month as well as priority private email support.

Order our Tradimo Premium Service now

Backtesting is not exact

There are practical factors that can affect the results of a backtest. Different brokers have different price feeds and spreads.

You should also be aware that there are other practical factors that can affect you results. First of all, different brokers have different price feeds and spreads. Using different brokers to test a strategy may produce different results.

Practical application will be different to backtesting results

There is also a difference between practicing a trading strategy and applying it in a real environment. In a live environment you are more likely to succumb to emotional influences. You are also likely to make mistakes or react more slowly when you are actually trading a strategy. You should be cautious as you will most likely not be able to execute trades as consistently as a robot does, or as well as you do in a practice environment.

Large position sizes can can change results

When trading with a very large account size, you may inadvertently move the price just by placing your order. This can give you slower execution or undesirable prices for your trades. Backtests do not take this into account.

When you have a small starting capital, you are limited in the amount of volume that you can trade. As your account size grows, you can trade with more volume and increase your risk to get larger returns.

However, when your account becomes very large, this can produce a unique set of problems. For a start, in certain markets where the liquidity is very thin, you can actually move the price of the asset simply by placing your order.

This may give you slower execution speeds or you may not be able to get the exact price that you want. Using backtesting software over historical data will not take these factors into account, whereas in a live environment, they will be inherently present.

Backtesting is a means of deciding whether a strategy is worth pursuing or not

On the whole, backtesting using software can be very useful. Although it cannot generate a concrete conclusion as to how much you can increase your account by, or how much you can make in the future, it can give you a good basis as to whether your strategy will work or not.

By testing your strategy out over a longer period of time, you get a larger sample size and this makes the testing environment more accurate, leaving you to feel confident that the underlying principles that you built a strategy on, hold up over a longer period of time.

Summary

So far you have learned that...

  • ... if you are looking to trade over a longer term, you can make use of software so that you do not have to wait for months before you can decide if a strategy is worth pursuing.
  • ... there are two different types of software that you can use: backtesting software and automated robots.
  • ... backtesting software allows you to use historical market data by rewinding it back and trade as if you are trading live. You can speed up the price action and trade through weeks of data in a short space of time.
  • ... a trading robot, such as an expert advisor can automatically trade through historical data allowing you to see what your results would have been like.
  • ... when using automated backtesting software, there are a number of considerations that you have to bear in mind.
  • ... the idea is not to see how much you could potentially grow your account by, or how much you can make per month as you will never be able to know what will happens in the markets. Rather you should use the results to see if the principles of the strategy hold for different asset or market conditions.
  • ... you should avoid curve fitting – optimising your strategy to achieve maximum performance based on past results.
  • ... there are external factors that can influence your backtesting results, such as price feeds from a broker or the difference in spreads between brokers.
  • ... applying a strategy to the markets is very different to backtesting a strategy. You are more likely to come under emotional influences or make mistakes when trading in a real environment.
  • ... when your account becomes too large, you can actually move the price of the asset, just by placing your order. This may result in slower execution and undesirable prices that would not be factored into your backtesting.
  • ... backtesting should not be used to find concrete evidence of returns, but rather used to decide whether a strategy is worth pursing in a live environment.

What next?

Visit our forum:

Looking for a Top Broker? Sign up through Tradimo & get extra benefits!

eToro Plus500 Markets.com FXFlat

See all top brokers


  • Are there any guides on tradimo on forex tester? Having one would be a good idea.
  • Hi pockettones,

    At present there is no guide on Forex Tester specific to tradimo.

    However, you can check out everything on how to use it on the Forex Tester website:
    http://www.forextester.com/installation.html

    There is quite a bit of information there on the different aspects.

    Might be an idea to look into, but for now please feel free to check the link above out.

    Let us know if we can help with anything else.
    Emma
  • Hi Pockettones,
    When you are in the trading room i can also take you through its features during a screen share session, just let me know when you are available.
    Regards.
    Peter
  • I'm available 8:00 - 13:00 LDN time
  • Ok i can show you around tomorrow morning if that's okay after Jack's session.
  • “Things always become obvious after the fact”
    ― Nassim Nicholas Taleb

    p.s. Backtesting is worthless. Big waste of time.
  • Hi Fxjurij,
    so how do you establish whether your trading concept makes sense in the first place? Do you trust forward testing?
  • When you are backtesting you are trading historical data not knowing the price action in advance. You could look it up, but that would defeat the purpose. If you are using recent data say within a few years, the market would be similar to it is now. Should give you a general idea of how your strategy will perform. Its also a lot more efficient than trading a demo because you can fast forward time.
  • I taking no shortcuts when I test some ideas. I go on market and execute the trade. Simple like that. Why hurry!? What's the point of instant false security in concept derived by backtesting? Overall you spent more time (focusing on wrong things). Market is here and now!!
  • if you are doing scalping or intraday trading that will work, it will take longer as long as you don't mind that. Otherwise if you are trading over a longer period of time, like holding trades for a few weeks, backtesting is invaluable. And its not really a shortcut, you get just as much experience backtesting, its just a more concentrated learning experience with the fast forward function. More trades per hour.
  • What if the strategy is useless from the start? It's not about being in a hurry, but making sure your time is spent wisely. No point forward testing a strategy that isn't even profitable to begin with, at least with backtesting there is proof it works.

    If the backtest works out well, forward test to really prove that it works in current market conditions. Besides, for all you know your strategy may just completely fail next month, whether it was built via forward testing or backtesting (doing both is best).
  • fxjurij:
    I go on market and execute the trade. Simple like that. Why hurry!? What's the point of instant false security in concept derived by backtesting? Overall you spent more time (focusing on wrong things). Market is here and now!!

    One can argue real time trading and testing is nothing but backtesting from a future point of view. If you say you cannot derive conclusions from past performance from early 2000s to current situation one can say your current results will mean nothing in 2020. Why do you think current performance has more significance for the future than past performance for the present? Not arguing just for curiosity's sake.
  • @hindsighthero - my present trade is important just in present. Tomorro I will evaluate market all over again and base future trading decision irrespective of my last trade. However, I say last time that backtesting is waste of time fo ME because:
    -Neglect correlation of trading concept with market condition (result are misleading)
    -Backtests are mostly ran on imperfect data (MT4 history data has gaps)
    -Shift traders focus on static trading concept rather on dynamic.
    On another hand, go and backtest if you find your edge out of it. I dont, respect that! I am off!!

    hindsighthero:
    fxjurij:
    I go on market and execute the trade. Simple like that. Why hurry!? What's the point of instant false security in concept derived by backtesting? Overall you spent more time (focusing on wrong things). Market is here and now!!

    One can argue real time trading and testing is nothing but backtesting from a future point of view. If you say you cannot derive conclusions from past performance from early 2000s to current situation one can say your current results will mean nothing in 2020. Why do you think current performance has more significance for the future than past performance for the present? Not arguing just for curiosity's sake.
  • hindsighthero: Not arguing just for curiosity's sake.

    I like talking to traders and get to know to their thinking. No way did i want to disrespect you, i am sorry if you feel that way. I do apologize. I hope you'll come back and participate in future discussions. We'll have an open day tomorrow please feel free to come and check out our live trading and take part in our prize raffles! smile
  • Backtesting is a means of deciding whether a strategy is worth pursuing or not
    but...
    Past performance is not indicative of future results. You will never know how much you will make in the markets or what kind of performance you can achieve each month.

    The article itself says backtesting with forex tester is meaningless.

    However

    I like this one:
    When backtesting a trading strategy, do not focus on what kind of performance it has achieved in the past, but rather focus on whether the principles of the strategy hold up for certain asset classes.

    We have to study, develop and define such principles. Not sure if it's even possible, since nobody actually does it(except Elliott, hehe). Anyway something being impossible never stopped humans trying, so I'll be spending my spare time solving this problem. Hope you guys work on this part of your trading strategies too and share thoughts and results in the forum.
  • novelsound:
    Past performance is not indicative of future results.

    When backtesting a trading strategy, do not focus on what kind of performance it has achieved in the past, but rather focus on whether the principles of the strategy hold up for certain asset classes.

    I find it hard to see the difference between the 2 statements. smile A strategy and its principles manifest themselves in only one way a trader is really interested in and that is performance. The question whether the principles hold up or not is just another way of expressing whether past performance is anything we can expect in the future. There are two ways of finding out whether principles hold up or not: either by experience or a priori. Trading and developing a strategy is an experimental endeavor therefore we cannot gain any knowledge about our expectations or sustainability of some principles but by looking at price history and drawing conclusions how we would have performed had we been trading those particular times. Feel free to disagree wink
  • I would agree, if we assume it's possible to measure the effect of a certain principle or strategy. I believe that's not possible. Our trades are based on principles we assume, but they cannot be scientifically measured by price and time. I think that's quite obvious from technical analysis theory: Price in time reflect all the information in the market, but a trading strategy can only be based on a tiny fraction of this info.

    We can use inflation as a trading principle, but we can't measure the effect of inflation alone on the value of a currency. We don't even know what time frame to measure.
    We can use a "triangle or a flag formations always break in the direction of the prior trend" as a principle, but we can't really measure that one either, because identifying a triangle or a flag is subjective and we can't possible know it we're correctly identifying these formations beforehand(or even after).

    Price and time contains all the information, but it's way beyond the comprehensive capabilities of our human brains(or computers). Luckily our brains have evolved to deal with complex system by using abstract ideas and constructing models. I believe we should use the instruments nature "gave" us, instead of trying to measure stuff even if it's not possible to do so.
  • I think , in my opinion
    Forextester not only for test strategy , I think it is good for training , spending time daily on forextester it helps someone draw support and resistance , trend line better , identify chart pattern , candlestick etc
    Doing that make someone gain experience in technical analysis in short time
    While doing demo account , someone can apply these technical and combine it with real time like having important reports so someone take cautious or having important news etc

Register Now - It's free!

By clicking on the "Get instant access" button, you agree that you have read, understood, and accepted the Terms & Conditions.
Or