Backtesting, from first principles

Backtesting is how you estimate whether a trading rule has any edge — and it is the easiest thing in quantitative trading to get wrong. These pages build the foundation: what a backtest actually is and what it can and cannot prove, why so many backtests fail live, and the data, rules, execution assumptions and validation discipline that separate an honest test from a flattering fiction — grounded in how the Indian market (NSE, Nifty, F&O) works.

Backtesting Fundamentals: Backtesting is the process of simulating a fully-specified trading strategy on historical market data to estimate how it would have behaved, so you can study and falsify it before risking capital. An honest backtest needs clean point-in-time data, explicit rules, realistic execution assumptions and costs, a benchmark to beat, and out-of-sample validation. It is a hypothesis test that reduces uncertainty — never a prediction of future profit.

What is Backtesting?

Core concept

Backtesting is the process of simulating a fully specified trading strategy on historical market data to estimate how it would have behaved, so its e…

Why Backtesting Fails

Core concept

Backtesting fails when the reported result reflects fitting to historical noise, information leakage, biased data, ignored frictions or too few trade…

Historical Data

Data

Historical data is the recorded market information (prices, volumes, corporate actions and reference data) that a backtest replays, and its accuracy,…

Trading Rules

Core concept

Trading rules are the fully specified, unambiguous logic (entry, exit, position sizing, timing and edge-case handling) that a backtest engine execute…

Execution Assumptions

Realism

Execution assumptions are the modelled details of how orders actually reach the market in a backtest (fill prices, slippage, transaction costs, laten…

Data Quality

Data

Data quality is the degree to which backtest data is accurate, complete, consistently adjusted and point-in-time correct, and it sets the hard upper …

Benchmark Comparison

Evaluation

Benchmark comparison evaluates a strategy's performance relative to an appropriate reference such as a market index or risk-free rate, so that its re…

Validation Process

Validation

The validation process is the structured sequence of tests (out-of-sample evaluation, walk-forward analysis, parameter sensitivity, Monte Carlo resam…

Research Workflow

Process

The research workflow is the disciplined, repeatable pipeline that turns a trading idea into a deployed strategy (hypothesis, data preparation, rule …

Strategy Lifecycle

Core concept

The strategy lifecycle is the full arc a trading strategy travels through (idea, research, validation, deployment, monitoring, decay and eventual ret…

Frequently asked questions

What is backtesting in trading?
Backtesting is running a trading strategy against historical market data to simulate the trades it would have made and estimate its past behaviour — returns, drawdown, win rate and risk metrics. It is a hypothesis test, not a guarantee: it shows how a rule set behaved on the history you tested, subject to your data quality and modelling assumptions.
Why do backtests fail in live trading?
The common causes are overfitting to historical noise, look-ahead bias, survivorship bias in the data, ignoring transaction costs and slippage, and regime change after the test period. Out-of-sample testing, walk-forward analysis and forward or paper trading exist to catch these before real capital is at risk.
Can a backtest prove a strategy will be profitable?
No. A backtest can only describe behaviour on the specific past you tested; it cannot prove future profit. Its greatest value is falsification — cheaply killing ideas that do not work — and quantifying risk. A good backtest reduces uncertainty; it never removes it.
Educational content only — not investment advice. See our Risk Disclosure.