University

Handbook > Analysis

Strategy backtesting

Strategy backtesting is the process of testing a strategy’s performance with historical, quantifiable data. Backtesting provides insights into a strategy’s effectiveness in multiple market conditions and the opportunity to compare historical results relative to a benchmark.

Backtesting is foundational in strategy development. Backtesting requires you to define specific parameters to observe the historical performance of a strategy.

Backtests utilize quantifiable criteria, including a strategy’s entry, exit, and position sizing to simulate trading performance for a specified period using historical price data. 

When creating a trading system, a number of decisions must be made to filter and optimize returns. It is important to define the key inputs of a trading system so that you can test multiple versions of the system by modifying the inputs. Backtesting enables you to observe the results of multiple variables.

Trading systems can be discretionary or non-discretionary and mechanical or non-mechanical. However, strategy backtesting requires defined entry and exit criteria and is most frequently used to test non-discretionary, mechanical systems.

Backtest Results

Backtests typically provide a performance summary of a system’s historical results. These summaries include key strategy performance metrics such as starting portfolio value, ending portfolio value, winning trades, losing trades, profit factor, annualized performance, maximum drawdown, Sharpe ratio, CAGR, average trade duration, maximum consecutive wins and losses, and more.

While past performance is not indicative of future returns, backtest results provide a framework for a system’s historical performance throughout different market conditions.

Sequencing of returns should be considered. While it may be helpful to know how well a strategy can perform, it is equally important to know what a typical losing period looks like and whether you are willing to withstand a significant drawdown during a strategy's lifetime.

Backtesting allows you to assess a strategy's volatility and range of outcomes to determine if it is suitable for you. Knowing the worst-case scenario of a strategy’s past performance can provide confidence when an inevitable losing streak occurs.

Multiple software applications and services are available to backtest trading strategies, including simple spreadsheets and graphs. It is important to have reliable historical data to accurately test a system’s performance. 

While reliable, clean historical data may seem easy to find, ensuring the data used in the backtest is similar to the data used when live trading the system is important. 

Backtests should cover a long enough time period to assess the system’s performance across different market conditions.

Tailoring Your Backtest

Strategies should be customized to fit your lifestyle and mental models. Even if a strategy has strong historical performance, it may not suit your investment style, availability, time frame, or biases. 

Investors should tailor their strategy to their desired performance metrics. One investor may prefer a high win rate, while another investor prioritizes the smallest drawdown. The same entry and exit criteria can have significantly different long-term results by varying allocation or position sizing.