What it means
The logic is straightforward: take the rule you propose to follow, apply it mechanically to data from a period that has already happened, and record what it would have produced. Because you already know how the period turned out, you can measure the outcome precisely rather than guessing.
Backtesting is most associated with investing, where a fund manager might test a rule such as buying shares whose price has fallen 20% below their twelve-month high. The same method is used far more widely, from testing whether a new credit rule would have caught last year's defaults to checking whether a pricing algorithm would have improved margins.
A good backtest reports more than a headline return. It shows the win rate, the average size of wins and losses, the worst peak-to-trough decline, and the number of observations, because a strategy tested on twelve trades tells you almost nothing.
The biggest danger is overfitting, which means tuning the rules until they fit the historical data beautifully and then discovering they fit nothing else. The usual defence is to develop the rule on one slice of history and test it on a separate slice the model has never seen.
Two other quiet distortions are worth naming. Survivorship bias creeps in when the dataset only contains businesses or funds that still exist, and look-ahead bias appears when a test uses information that would not have been available at the time.
In practice
Real-world examples.
Example
A consumer lender tests a proposed credit rule against three years of past applications and finds it would have rejected 40% of the accounts that later defaulted, while also rejecting 12% of accounts that repaid perfectly. The trade-off is put to the risk committee in exactly those terms.
Example
An energy retailer backtests a hedging policy against five years of wholesale price data. The policy would have reduced the worst quarterly loss substantially while costing a modest amount in average years, so it is adopted.
Example
A subscription business tests a proposed churn-prediction model on last year's customer records. It correctly flags two thirds of the customers who actually left, which is enough to justify a pilot retention campaign.
Think of it
“Backtesting is checking if your model would have worked in the past-historical validation.
Formula
Calculation
Expectancy per trade = (Win rate x Average win) - (Loss rate x Average loss)
Ashcombe Capital backtests a trend-following rule over ten years of daily prices. The rule would have produced 200 trades, of which 90 were profitable, giving a win rate of 90 / 200 = 45% and a loss rate of 55%.
Average winning trade: $1,400. Average losing trade: $800.
Expected value per trade: (0.45 x $1,400) - (0.55 x $800) = $630 - $440 = $190.
Total gross profit: 200 x $190 = $38,000.
On a starting capital of $250,000 that is $38,000 / $250,000 = 15.2% over the ten years. Applying realistic costs of $40 per trade removes 200 x $40 = $8,000, leaving $30,000 net, or 12%. The strategy still works, but transaction costs have taken roughly a fifth of the gross profit.Case study
Seen in the real world.
Oakhaven Quantitative is a fictional investment boutique used here to illustrate the pitfalls. Its research team built a share-selection rule that, on ten years of history, would have returned an average of 19% a year against a market average of 8%.
Before committing money, the head of research insisted on three checks. The first showed the dataset excluded companies that had been delisted, which quietly removed most of the worst outcomes.
The second showed the rule used a full-year accounting figure from a date before that figure had actually been published. The third showed that eleven separate variations of the rule had been tried, and only the best one had been reported.
After correcting all three problems in this illustrative case, the backtested return fell from 19% to 9.5%, barely above the market. The team shelved the strategy, and the firm adopted a standing policy of holding back the most recent two years of data as an untouched test set for every future model.
Watch out
Common mistakes.
- Leaving out trading costs, spreads, taxes and slippage. Strategies that trade frequently often look profitable on paper and lose money once real costs are applied.
- Testing many variations and reporting only the best one. That turns a genuine test into a search for the luckiest combination.
- Treating a backtested return as a forecast. It describes one particular past, not the range of futures the strategy might face.
Questions
People also ask.
How much historical data does a backtest need?
Enough to cover several different market or business conditions, which usually means multiple years and, ideally, at least one downturn.
What is out-of-sample testing?
It means checking the rule on data that was not used to build it, which is the single most useful protection against overfitting.
Is backtesting only for trading strategies?
No, it is used for credit models, demand forecasts, pricing rules and staffing models, anywhere a decision rule can be replayed against recorded history.
From the founder's library

Take it further with the book.
Build your financial confidence beyond this definition. Shihan's full-length guide, Accounting Fundamentals, takes the same plain-English approach and turns it into a complete, practical playbook for non-finance managers, business owners and students - with chapter-end quiz answers and presentation slides included.
25% off with code MMHQ25, applied at checkout. Priced in USD - checkout may show the equivalent in your local currency.
View the book and save 25%