Welcome to Level 4. In Level 3, you wrote strategies down as rules, and in the Test it yourself lessons you tried short runs on past charts. This course teaches the whole method of testing by hand, properly, from start to finish. By the end of this lesson, you'll know what a backtest is, the three things every backtest needs, and what you actually get at the end of one.
1 of 8
What you'll learn
- Run rules on past prices. A backtest shows what your written rules would have done.
- Set three things first. Choose the rules, dates and market, and keep a log of every trade.
- Log every session. Write one row per trade, and note the days with no trade too.
- Read the result as a list. Every figure comes from the trades and shows only the past.
- Tell the tests apart. A forward test runs the same rules on new prices as they arrive.
Exercise
- Write one sentence that says what a backtest is, in your own words.
- Then take the strategy sheet you wrote in Level 3 and list the three things a backtest of it would need: the rules, the dates and the market, and the log's columns.
Quick check
1. What is a backtest?
2. A session where the rules took no trade. What goes in the log?
3. Why fix the rules before you look at the results?
0 of 3 answered.
Finished this lesson?
Tick it off and keep your place
Read the full notes
A backtest applies a strategy's written rules to past prices and logs every trade the rules would have taken, so you can see what would have happened.
- A Running a strategy’s exact rules over past prices to see which trades they would have taken.More in the glossary applies written rules to past prices to see what would have happened. The rules come from a strategy written so clearly that two people would take the same trades, like A one-page strategy sheet.
- Every backtest needs three things: rules fixed before you look, a stretch of past prices chosen in advance (start date, end date, market), and a log of every trade, including days with no trade.
- The result is a list of trades, one row each, not a verdict. The figures people quote, like The percentage of trades that made money. It doesn't show how big the wins or losses were.More in the glossary or A fall in an account’s balance from a high point. On a funded account, it also names the loss limit the balance has to stay above.More in the glossary, are worked out from that list. Backtest results are Results from a backtest, a simulation or a practice account rather than real money. In US futures, regulated firms that show them have to label them as hypothetical.More in the glossary: they show the past, not the future.
- A backtest uses past prices. A Running a finished strategy, unchanged, on new prices as they arrive, and recording every trade.More in the glossary follows the same rules on new prices as they arrive. Following a strategy’s trades without real money, on a demo account or on paper, to see how it behaves.More in the glossary means practice orders in a pretend account, which you can use for a forward test.
- In Level 3 you tried short runs, for example Test it yourself: opening range breakout. This course teaches the full method. More: What is backtesting?
Worked example
Made-up numbersA tiny backtest, one week
Made-up numbers, Results from a backtest, a simulation or a practice account rather than real money. In US futures, regulated firms that show them have to label them as hypothetical.More in the glossary. A small futures contract on the S&P 500, traded at CME Group. Each point is worth $5, and its smallest step of 0.25 is worth $1.25.More in the glossary, the The highest and lowest prices in the first minutes of a trading session, over a length of time you choose.More in the glossary breakout rules from Level 3, five sessions.
- Mon: long 5,019.50, stopped at 5,014.00: 5,014.00 − 5,019.50 = −5.50 One whole unit of a price. On the S&P 500, a move from 5,000 to 5,001 is one point, and each futures contract sets what a point is worth in dollars.More in the glossary
- Tue: short 5,027.00, stopped at 5,029.75: 5,027.00 − 5,029.75 = −2.75
- Wed: long 5,047.00, target 5,054.00: +7.00
- Thu: no trade: 0, still logged
- Fri: short 5,036.25, closed at 11:30 at 5,032.00: +4.25
Total: −5.50 − 2.75 + 7.00 + 0 + 4.25 = 3.00 points. Five rows is far too few to learn much; it shows what a backtest looks like.
Your turn
DrillMade-up numbers · results in points: −5.50, −2.75, +7.00, 0, +4.25
Three words that sound alike
- Backtest: rules on past prices. You must avoid using what you already know about how the day ended (A backtest mistake: using a price the strategy couldn’t have known yet at the moment it made its decision.More in the glossary).
- Forward test: the same rules on new prices as they arrive. Slower, but nobody can peek. More: Forward testing a trading strategy
- Paper trading: practice orders in a pretend account, as in Opening a TradingView paper trading account.
Trading is risky. You can lose money. This lesson explains how testing works. It isn't advice, and a test can't tell you what will happen next.