Skip to content
Quantbeginner
FIXED RULES
HISTORICAL BARS
SIMULATED TRADES
REALISTIC COSTS

Backtest

Running a fixed set of trading rules over historical data to see how they would have performed — a test of the rules, not a forecast of future returns.

Also called Backtesting · Historical Simulation

A backtest replays historical prices through a strategy's rules, bar by bar, and records every trade those rules would have taken. The output is a simulated trade list, an equity curve, and the usual statistics: expectancy, win rate, profit factor, maximum drawdown, Sharpe ratio.

A backtest is only as honest as its assumptions. It must use only data that was available at each decision point (no look-ahead bias), include instruments that were later delisted (no survivorship bias), and charge realistic commissions and slippage. Every rule tweaked after seeing the results makes the backtest look better and predict worse — that is overfitting.

Treat a good backtest as permission to keep testing, not as proof of edge. The next steps are out-of-sample data the rules have never seen, then small live size.

On the desk

A moving-average crossover on daily S&P 500 data from 2010 to 2020 shows 140 trades, a 41% win rate and +0.3R expectancy. Re-run with $5 commission and one tick of slippage per side, expectancy drops to +0.12R — still positive, but the edge is far thinner than the first run suggested.

Related terms