The previous six lessons built the parts: a trend definition, entries, stops, sizes and exits. This lesson puts them together into one written rule set, tests it honestly, sets realistic expectations for how it will feel to trade, and turns it into a routine that takes minutes a day. The general method of backtesting and its biases are covered in backtesting; here the focus is on what matters for a trend-following system.
Write the complete rule set
A system is testable only if every decision is written down before the test. For a trend-following stock system the list is short:
| Part | Example |
|---|---|
| Universe | Liquid US stocks on the watchlist, refreshed weekly |
| Trend filter | The eight leader checks (lesson 2) |
| Entry | Close above the prior 20-day high, or a base breakout (lessons 3 and 4) |
| Stop | Entry − 2 × ATR(20), capped at 10% (lesson 5) |
| Size | 1% of equity at risk, at most 20% of equity per stock |
| Exit | Close below the prior 10-day low, or the ATR trail (lesson 6) |
| Portfolio | Total open risk at most 6%; at most two positions per sector |
| Regime | No new entries while SPY is below a falling 200-day average |
If any line needs judgement ("a strong close", "a good base"), the test will not measure what you will actually do.
What to look for in the test
Start with expectancy after costs, in R per trade, and the number of trades behind it: a figure based on 40 trades says little, one based on several hundred says more. Then read the risk side:
- Maximum drawdown and its length. Trend systems often spend most of their time below a previous high.
- Dependence on a few trades. Remove the five largest winners. If the result collapses, that is normal for trend following, but it confirms that skipping signals is dangerous.
- Results by period. Compare bull, bear and sideways years. A breakout system that earns everything in one year and bleeds in the others needs a regime filter or more patience.
- Against buy and hold. Compare with SPY over the same window, and remember the system spends part of the time in cash.
Luck and streaks: the same edge, many paths
A backtest shows one order of trades. Real trading will produce another. Reshuffling the same trades shows how much of the experience is chance:
Every curve in the figure contains exactly the same trades and ends at the same value, yet the deepest drawdown varies roughly twofold. The backtest's maximum drawdown is therefore not a ceiling. Plan for something deeper, decide in advance what drawdown would make you stop and review the system, and set the risk per trade so that you can live with that number.
Robustness, not optimisation
Every extra rule and every tuned parameter makes a backtest look better and the future less certain. A few checks separate a real edge from a fit to the past:
- Neighbouring settings. If a 20-day breakout works, 15- and 30-day versions should work about as well. A single sharp peak is a warning.
- Out of sample. Choose rules on one period and check them on another you did not look at.
- Harsher assumptions. Raise costs and use next-day fills; an edge that disappears with 20 or 30 basis points per side was never large enough.
- Different stocks. Rules that only work on the stocks you already know are suspect.
A weekly routine
An end-of-day trend system needs little time if the rules are complete. Signals form on the close, so decisions are made in the evening and orders placed for the next session, never in reaction to intraday moves.
The journal is the most neglected step. Record every trade in R with its exit reason, then compare the live win rate, average win and loss, streaks and drawdown with the backtest each month. Live results inside the tested range mean the system is working, even when it does not feel that way; results clearly outside it are a reason to stop and investigate.
How to apply it
Entry
Trade a rule set live only after it shows positive expectancy after realistic costs over many trades, on neighbouring settings and outside the period used to design it. Start with a smaller risk per trade than planned.
Stop
Set a system-level stop: a drawdown at which you pause and review, set deeper than the backtest's worst.
Target
Expect long flat or losing stretches and a handful of large winners, as the test showed. Judge the system over dozens of trades, not weeks.
Invalidation
Live statistics well outside the tested range (win rate, payoff, streak length) or a change in how the rules are executed. Change rules only after a review, and retest before trading the new version.
In Clear Tape
The Trading systems page runs this routine for you. Up to five systems, presets or your own, can be switched on, and after each close they scan a watchlist of up to 50 stocks (importable and exportable as a TradingView-compatible .txt list), listing each trigger or setup with its entry, stop, target and reward-to-risk. The backtest panel replays any system's own rules on daily prices: choose the stocks (your watchlist, one ticker or the screener's 500 most liquid stocks), the period (1, 3, 5 or 10 years), the entry fill (next day's open, the conservative default, or the signal day's close), the risk per trade (0.1% to 5%) and the costs per side (0 to 100 basis points, 10 by default, slippage included). Results start from $100,000, with no margin and at most 20% of the account in one stock. They show CAGR, total return, maximum drawdown, win rate, profit factor, average R before costs, expectancy after costs, average holding time and time in the market, an equity curve against SPY buy and hold, and the trade list with exit reasons. The notes state the limits plainly: only stocks listed today are tested (survivorship bias), the 500-stock universe is chosen with hindsight, and dividends are left out. You can build up to five systems of your own in the rules builder. Screening and backtests (20 runs a day) are available to Tools and Pro members.
Common mistakes
- Trusting a backtest with few trades, or one tuned to a single best parameter.
- Testing with signal-day closing fills and no costs, then trading at the next open with real costs.
- Treating the backtest's maximum drawdown as the worst that can happen.
- Changing rules after every losing month, so no version is ever traded long enough to judge.
- Skipping the journal, so live results cannot be compared with the test.
Summary
A trend-following system is a complete written rule set: universe, trend filter, entry, stop, size, exit, portfolio limits and regime. Test it for expectancy after costs over many trades, read its drawdowns by depth and length, and check that it survives neighbouring settings, other periods and harsher costs. Expect the live path to differ from the backtest by chance alone. Then run it as a short daily and weekly routine, journal every trade in R and change the rules only after a review. That completes this course; lesson 1 is a good place to return to when a drawdown tests your patience.
For educational purposes only. Not investment advice.