In one line. Simulation of a strategy on historical data to estimate past performance. Useful for validation but does not guarantee future results.
backtest, explained
To run one, the rules must be written exactly: which stocks qualify, how they are ranked, how many are held, how they are weighted and when they are exchanged. The program then steps through history one date at a time, using only the data known on that date, applies the rules, records the trades and adds up the results. Careful tests deduct costs such as brokerage, taxes and an allowance for price impact, since a test without costs flatters the outcome.
A backtest is useful as a filter and as a description. It shows how much a rule might lose in the worst stretch, how often it trades, and whether its returns came from a few lucky years. It also lets rules be compared on the same data. Stronger evidence comes from testing on a period the design never saw, known as out of sample testing, or from checking that the rule works in several markets and not only one.
The main danger is overfitting. If 100 variations of a rule are tried on the same history, about 5 will look significant at the usual 5 percent level by chance alone, and picking the winner mistakes luck for skill. Other traps include lookahead bias, survivorship bias and unrealistic costs. A backtest also assumes the future resembles the past, and it cannot capture how markets respond once many people trade the same rule. Its figures are estimates, not forecasts.
A worked example
An illustration: a rule is tried with 20 combinations of lookback period and number of stocks. The top combination shows 16 percent a year over 10 years against 12 percent for the index. But 20 tries were made, so the winner is the top of 20; the typical combination returned 12.5 percent. Re-running the winning setting on the next 3 years, unseen when it was chosen, gives 12.8 percent. The gap between 16 and 12.8 shows how much of the headline came from selection. A fair report shows all 20 results, not only the top one.
Common misreadings
- A backtest result is not a forecast; it describes how rules behaved on past data and offers no assurance about the future.
- A higher backtested return does not mean a stronger rule: it may come from overfitting, hidden costs or a lucky period.
In the RupeeCase app
The app calls it “Model history”. Every figure on the Marketplace and on a strategy page. Shown in Basic and Advanced.
How the app works it out. The app calls its back test "Model history": the strategy's rules run on past weekly prices, after estimated charges, on a notional ₹10,00,000.
Watch: Model vs yours, Performance disclosure.