Trading glossary

Backtesting

Backtesting applies a trading strategy to historical data to see how it would have behaved. Learn how it works, its value, and why past results are not promises.

What backtesting is

Backtesting runs a defined set of trading rules against historical price data to see how the approach would have performed if it had been followed over that period. The output usually includes hypothetical entries, exits, and summary statistics. Backtesting is a research method for studying a strategy's past behavior, not a forecast of how it will perform in live markets.

Why traders backtest

Traders backtest to examine whether a strategy's logic holds up across different market conditions before committing attention to it. A test can reveal how a rule set handled trends, ranges, and volatile periods, and it can expose weaknesses in the logic. Many traders pair backtesting with paper trading to observe a strategy in current conditions without risking capital.

Limits of backtesting

Backtests can be misleading when rules are tuned too closely to past data, a problem called overfitting, which often produces strong historical results that do not repeat. Data quality, fees, and slippage also affect accuracy. Past performance does not indicate future results, and backtesting is informational rather than personalized advice; live trading still carries the risk of loss of capital.

FAQ

Does a good backtest mean a strategy will be profitable?

No. A backtest only shows hypothetical past behavior. Markets change, and strong historical results can come from overfitting, so past performance does not indicate future outcomes.

What is overfitting in backtesting?

Overfitting happens when a strategy is tuned so tightly to historical data that it captures noise rather than a durable pattern. Such strategies often look excellent in tests but fail in live conditions.

How is backtesting different from paper trading?

Backtesting studies a strategy against past data, while paper trading simulates a strategy in current market conditions in real time without risking real money.

Explore more