Backtesting software is a program used by computers to execute the results of entries and exits using technical indicators or price action on historical price data and shows the results. Backtesting software refers to applications, scripts and programs that run on a hardware device to check previous historical results of trading systems and strategies on market data. There are both downloadable backtesting software that must be run on a computer and also web based backtesting software that can be used online on a website.
What Does Backtesting Mean?
A backtest is a look back at how a quantified trading system would have performed in the past. While a profitable backtest does not guarantee that the same signals will make money in the future, if it did not work in the past it most likely will not work in the future either.
A good backtest does raise the probabilities that since it worked on past data it may work on future price action because the signals did navigate volatility to create bigger total profits compared with the losses. The principles of the trading system could be valid and what allowed for profitability if that is what the backtest shows.
Trading systems that create good risk/reward ratios with bigger wins than losses or a high winning percentage of trades with no huge losses will backtest as profitable. Most backtested systems attempt to capture trends in markets and limit losses by not being on the wrong side of a trend.
A backtest is usually done with backtesting software platform that has the historical data built in and the ability to enter signals and then test to see how they did. Some traders do use Excel spreadsheets to backtest their price action systems by downloading historical data. Backtesting should both create the quantification of an entry signal for when to get into a trade and also a stop loss signal for a losing trade to keep losses small. Also trailing stop signals can be used to maximize gains for the winning trades as part of the input process and technical profit targets can be used for optimal exits.
A stop loss in comparison to a hypothetical profit target does create a quantified risk/reward ratio. A risk/reward ratio along with a high enough win rate can create a profitable system as long as losses are kept small and position sizing is managed properly based on volatility and open risk. Backtest data can show you the risk/reward for historical trades, win rates, and losing streaks among other data.
A backtest of signals should be performed on a watchlist of stocks, ETFs, currencies, or commodities you plan to trade. Markets have different levels of volatility with trends and each should be backtested for validity of signals on historical data.
All a backtest is attempting to do is use repeatable mechanical signals that give profitable entry and exit dynamics to create bigger wins and smaller losses over the long term. The primary driver of a profitable backtest is by cutting losses short and letting winners run. A system must have signals that filter out a lot of the price action noise that causes over trading and instead signal the opportunities to capture trends and swings in price action.
Trading quantified mechanical backtested signals also filters out much of the emotion of trying to decide what to do each day from your own opinion and prediction. You change from an opinionated predictor to the follower of a systematic process. Your job becomes to follow signals and ignore your own feelings when you quantify your process.
There is no perfect backtested system there is just the system that you can confirm that worked over multiple markets in the past and has a great potential for working in the present and future. It has to be a process that makes sense that you can follow with discipline over the long term.
“The moral is simple: Don’t draw any conclusions about a system (or indicator) on the basis of isolated examples. The only way you can determine if a system has any value is by testing it (without benefit of hindsight) over an extended time period for a broad range of markets.” – Jack Schwager
How to do Backtesting
- Pick backtesting software to use.
- Select the time period you will be backtesting from beginning to end.
- Choose your chart type.
- Choose the time frame for the chart.
- Pick when your signal will be executed: immediately, at the close, or next open.
- Choose long signals only, short signals only, or both.
- Choose your parameters for entry signals.
- Choose your parameters for exit signals.
- Run backtest.
- Analyze results for risk and profitability.
- Ensure your backtest includes different types of market environments: uptrends, downtrends, sideways, and volatile.
- Backtest for a time frame you are available to take your signals in.
- The strategy must match your risk tolerance and potential return goals.
- Backtesting can also be followed up with real time forward testing before going live.
- Backtesting establishes the positive expectancy for your trading system.
Here is a example of backtesting the 5-day exponential moving average crossing over the 20-day exponential moving average as an entry signal and the 5-day exponential moving average crossing back under the 20-day exponential moving average as the exit signal on the Mosaic chart over the previous 7,000 candles using the TrendSpider.com Strategy Tester.
This is what the signal looks like when occurs on the chart.
For an example of backtesting software results example click here.
Backtesting Data courtesy of TrendSpider.com
To learn the basic principles of backtesting, check out my Backtesting 101 eCourse here. and how to backtest Moving Average Signals with my eCourse here with that name.