We use cookies to run essential site features, understand how visitors use AutoEdges, and — if you allow it — show relevant ads. See our Cookie Policy for details.
Backtesting means applying a trading strategy's exact rules to historical price data to see how it would have performed in the past, without risking real money. It's a way to gather evidence about whether a strategy has a genuine statistical edge before committing capital to it live — a strategy that loses money consistently when backtested is extremely unlikely to suddenly become profitable once real money and real emotions are involved.
A meaningful backtest requires the same discipline as the strategy itself: clearly defined, unambiguous entry and exit rules (vague rules can't be tested objectively), a large enough sample of historical trades to draw a reasonable conclusion (a handful of trades proves very little), and data that covers a range of different market conditions — trending, ranging, high volatility, low volatility — rather than a conveniently favorable period alone.
Optimization means adjusting a strategy's parameters (which moving average length, which stop-loss distance) to improve its backtested results. Used carefully, this can genuinely refine a strategy — but it carries a well-known risk called overfitting, where a strategy is tuned so precisely to fit the quirks of one specific historical dataset that it no longer reflects a real, repeatable edge, and performs far worse on new, unseen data going forward. A warning sign of overfitting is a strategy with a large number of finely-tuned parameters that happens to backtest almost perfectly on one dataset.
A common safeguard against overfitting is testing a strategy on one segment of historical data (in-sample), then checking its performance on a separate, later segment it wasn't tuned on (out-of-sample) — a strategy that only performs well on the data it was optimized against, and falls apart on unseen data, is a strong signal the "edge" was an illusion of overfitting rather than a genuine pattern likely to repeat.
This lesson is free — no purchase needed to keep learning.