What is a Backtest?
Why traders simulate strategies on historical data, what backtesting proves, and what it doesn't.
What is a Backtest?
A backtest is a simulation. You take a trading strategy -- a set of rules for when to buy and when to sell -- and run it against historical price data to see how it would have performed. No real money is involved. The market data already happened, so the backtest replays your strategy over that recorded history, candle by candle, and tracks the results.
Think of it like testing a weather forecasting model against last year's data. The weather already happened -- your model cannot change it. You are just measuring whether your rules would have predicted rain on the right days. The data is fixed, and your strategy is an observer reacting to it.
Why Backtest at All?
Every strategy sounds reasonable in the abstract. "Buy when RSI drops below 30, sell when it crosses above 70" seems logical -- but does it actually make money on the asset and timeframe you plan to trade? Backtesting gives you a concrete answer instead of a guess.
A backtest produces real numbers: total return, max drawdown, win rate, Sharpe ratio, and dozens of other metrics. These numbers let you compare strategies objectively rather than relying on intuition or cherry-picked examples.
What a Backtest Proves
A well-run backtest can answer several concrete questions:
What a Backtest Does Not Prove
There are important things a backtest cannot tell you, no matter how good the results look:
It does not guarantee future performance
Past results are just that -- past. Market conditions change. A strategy that captured a specific trend might not work when the market enters a different phase. A backtest describes what happened, not what will happen.
It does not capture every real-world cost
Backtests simulate spreads, commissions, and slippage based on the settings you configure, but real markets can behave differently. Liquidity dries up, spreads widen during volatility, and order fills are not always at the exact price you expect. The closer your cost settings match reality, the more useful the results.
It does not account for human behavior
In a backtest, every signal is followed mechanically. In real trading, fear and greed interfere. You might close a winning position early or hold a losing one too long. A backtest shows what happens when the rules are followed perfectly -- not what happens when a person follows them.
Anatomy of a Backtest
Every backtest has the same basic ingredients:
The backtesting engine takes these inputs, steps through the historical data candle by candle, applies your rules, and produces an equity curve and a full set of performance metrics. For a closer look at what happens during that candle-by-candle process, see How the Simulation Works.
When Results Look Unusually Strong
Backtest results that show very high returns with very small drawdowns are worth examining closely. There are a few common reasons results can appear stronger than they are:
Where to Go Next
How the Simulation Works -- understand the candle-by-candle execution loop that powers every backtest.
Limitations & Pitfalls -- the biases and traps that make backtest results misleading if you are not careful.
Timeframes & Data -- how your choice of candle interval and date range shapes the results.
Entry & Exit Conditions -- how signals, crossovers, and logic operators define a strategy.
Your First Backtest -- a hands-on walkthrough if you have not run one yet.