Glossary

Backtesting

Backtesting is applying a trading or investment strategy to historical market data to estimate how it would have performed in the past.

What Is Backtesting?

Backtesting is the process of applying a trading or investment strategy to historical data to see how it would have performed in the past. The strategy's rules, such as when to buy, when to sell, and how much to hold, are written out precisely. They are then run against years of past prices as if they were being traded in real time. The output is a simulated record of returns, losses, and trade counts.

How It Works

A typical backtest begins with a set of rules and a dataset, often daily prices. A computer program moves through each period in order. At every step, it applies the rules using only the information that would have been available at that moment, and it records each simulated trade. When the run finishes, the program summarizes the results. Common measures include total return, the largest peak-to-trough decline known as maximum drawdown, and risk-adjusted measures such as the Sharpe ratio.

Limitations

Backtests are useful but can be misleading. Common problems include:

  • Overfitting, where rules are tuned so closely to past data that they capture noise rather than a lasting pattern.
  • Look-ahead bias, where the test accidentally uses information that was not yet known at the time of a trade.
  • Survivorship bias, where the dataset includes only companies that still exist and leaves out those that failed.
  • Ignored costs, such as commissions and slippage, which reduce real-world returns.

A strong historical result does not guarantee future performance, because market conditions change.

Why It Matters to Investors

Backtesting lets an investor see how an idea behaved across different conditions, such as rising markets, downturns, and periods of high volatility, before committing money. It is a tool for evaluation and learning, not a forecast. Understanding its assumptions helps readers interpret reported results with appropriate caution.

Updated October 16, 2026. For general education only; not financial, tax or legal advice.

Browse the Glossary

Related Terms