Backtesting is a term used in oceanography, meteorology and the financial industry to refer to testing a predictive model using existing historic data. Backtesting is a kind of retrodiction, and a special type of cross-validation applied to time series data. In a trading strategy, investment strategy or risk modeling, backtesting seeks to estimate the performance of a strategy or model if it had been employed during a past period. This requires simulating past conditions with sufficient detail, making one limitation of backtesting the need for detailed historical data.
Backtesting has historically only been performed by large institutions and professional money managers due to the expense of obtaining and using detailed data sets. However, backtrading is increasingly used on a wider basis and independent web-based backtesting platforms have emerged. Backtesting, like any other modeling is limited by potential overfitting. This means that it is often possible to find a strategy that would have worked well in the past, but will not work well in the future.
Backtesting is the process of testing a trading strategy on relevant historical data to ensure its viability before the trader risks any actual capital. A trader can simulate the trading of a strategy over an appropriate period of time and analyze the results for the levels of profitability and risk. If the results meet the necessary criteria that are acceptable to the trader, the strategy can then be implemented with some degree of confidence that will result in profits. If the results are less favorable, the strategy can be modified, adjusted and optimized to achieve the desired results, or it can be completely scrapped.
That price patterns repeat themselves is a basic principle of technical analysis. By interpreting this principle to imply that the past performance of a trading strategy can guarantee or at least validate its returns in future markets, backtesting aims to weed out the less profitable tools and filter the most promising ones to be used in trading. But while it is popular, backtesting is made a questionable tool by the chaotic, and constantly changing nature of the markets. Not only does the quote change, but even the rules that define the quote also change, ensuring that a method valid today may not be very useful after the passage of a short while.
The belief that backtesting can help identify strategies with potential is common, but it is unsubstantiated by evidence or experience. The best way of testing a strategy is by testing its actual performance, which means that we should evaluate the actual gains and losses registered by using it, instead of hypothetical successes and failures in past situations. As long as the sums that are used for this purpose are small and leverage is sensible, the losses that may result are affordable, and even advisable as part of the learning process: a trader must surely learn how to lose, if he plans to have any chance of making profits.