This website uses cookies and is meant for marketing purposes only.
Please leave a message and we will get back to you.
SendIdeally, before we enter into any situation in life, we’d thoroughly test our planned approach to it in order to flush out all the misunderstandings, biases, and prejudices that may skew our judgement and spoil the end result. While this may be impractical in many parts of life, there’s one arena where it’s very possible indeed and even advisable: financial trading. Yes, you developed your trading strategy with painstaking effort and you’re rightfully proud of it. But, before you take it out to your online trading platform and apply it, why not backtest it first to see how it would have fared under historical market conditions? After all, nobody fights their first backtesting strategies judo match in the Olympics. Long before that, one spends months in training with opponents of various skill levels until his tactics are perfected.
Backtesting your trading strategies can turn them into finely tuned pieces of machinery you can take out to employ with poise and confidence in the financial markets. This doesn’t mean that, once your strategy has gone through backtesting, the financial world will immediately become your oyster: Market conditions are always changing, and so must your strategy in order to keep up with them. What worked in the past will not necessarily work in the present or the future. However, what history can offer us is a useful guide in effectively approaching new conditions when they arise. In this article, we’ll explain the benefits that backtesting can bring to your trading strategy, but also the benefits it cannot.
You have a big job interview, and you want to do your best to give a good impression. Your plan is to begin the meeting by complimenting the interviewer on his tie, but, before deciding on this course of action, you consult a friend who was once interviewed by the same man. The friend remembers that, during his own interview, he complimented the interviewer’s jacket and that this pleased the man greatly. The meeting ended well for your friend, who was offered the job. The evidence seems to suggest your plan is a good one.
“Still”, you consider, “Maybe the interviewer was simply in a good mood on the day of my friend’s interview but, in general, hates being complimented on his clothes. Alternatively, it might be true he enjoys praise relating to his jackets, but not to his ties.” You go out and consult another applicant about his own experience with the same interviewer. From him, you learn that the gentleman did enjoy it when his tie was admired on at least one other occasion, and this was on a day when his mood happened to be sour.
Finally confident in your approach, you go into your meeting with a big smile on your face. Before anything else can be said, you lavish compliments on the good taste of your interviewer’s tie, but you notice he shoots you back a skeptical glance. When your eyes focus in on him, you begin to understand the reason: His tie is splattered with a large coffee stain.
The analogy above demonstrates what backtesting trading strategies actually accomplishes. You start with a strategy in your hands that looks good on paper but may not work in the heat of real, live markets. In order to test out its mettle, you could check how it would have performed in the context of some other historical market. (This is that first friend you consulted about the tie.) If you plug your plan into the market conditions of late 1999, for instance, and see it would have succeeded, you have made a start. However, this doesn’t mean the plan would be a hit today, or in any other time, especially since 1999 was a year of unusual stock market exuberance.
To overcome this problem, you would have to test your strategy on a variety of market conditions, including bear markets, (represented by the second applicant you consulted). If, indeed, it remains effective even in all these different environments, you will have a lot more reason to believe in it. Still, (as per the punchline in the analogy above), you won’t know your plan will work out well in today’s markets because they are always, by definition, unique.
The conclusion from all this is not that you should throw up your hands and give up on backtesting your strategies altogether. On the contrary, the more you “kick the tires” of your trading strategy under different market conditions, the more likely you are to finetune it to perfection and end up with something really powerful in your hands. The point is that no matter how much you do so, you can never be certain of the results you’ll get when you apply them in real time. But there’s another point to be made too.
Professional traders, and even automated trading bots, tend to develop their trading strategies through backtesting various ideas on historical data. This means they experiment with different inputs for technical indicators (like moving averages and momentum indicators) in a particular market context and observe how they would have panned out in that situation. Now, when the work is done and their product (the strategy), is ready to go, it wouldn’t make sense to test it under the same market conditions – called in-sample data – used in developing the strategy. This would be circular logic since, in fact, the only circumstances under which we know the plan works are those ones!
Rather, what the experts would do is plug their strategies into a fixed and totally separate set of market conditions, which we call out-of-sample data. They know they can’t pick and choose this data as they please because that would be to their detriment. If all the samples were chosen because they resemble the successful in-sample set, the results would likely be a big false positive. What would be useful is a broad, indiscriminate set of data from past markets, including data for companies that ended up becoming insolvent. After all, many of today’s flourishing companies are destined to do the same, but we’ll only know in hindsight, later on, which ones they are.
To take this a step further: Each set of results from your backtesting should be viewed, not as a random piece of data that either confirms or contradicts your strategy, but as the offspring of the particular context in which it was born. Then, it becomes possible to gauge which data sets are most relevant for you right now: namely, those arising from contexts that most closely resemble present market conditions, and those that relate to the types of stocks you’re interested in trading.
We might wonder if there is anything the poor interviewee could have done to avoid the embarrassing failure that eventually came his way in our story above. Well, yes there is: He could have looked around the room to assess the situation of the interview in real time. If he had, that stained tie would surely not have escaped his attention. Similarly when it comes to making your post-backtesting preparations for trading: Look around at the market conditions that are holding sway today.
Practically, this means running your strategy in the live market conditions of today to see how it holds up. You can do this without laying any money on the line, using a technique known as paper trading. This entails documenting exactly when you would have entered and exited a trade in today’s market, and also the gains and losses you would have incurred if you had done so.
The superior way of going about this is with the use of specialized software which allows you to trade from a demo account in live market conditions. Many trading platforms offer this useful tool, and it can be of incomparable value. Those who trade from a demo account receive live signals on price movements just like real traders on the markets, choose their deal size and leverage levels, and close their deals when the time is right too. In this way, they can employ several variants of their strategies in order to see which succeeds the best. Even after your strategy succeeds in all these tests, however, remember there are no guarantees: The forces moving prices tomorrow won’t quite be the same as those that moved them today.
If you find there is a good correlation between your in-sample results, your out-of-sample results, and your paper trading results, you have come a long way in kicking the tires of your strategy, so congratulate yourself if it still holds up well. You are ready to take it out to the live markets and strut your stuff. As you do so, be willing to tweak it if the need should arise and, as we have mentioned, don’t lose sight of the details that make today unique. iFOREX offers their clients the use of a free demo account to test their strategies without any financial risk, so be sure to grab the opportunity and use it.
The materials contained on this document should not in any way be construed, either explicitly or implicitly, directly or indirectly, as investment advice, recommendation or suggestion of an investment strategy with respect to a financial instrument, in any manner whatsoever. Any indication of past performance or simulated past performance included in this document is not a reliable indicator of future results. For the full disclaimer click here.
Join iFOREX to get an education package and start taking advantage of market opportunities.