# Trend following vs mean reversion across our backtests - specification (cross-test study, RIP Backtest protocol v1.0)

Specification written and **frozen 2026-10-22 (approved by the owner the same day, draft 1 unchanged)**. No number of this study has been computed: no result by family, no comparison. Once frozen, any change of a rule or of a family label is documented on the page; bugs may be fixed.

## What kind of study this is
- **Descriptive, not a new backtest.** Nothing is run again. It labels every published strategy version by the **kind of rule** it is, before looking at any result by label, and compares the published results of the kinds.
- **No gates, no holdout.** The holdouts are all used. The page makes no claim that a style works.
- **Chosen by the owner** on 2026-10-22 (option 3 of the "what next" list), the third cross-test project after the trading costs guide and the cross-market scoreboard.

## What is already known (disclosed, so the study is not blind)
- The **gold strategies guide** already compared styles on gold (trend, breakout, reversal, pattern, time; 97 versions), and I have read it. Its labels are kept unchanged below for the gold tests, so this study cannot relabel them after the fact.
- From the cost study I know the results by market and by trade frequency, and from the scoreboard which families carried over; I know every test's verdict. I have **not** tabulated any result by rule kind outside gold.
- **Prediction, written now:** trend following (trend and breakout rules) will be positive before costs more often than mean reversion, mostly through long-only versions on markets that rose; after costs, against the random control and under the gates, no kind will stand out.

## The labels (fixed now, by the rule, not by the result)
A version's **kind** is decided by how its entry chooses a direction relative to the price move that came before the signal:
- **Trend:** enters in the direction of a trend measured by an average, an indicator or a recent move (moving-average crosses and price-above-average rules, MACD, Supertrend, Parabolic SAR, Heikin Ashi colour, ADX/DI, Ichimoku, TDI crosses, pullbacks bought in the direction of the trend, first-half-hour momentum).
- **Breakout:** enters when price leaves a defined range, channel or level, in the direction of the exit (Donchian, Turtle, opening ranges, initial balance, noise-area bands, inside bars, squeezes, the London range).
- **Mean reversion:** enters against the preceding move, expecting a return (oversold buys and overbought sells, band fades, gap fades, divergences, fading the VWAP cross).
- **Pattern** and **time** (the gold guide's labels): chart and candle patterns, and time-of-day rules. Shown, not part of the main comparison.

**Trend following** = trend + breakout (as the term is usually used: Turtle trading is the classic trend-following system). The main comparison is **trend following vs mean reversion**; the three-way split (trend, breakout, mean reversion) is shown beside it.

| Test | Versions | Kind | Flag |
|---|---|---|---|
| the-rsi2-dip-buyer | A, B, A2, B2 | mean reversion | |
| supertrend | all 8 | trend | |
| bollinger-band-reversal | all 4 | mean reversion | |
| donchian-channel-breakout | all 4 | breakout | |
| rsi-divergence | all 4 | mean reversion | |
| macd-crossover | all 4 | trend | |
| fx-six-strategies-four-pairs | A, A2, B, B2, BB-*, DV-* / DC-* / MC-*, ST60-* | mean reversion / breakout / trend, as their ES originals | |
| golden-cross-50-200, golden-cross-1-hour, golden-cross-eurusd-1h | all | trend | |
| coppock-curve-es-1h | all 12 | trend | ambiguous (buys when a smoothed momentum curve turns up, often after a decline) |
| ema-9-21-crossover-1h, ema-9-20-crossover-gold, ema-ribbon-5-8-13-nq | all | trend | |
| fibonacci-618-pullback-eurusd | both | trend (pullback in the trend's direction) | |
| turtle-trading-gold-daily, -eurusd-daily, -bitcoin-daily | all | breakout | |
| intraday-trend-pullback-bitcoin | both | trend | |
| noise-area-breakout-es, -nq, -gold, -bitcoin | all | breakout | |
| rsi-30-70-strategy-gold | all 8 | mean reversion (gold guide: reversal) | |
| vwap-strategy-es-futures | VW-TREND / VW-REV, VW-BANDS | trend / mean reversion | |
| stochastic-rsi-macd-strategy-eurusd | all 6 | mean reversion | ambiguous (oversold setup, momentum trigger) |
| 9-ema-strategy-nq-futures | all 3 | trend | |
| ichimoku-cloud-strategy-eurusd | all 6 | trend | |
| fibonacci-scalping-strategy-es-futures | all 4 | breakout | ambiguous (opening-range break, entry on a retracement) |
| ttm-squeeze-strategy-gold | all 4 | breakout (gold guide) | |
| wavetrend-indicator-strategy-gold | all 4 | mean reversion (gold guide: reversal) | |
| head-and-shoulders-pattern-gold | all 4 | pattern (gold guide) | |
| es-gap-fill-strategy, bitcoin-cme-gap-fill | all | mean reversion | |
| trading-made-simple-tdi-heikin-ashi-eurusd, tdi-indicator-strategy-eurusd | all | trend | |
| accumulation-distribution-indicator-bitcoin, -spy | DIV / MA, CHO | mean reversion / trend | |
| parabolic-sar-strategy-eurusd, heikin-ashi-strategy-bitcoin, adx-indicator-strategy-forex | all | trend | |
| engulfing-candle-strategy-gold, h1-open-trap-strategy-gold | all | pattern (gold guide) | |
| initial-balance-breakout-es-futures, -strategy-nq | all | breakout | |
| first-5-minute-candle-fair-value-gap-strategy-nq | both | breakout | |
| inside-bar-trading-strategy-eurusd, london-breakout-strategy-gbpusd | all | breakout | |
| opening-range-breakout-nq-futures | all 4 | breakout | ambiguous for ZA (direction of the first 5-minute candle) |
| intraday-momentum-es, -nq | all | trend | |
| best-time-to-trade-gold | all 3 | time (gold guide) | |
| 200-day-moving-average-strategy-spy | both | trend | |

Every one of the 387 versions of the cost study's inventory (54 tests) gets exactly one label; the label file is written before any result is joined to it, and the run stops if a version has no label.

## What is compared (unit-free, as in the cost study)
Per version, from the published results already checked by the cost study: positive before costs (gross > 0), the three outcomes (lost before costs, lost to costs, positive after costs), cost share, trades a year, gates passed, **gate 4** (above the 95th percentile of the random control) and the control percentile where the gate's published detail prints it.

**Weighting:** the unit is a **test-kind cell** (one test's versions of one kind; the FX study is split into its kinds). Every rate is the mean of the cells' rates, so a test with 96 versions weighs as much as a test with 3; the plain version count is shown beside it.

## Questions (fixed now)
1. **Signal:** the share of versions positive before costs, by kind.
2. **After costs:** the shares lost before costs, lost to costs and positive after costs; the median cost share and trades a year, by kind.
3. **Against random entries:** the share passing gate 4, and the median control percentile, by kind.
4. **The gates:** the share with 4 or more gates, and the versions with all six, by kind.
5. **Confounds:** questions 1 to 3 for long-and-short versions only (the cleaner test, since long-only versions gain from markets that rose), and by market group (index futures, gold, FX, Bitcoin, SPY) where a kind has at least 3 cells there.
6. **Sensitivity:** questions 1 to 4 again without the four groups of versions flagged ambiguous (Coppock, Stochastic + RSI + MACD, Fibonacci scalping, ORB ZA).

A difference between kinds is described, with the number of cells behind it; a shuffle of the kind labels among cells (10,000 times) gives how often a difference at least as large appears by chance. Descriptive only.

## Checks (must pass before the page prints a number)
1. **Labels first:** the label file covers all 387 versions exactly once; it is printed and checked by me against this table before any result is joined.
2. **Gold labels** equal the gold guide's styles (gs_data.js) for every gold version (reversal = mean reversion).
3. **Numbers** come from the cost study's rows (already checked against every trade log); gate 4 and the control percentiles from the published gate files, checked against `check_site.js`'s gate reading.
4. **An independent second script** recomputes questions 1 to 6 from the joined file without sharing code, and must give identical numbers.

## What the page may and may not say
- Every number is "in our tests": these are the strategies we chose, mostly popular retail rules; a kind's result describes them, not the style in general.
- Kinds differ in markets, timeframes and costs; the page says so next to every comparison and shows the long-and-short and per-market splits.
- Positive is not "works": the gates and the control are shown with every rate.
- Every test in the tables links to its page.

## Output
- `fm_labels.json` (the labels, written first), `fm_out/fm_rows.json`, `fm_out/fm_summary.json`, `fm_selftest_result.txt`.
- A guide page (slug and SEO title chosen when it is written), rebuilt from these files with asserts on every number in the text, linked from the findings page and from each test.

## Documented fix after freezing (2026-10-22, before any result was joined)
- The label table above left out **gold-opening-range-breakout** (12 versions). The label script stopped on it, as the spec requires. Its label follows from the frozen rule that gold tests keep the gold guide's styles: **breakout** (gs_data.js labels both of its rounds "breakout"). No result had been read.
