Skip to content

Guide

Your first backtest, and how to read it

Running a backtest takes about two minutes. Reading one without fooling yourself is the part worth learning, and the ways to get it wrong are specific enough to name.

No accountAbout 10 minutesNothing to install

Four steps

  1. 1

    Pick a strategy instead of building one

    A blank strategy builder is the hardest place to start. Open the strategy list, pick something whose description matches what you think the index will do over the next week, and read the line marked "when it goes wrong" before anything else.

    Browse strategies →

    If you are unsure what you expect, three questions will narrow it down. Answer three questions

  2. 2

    Run it on one year first

    On the strategy page, choose NIFTY and a single year, then press Run. One year is enough to see the shape of a strategy and fast enough that you will actually try several. Testing five years first hides the bad year inside the average.

    Try a short straddle →
  3. 3

    Look at the curve before the number

    The chart shows cumulative profit and loss trade by trade, with the drawdown from each running peak shaded beneath it. A strategy that ends positive after a long trough is a different proposition from one that climbs steadily to the same place, and only the curve tells you which one you are holding.

  4. 4

    Change one thing and run it again

    Enter a day earlier. Move the strikes one step further out. Add a stop. Change one variable at a time and watch whether the result holds. A result that collapses when you nudge it was never an edge; it was a setting that happened to fit.

    Test every setting at once →

Reading the result

Every number below appears on your result. The first line is what it measures. The second is how it misleads people, which is the more useful half.

Hit rate

How often the strategy made money.

A high hit rate says nothing on its own. Selling options wins most weeks by design, because the losses are rare and large. A 71 per cent hit rate with a total loss is completely normal for short premium, and it is exactly the number a marketing page would put on a card.

Net total

Everything added up, after charges.

Compare it against the worst single trade. If one bad expiry is the same size as the whole year of profit, the strategy is one unlucky week from erasing itself, and you would have had to sit through that week to collect the rest.

Worst

The single largest losing trade.

This is the number to size a position from, not the average. And on a strategy whose loss is uncapped, the worst trade in the data is not the worst trade possible. It is only the worst that happened to occur.

Drawdown

The largest fall from a running peak.

This is what you would actually have had to endure. Most people who abandon a working strategy do it in a drawdown rather than a loss: the account is still up on the year and falling, which is harder to hold than a straightforward losing run.

Costs

Brokerage, STT, exchange charges and GST.

On frequent strategies this line quietly eats the edge. A covered call tested here shows a gross profit and a net loss for exactly this reason. Any backtest that omits costs is describing a market that does not exist.

Three things a backtest cannot tell you

Whether it still works

A backtest describes the past. Strategies that worked for years have stopped working, usually without any warning in the data beforehand.

What you would actually have done

The engine holds every position through every drawdown without flinching. You would not have. The gap between those two is where most real losses come from.

Your real fill price

Results assume you traded at the closing price. On a thin strike you would not have, and the difference is a cost no backtest can show you.