Backtesting and Forward Testing: The Importance of Correlation

Traders who are eager to try a trading idea in a live market often make the mistake of relying entirely on backtesting results to determine whether the system will be profitable. While backtesting can provide traders with valuable information, it is often misleading, and it is only one part of the evaluation process.

Backtesting Basics

Backtesting refers to applying a trading system to historical data to verify how a system would have performed during the specified time period. Many of today’s trading platforms support backtesting. Traders can test ideas with a few keystrokes and gain insight into the effectiveness of an idea without risking funds in a trading account. Backtesting can evaluate simple ideas, such as how a moving average crossover would perform on historical data, or more complex systems with a variety of inputs and triggers.

As long as an idea can be quantified, it can be backtested. Some traders and investors may seek the expertise of a qualified programmer to develop the idea into a testable form. Typically, this involves a programmer coding the idea into the proprietary language hosted by the trading platform. The programmer can incorporate user-defined input variables that allow the trader to “tweak” the system. An example of this would be in the simple moving average crossover system noted above: The trader would be able to input (or change) the lengths of the two moving averages used in the system. The trader could backtest to determine which lengths of moving averages would have performed the best on the historical data.
Optimization Studies

Many trading platforms also allow for optimization studies. This entails entering a range for the specified input and letting the computer “do the math” to figure out what input would have performed the best. A multi-variable optimization can do the math for two or more variables to determine what combinations would have achieved the best outcome. For example, traders can tell the program which inputs they would like to add into their strategy; these would then be optimized to their ideal weights given the tested historical data.

Backtesting can be exciting in that an unprofitable system can often be magically transformed into a money-making machine with a few optimizations. Unfortunately, tweaking a system to achieve the greatest level of past profitability often leads to a system that will perform poorly in real trading. This over-optimization creates systems that look good on paper only.