Skip to main content

Glossary · Backtesting & Analytics

Backtesting

Last updated:

Backtesting is the process of running a trading strategy’s exact rules against historical market data to measure how it would have performed in the past — trade by trade, including costs. Instead of trusting a chart pattern that “looks like it works”, you replay years of NSE sessions and count the actual outcomes: number of trades, win rate, average profit, drawdowns.

A meaningful backtest needs three things: clean historical data, honest cost assumptions (brokerage, STT and other charges, plus assumed slippage), and enough trades — a few hundred, not a dozen — for the statistics to mean anything.

Example

Suppose you backtest an EMA-crossover rule on NIFTY futures over five years. The report shows 412 trades, a 46% win rate, average win ₹2,400 and average loss ₹1,300 per lot. Expectancy per trade = (0.46 × ₹2,400) − (0.54 × ₹1,300) = ₹1,104 − ₹702 = ₹402. Before costs that looks healthy; after ~₹150 per round trip in charges and slippage, expectancy drops to ₹252 — still positive, but a very different business. All figures are hypothetical.

Why it matters

Backtesting is the cheapest place for a bad strategy to die. It cannot promise future results — markets change, and a curve-fit backtest can flatter a worthless rule — but it is the only way to know whether an edge existed at all before risking capital. Serious algo traders treat it as step one of a pipeline: backtest, then forward test, then deploy small.

In INDfolio AI, every strategy can be backtested on historical NSE data with costs modelled in — see Backtesting.

← All glossary terms

See the concept in a real backtest.

Build a strategy in plain English and watch every metric on this page come to life — free, on NSE data.

Free · No card

Create your account

By continuing you agree to our Terms and Privacy Policy.