Decoded Intelligence Signal

Backtesting

advanced
strategy
4 min read
410 words

Published Last updated

Key Takeaway

Backtesting is the process of running a trading strategy's logic against historical price data to produce a statistical performance estimate before committing any real capital to live deployment.

Learn These First

What Is Backtesting?

Backtesting is the process of running a trading strategy's logic against historical price data to produce a statistical performance estimate before committing any real capital to live deployment.

How Backtesting Works

Backtesting is the third phase of the Algorithm Development Lifecycle — the evidence-generation step that answers the most critical pre-deployment question: has this strategy produced profitable results on historical data, and do those results meet the minimum quality thresholds required to justify live capital commitment? The backtesting process runs the bot's signal logic against a minimum of twelve months of historical OHLCV candles, recording every simulated entry and exit as if the trades had been executed at the prices available at signal time. These simulated trade records are compiled into a trades DataFrame, from which five key performance metrics are computed: win rate, profit factor, maximum drawdown, Sharpe ratio, and total trade count. Three systematic gaps separate backtested results from live results. Slippage is the first: real orders fill at slightly different prices than the signal price because markets move in the milliseconds between signal generation and order execution. Market impact is the second: large orders shift price against the trader during execution. Regime change is the third: a strategy that performed well in 2022 conditions may perform differently in 2024 if underlying market microstructure has changed. These gaps require backtested results to be interpreted conservatively. A strategy that barely passes minimum thresholds may fail in live trading due to real-world frictions. A strategy with strong backtest metrics confirmed by walk-forward validation provides meaningful positive evidence for genuine edge while acknowledging that live results will inevitably differ from simulated ones.

Frequently Asked Questions

What is backtesting and why is it required before live trading a bot?

Backtesting is running a trading bot's strategy logic against historical price data to simulate performance and compute statistical metrics. It is required before live trading because it is the primary pre-deployment evidence that the strategy has genuine edge — defined by the ADL's minimum thresholds of win rate ≥40%, profit factor ≥1.2, maximum drawdown ≤25%, and Sharpe ratio ≥0.5 across at least 100 simulated trades. A strategy that fails these thresholds in backtesting does not meet the evidence standard for live capital commitment under the Algorithm Development Lifecycle.

What is the difference between in-sample and out-of-sample backtesting?

In-sample backtesting tests a strategy against the historical data period used during strategy development and parameter selection. Out-of-sample backtesting tests the identical strategy — with no parameter changes — against a separate historical period not seen during development. The ADL requires walk-forward validation where the dataset is split: months 1–12 are in-sample for development and initial backtesting, months 13–18 are out-of-sample for final validation only. If out-of-sample performance is within 20% of in-sample performance, the strategy likely has genuine edge that generalises beyond the specific data it was designed on.

Why does a strong backtest result not guarantee strong live trading performance?

Three systematic gaps separate backtested from live performance. Slippage: real orders execute at slightly different prices than the signal price because markets move between signal generation and order submission, which backtesting assumes away with perfect fill pricing. Market impact: large orders shift price against the trader during execution, which backtesting ignores. Regime change: markets evolve, and strategies tested on one historical period may face different conditions in a new cycle. These gaps mean strong backtest metrics are necessary but not sufficient evidence for live deployment — paper trading provides the additional real-world validation layer.

Common Misconceptions About Backtesting

Common Misconception

A high win rate in backtesting confirms the strategy is profitable and ready for live trading.

Technical Reality

A high backtested win rate is neither necessary nor sufficient for live profitability. It is not necessary because a strategy with a 40% win rate at 1:1.5 risk-reward is mathematically profitable. It is not sufficient because high win rates in backtesting are a primary symptom of overfitting — a state where the strategy is tuned so specifically to historical patterns that it captures noise rather than genuine edge. Backtested win rates above 70% should prompt overfitting investigation rather than confidence. Walk-forward validation on out-of-sample data is the primary diagnostic for determining whether high win rates reflect real edge.

Common Misconception

Backtesting on more historical data always produces more reliable and accurate results.

Technical Reality

More data increases statistical trade count, improving metric confidence — but only if the data represents conditions relevant to current markets. Including a decade of historical data spanning multiple distinct regimes can dilute results: a strategy that performs well in trending markets appears less impressive when its backtest averages in years of sideways price action. The ADL's minimum of twelve months balances statistical significance with market relevance. Walk-forward validation on recent out-of-sample data provides stronger evidence of current edge than extending the backtest window indefinitely into distant historical market conditions.

Common Misconception

Backtesting results are accurate because they use real historical price data.

Technical Reality

Using real historical price data makes backtesting historically plausible under specific assumptions, not objectively accurate. The most critical assumption is perfect fill pricing: backtesting assumes trades execute exactly at candle close prices, which does not happen in live markets where slippage, spreads, and partial fills cause real execution prices to differ. Additionally, look-ahead bias errors in signal logic — where future data inadvertently influences past decisions — can be present even when using entirely real historical price data, requiring careful code review to detect and eliminate before trusting any performance metric output.

Related Terms

Compare Adjacent Terms

Access Pro Research Infrastructure

Deciphering Backtesting is just the first step. Apply for the Q3 2026 Beta to gain direct access to our 8-agent intelligence pipeline.