Backtesting is one of the most important and necessary processes you need to use when developing your own trading system. Despite this, most traders rarely backtest their strategies.
Let’s face it, no one has fun backtesting. Ask any trader about their level of excitement when they start to backtest a trading strategy and most of them will reply something along the lines of “truly low”.
- So what exactly is backtesting?
- How can backtesting help me?
- How long should you backtest for?
- Create your trading plan first
- How to go about backtesting
- Do professional traders really backtest trading strategies?
- Backtesting software
- Start backtesting for free
- How to backtest like a pro
- How do I analyze my backtesting results?
While this may be true, by testing your system, it will reveal how your trading plan will perform in various market conditions, and answer the all most important question any trader wants to know: Is my trading system profitable?
Backtesting is a great method to indicate whether a particular trading strategy is profitable or notTweet
Over the past few months, I’ve tried several ways to backtest my trading strategies and I wanted to show you how you can go about testing your own system!
If you are new to trading you may want to have a read of my previous article on why trading is nothing like gambling.
So what exactly is backtesting?
Before I begin, let’s make sure you understand the meaning of backtesting.
There are many definitions over the Internet, however, here’s my definition of it:
Backtesting is the process of testing a current trading strategy against historical data. If we can establish that the strategy worked well historically then it is likely to continue to do so in the future.
Of course, market conditions can change, but for now, just think of backtesting as a way to have a reasonable level of certainty that your trading strategy will be profitable over time in the near future.
How can backtesting help me?
You might be wondering, “Why do I even want to backtest my strategy?”
I’ll admit, I initially thought the same thing.
I just wanted to jump right into a demo account. Backtesting, who has time for that?!
I was wrong and here’s why…
Backtesting your strategy reveals whether you actually have an edge in the market without risking any of your hard-earned money.
If your trading system has been shown to perform over time, it gives you the confidence to stick to your plan— while other traders doubt themselves and their strategy in drawdown periods you know your plan has stood the test of time.
How long should you backtest for?
A common time frame used by seasoned traders for backtesting is from 2000 to present. Testing over a longer period of time like this allows you to see how the strategy performs during different market conditions.
The longer the period you test the more accurate your data is that you have, therefore, resulting in a more realistic performance of your system.
For example, if you test a trend following system in a trending market, then of course it will do well! But you you also test your system in a choppy market, then you get a much better idea of how much money it will lose.
By observing its behavior through both bearish and bullish markets so you get a fuller picture of its effectiveness.
Makes sense, right?
Create your trading plan first
Before you backtest any trading strategy, you must have a trading plan (a set of rules that guides your trading decisions).
Because you don’t want to look at a chart and wonder, “Should I enter a trade now? Where should my stop loss be? How do I exit my winning trades?”
This ruins your backtest and you’ll have inaccurate results. You need to set up your trading plan ahead of time, and strongly stick to the plan otherwise the backtest will be a waste of your time.
A good place to start when creating your trading plan is by answering these 7 questions…
- What are the conditions of your trading setup?
- How much are you willing to risk per trade?
- Which time frame are you trading?
- Which markets are you trading?
- What is your entry trigger?
- Where is your stop loss?
- How will you exit your winners?
Once you’ve developed your trading plan, then you’re ready to backtest your trading strategy.
How to go about backtesting
There are two ways a trader can backtest their system. The first one involves either creating a script that will do the backtesting for you. If you enjoy and/or are good at coding, this might be a good option for you. Alternatively, you can purchase backtesting software where you can pause, rewind and fast-forward historical data so you can place trades if you were trading in real-time.
The other option consists of manual backtesting, by which you go through the charts yourself and place the trades. Each have their pros and cons. I’ve broken them down for you below:
- It’s very time efficient
- Can be really simple if you are good at coding
- Remove the emotions from trading
- Trading system can be easily transferable to your chosen trading platform
- There is no guarantee that your system will work in live testing. It will have to be forward tested
- It may cost you money if you purchase any automated backtesting software or pay for a coder to code your trading plan for you
- You will need to still check your system on a regular basis. Is the technology still working? Do you no longer have an edge over the markets?
- You have to understand coding
- Not all trading systems can be 100% properly translated into an automated system
- Anyone can do it
- You get a better understanding of your trade setup
- No upfront costs
- You will learn more about the markets and your system by going through it step by step than by having an automated program do it all for you
- It can be time consuming
- There is no guarantee that your system will work in live testing. It will have to be forward tested
- There is a temptation to cheat by skipping ahead and looking at the data and adjusting your strategy accordingly. Automation makes this impossible
Do professional traders really backtest trading strategies?
They sure do, yes.
Okay, picture yourself as the owner of a tennis coaching business for wealthy middle-agers and/or early retirees.
You wouldn’t start offering your service without knowing how many people actually play or want to play tennis in your target neighborhood, or even whether there are any tennis courts in that location the first place, right?
What if you started up and it turns out all of your target market loves golf instead? You would have known that if you had just carried out some simple market research.
Likewise, the same goes with your trading business.
I see so many traders skip backtesting and wonder why they can’t seem to make money in the markets. They make the mistake of entering into the markets completely blind, with no research to back up their strategies.
Going into the markets blind is like starting a tennis coaching service in a golf-obsessed town…it’s not going to turn out well!Tweet
It is for that reason that you have to treat your trading career as a business. You are the owner of that trading business, and as a result you have to test your trading plan before you approach the live markets and operate your live business.
Businesses owners can only do so much market research before taking the plunge, and their budget may mean they can only do a small amount.
Whereas even just a lone trader can get large amount of empirical data to test their market hypotheses for comparatively little cost.
It is for this reason that starting a trading career can have many advantages over starting your own business.
If you backtest properly you know with a much higher level of certainty if a strategy is going to work or not when compared to knowing whether launching your own products or services will take off.
Firstly, let me start by saying that the easiest way to go about backtesting is to use some sort of software. There are many out there, however Forex Tester 3 is one I have personally used.
Another, is Soft FX Forex Simulator. Both will allow you to simulate the forex market and will speed up the process of backtesting so you can test and refine your plan and become an experienced and successful trader in less time!
I’ve not used Soft FX Forex Simulator myself, so head to their website to find out more information about their software here.
I’m not going to explain how to use Forex Tester (they have great instructions on their website), but I will outline some of the benefits and downsides of using it below:
- No coding required
- More historical data to work with
- Pause and rewind testing at any point
- Test manual trading strategies in a fast and easy way
- You can apply multiple timeframes in your backtesting
- It tracks your trading results whenever a trade is closed
- Great customer support and helpful training documents
- It’s a paid program
- It’s only for Forex markets and nothing else
- It is tedious (but not as bad as manual backtesting)
- You may suffer from look ahead bias that will lead to inaccurate results and not make you place trades as if you were trading in real-time
Grab your copy of Forex Tester
If you would like to read more about Forex Tester and how it can speed up your backtesting process, please click this link.
They offer a 30-day money back guarantee. This is something that I was drawn to when purchasing Forex Tester. I had not bought any backtesting software before, so I was a tad anxious about trying it. It is safe to say I have not regretted my decision and I would definitely recommend you to try it.
If you want to take advantage of the 10% discount that I have worked out for The Minimal Trader readers, use this coupon.
Unfortunately for those of you using a Mac, this software only is only available on PC. But fear not, there are plenty of alternatives.
You can actually use any trading platform (such as TradingView, MetaTrader, etc.) to backtest manually.
The only thing you need to do is scroll back in time and hide all future price movements (no cheating now!) and advance forward manually as if you were trading in real-time.
Ain’t nobody got time for that
Now, you may be thinking “I haven’t got time for that”.
Well, to put it bluntly, you need to make time for it. As eluded to above, you cannot go into the markets blind and expect to make any money long term.
Just to give you an example, there are many types of trades in the markets (such as futures trading) where it is a zero sum game. What does that mean? It means that when someone make gains with their position, somebody else in the same market loses.
What does that mean for you?
It means thousands of seasoned traders are waiting to take inexperienced traders money. If I told you that you were about to enter into a trade against someone who has been trading successfully for over a decade, you would start to rethink entering your position immediately.
That’s why researching and backtesting your trading strategies is crucial. There won’t be anyone to tap you on the shoulder and say “Hey, you know that position you’ve taken? It would take a market shift not seen for over 30 years to be profitable”.
Whilst that maybe an extreme and arbitrary example, you get the point. If you haven’t backtested, you have no clue how markets usually behave or how specific stocks react to certain situations.
So sit down, brew up a large pot of coffee (you’ll notice I love coffee) and get to it. Backtest, backtest again, and backtest once more!
I have personally spent whole days just manual backtesting (before speeding the process up with software) and I want to show you the process below so you can kickstart your trading business.
Start backtesting for free
We live in a great time. Technology is getting both better and cheaper. So if you are on a limited budget, then I have some great news!
You can start your backtesting for free. I will show you how to start backtesting in TradingView. I use TradingView, because there are no setups required. The charting software is purely web-based.
Simply go to the site and start using their charts.
Sure there are other platforms you can use such as Metatrader 4, but you have to install it, which you may find you will run into trouble, especially if your computer is running on Mac or Linux.
So start with TradingView and see if it works for you.
How to backtest like a pro
To get started, setup a testing spreadsheet.
Don’t you worry, you can use the exact trading journal I use to track my trades when backtesting by clicking here.
Want to create your own? That’s fine, here are a few points you may want to keep track of:
- Entry Price
- Stop Loss
- Exit Price
- Running Balance
Once you have your spreadsheet up and ready start by opening up TradingView.
The idea is to “hide” future data and go through the chart bar by bar, and objectively trade the markets (as though it’s live).
You might be wondering: “How do I do that?”
- Go to TradingView and open the chart of the currency pair or stock on which you want to backtest your strategy, and scroll the chart to a previous period. This can be done by either dragging & dropping your mouse on the chart or by pressing the left arrow key on your keyboard or chart.
- Plot the necessary trading tools and indicators on your chart that make up part of your trading strategy.
- Grab your favourite hot beverage (mine being coffee!) and start hitting the right arrow on your keyboard to advance the chart candle-by-candle. Ask yourself if there’s any setup on your chart. If there is, record the results of the trade on your trading journal.
- If there isn’t, you’ll repeat the process until you find a possible trade setup again, after which you go back to Step 3.
Manual backtesting can be time-consuming, but I can assure you it’s the best way to feel how your trading strategy would work in various market conditions. If you backtest on a daily chart, 10 years’ worth of data has around 2500-3000 bars, and it’s perfectly possible to go through all of them in a few hours of work.
Just ask my wife how much coffee I get through whilst backtesting!
Coffee is your best friend when backtesting manually (trust me!)
Don’t be afraid of the amount of data you may get from backtesting, as mentioned previously, the more data you can collect, the more accurate the predicted performance of your system will be.
Okay, so now you done backtesting, you are now ready to analyze your results.
How do I analyze my backtesting results?
The method that you will use to analyze your backtesting data will really depend on what you used to backtest with.
Those of you that went with manual backtesting and also used my trading journal you are all good to go. If, however, you decided to use your own spreadsheet, I’m not helping you!
Here’s what I analyze when I am backtesting:
- Total trades
- Total wins
- Total losses
- Profit/loss %
- Win rate %
- Average Profit/loss
- Average profit (winners)
- Average profit (losers)
- Number of long trades (bull)
- Number of short trades (bear)
- Win rate % of long trades
- Win rate % of short trades
Whilst I am a tad nerdy when it comes to spreadsheets, you may choose to analyze in the same way as me, the choice is yours.
There are a few backtesting software packages out there, but since I recommend Forex Tester, I’ll show you how to analyze your trading results for that software.
You can export the data from Forex Tester and upload it straight to Trading Stats. I am a big fan of Trading Stats, a free web-based tool where you can upload your TradingView & Forex Tester data for analysis.
It will give you a ton of great information, including profit and loss by day of the week. The best part is that it is absolutely free.
- Create your own trading plans/strategies
- Choose your method of backtesting
- Backtest all strategies from at least 2000 onwards
- Create your own spreadsheet (or use my trading journal) to analyze your results
- Pick out the best performing strategies and begin to forward test them
If you want to be able to execute your trades with confidence and see if you have a trading plan with an edge over the markets, you need to start backtesting.
I hope this post has helped you out in your backtesting endeavors.
What backtesting method are you going to use? What results have you gotten from backtesting? What is your biggest challenge when it comes to backtesting? Leave a comment below and let me know your thoughts.