Backtesting
How to test an idea honestly: writing objective rules, choosing data, reading win rate, expectancy and drawdown, and avoiding curve fitting.
You find out whether a strategy has an edge before you risk real money, and you learn to trust the evidence when a losing streak tests your nerve.
What is inside (20 lessons)
| 01 | Setting Up The Test | 6 lessons |
| 02 | Running The Test | 5 lessons |
| 03 | Reading The Results | 5 lessons |
| 04 | Proving The Edge | 4 lessons |
Free sample lesson: What Is Backtesting?
Every trading idea sounds good when you first have it. It might come from a book, a video, a chart you stared at for an hour, or a hunch that seems to make perfect sense. The trouble is that sounding good and being profitable are two different things, and the only way to tell them apart is evidence. Backtesting is the process of applying a set of trading rules to historical price data to see how they would have performed. It turns an idea into evidence.
The process has a simple logic. If a rule produced profits across hundreds of past situations, in different conditions, then there is a reasonable case that it has an edge. If it lost money across the same situations, you have learned that cheaply. Backtesting does not predict the future. It tells you whether an idea deserves the next step, which is a careful trial with practice or very small money.
There are three points to hold onto. One, it uses past data. Two, it needs fixed rules. Three, it measures performance.
One: It Uses Past Data
You replay history as though you were trading it live. You step through old prices, apply your rules to what you can see at each moment, and record what would have happened next. The data must be treated honestly, which means never using information that was not available at the time of the decision.
Two: It Needs Fixed Rules
The rules must be defined before the test, not adjusted as you look. If you change the rules every time a trade loses, you are not testing an idea, you are fitting a story to the past. A valid test starts with rules that are complete, written down, and applied the same way to every situation.
Three: It Measures Performance
The output is a record of wins, losses, and statistics such as win rate, average win and loss, expectancy, and drawdown. These numbers tell you not only whether the strategy made money but how bumpy the ride was. A strategy that makes money but suffers a 50 percent drawdown may be unusable even if the final profit looks good.
For example, a trader takes a rule, buy a pullback to the 50 period average in an uptrend, and applies it to 100 past setups, recording each result. Each trade is entered at the pullback, with a stop under the last swing low and a target at twice the risk. After 100 trades the record shows 44 winners and 56 losers, with an average win of 2R and an average loss of 1R, which works out to a gain of 0.32R per trade. The idea has some evidence behind it.
A trader who skipped the test and relied on a few memorable winners would have had no idea whether the strategy was really profitable.
The reason to do this is worth stating clearly.
Keep reading Backtesting
Illustrated books, live tools and a practice hub. Free to start.