Field Guide to Trading Terms

Backtesting


Family V · Platforms

Not to be confused with forward testing, demo account, trading simulator.

Backtesting is the reconstruction of a trading strategy's past behaviour by feeding its entry, exit and sizing rules through a historical price series. It produces a simulated trade list and derived statistics such as net profit, drawdown and win rate. The exercise is a feasibility check on a rule set, not evidence that the rule set will work in future conditions.

How a backtest is constructed

A backtest requires three inputs: a rule set precise enough to be executed mechanically, a price history covering the instruments and period tested, and assumptions about execution. The engine walks the data bar by bar or tick by tick, evaluates the rules at each step, and records fills.

Execution assumptions determine how realistic the output is. Common choices include:

Results are only comparable when these assumptions are stated alongside them.

Worked example

A simple moving-average crossover is tested on one instrument over 250 trading days, with a commission of 0.05% per side and slippage of one tick per fill.

BACKTEST OF A 20/50 CROSSOVER, 250 BARS
Gross profit on winning trades18 trades, average +1.40%+25.20%
Gross loss on losing trades22 trades, average -0.90%-19.80%
Costs40 fills x (0.05% + 0.02%)-2.80%
Net return before financing25.20 - 19.80 - 2.80+2.60%

Removing the cost line turns a marginal result into an apparently profitable one, which is why costs are reported separately.

Limitations

A backtest is a historical simulation, and its output is conditional on the data and assumptions used. Known failure modes include overfitting, where rules are tuned until they fit past noise; look-ahead bias, where a decision uses information not yet available at that bar; and survivorship bias, where only currently listed instruments are tested. Transaction costs, borrow availability and margin rules vary by broker and jurisdiction, so a backtest that omits them overstates returns. Out-of-sample testing and forward testing on live or paper data are used to check whether a result survives conditions the rules were not fitted to.

Often confused with

forward testing
Forward testing is the practice of running a trading strategy on live market data in real time, usually on a demo account, to evaluate its performance before committing real capital.
demo account
A demo account is a simulated trading account that uses virtual funds to replicate live market conditions, allowing users to practise order placement and platform features without risking real money.
trading simulator
A trading simulator is software that reproduces market data and order execution in a risk-free environment, allowing users to place hypothetical trades and track a virtual account balance without committing real capital.

See also