Skip to content
The Casebook · A classic strategy

Donchian breakout: 55-day high in, 20-day low out

Donchian breakout: buy a close above the 55-day high and exit on a close below the 20-day low.
VerdictTested Nov 22, 2026

Survivorship mirage

It clears the bar on today's winners, the stocks everyone wishes they had bought, but not on the laggards, which is where hindsight can't help.

  • It clears the bar on today's winners but not on the laggards: the winners' own rise did the work.
Trades on the laggards
3,405

42 large US stocks, 15 years

Per trade, after costs
−0.095R

Before costs −0.025R

Bar to clear
t > 2.01

By trade and by day, sized to a first try

What the numbers say

On the laggards the idea averaged −0.095R per trade after costs over 3405 trades, against 0.112 on today's winners. It also lost in bull (−0.077), flat (−0.208) and bear (−0.038) markets. The gain on the winners did not carry over to the laggards, which is why the verdict reads as a survivorship mirage.

How it was tested

Buy when the close exceeds the prior 55-day high and exit when the close falls below the prior 20-day low.

Side
Long
Its own exit
At each close after entry, exit at that close if close[t] is below the lowest low of the previous 20 trading days (days t-20 through t-1, excluding day t)., checked at each close
Time limit
Exit at the close after 30 trading days, unless the stop, the target or its own exit comes first
Bar to clear
t > 2.01, by trade and by day, sized to a first try (one idea, tested once)
Prices
15 years of daily bars through 2026-11-20; judged 2026-11-22
Choices made where the idea was open
  • 55-day high uses daily highs of the 55 bars before the signal day, excluding the signal day
  • 20-day low uses daily lows of the 20 bars before the current day, excluding the current day
  • Entry is at the signal-day close, as the harness requires
  • No stop or target was named, so a wide protective stop of 4 x ATR(14) and target of 12 x ATR(14) are used so the 20-day-low exit is the main exit
  • Holding limit is capped at the harness maximum of 30 trading days, shorter than a classic open-ended trend hold

The evidence

The laggards decide: 22 large stocks that lagged or fell, where hindsight can't flatter a rule. Today's winners sit beside them to show what survivorship would add.

MarketTradesPer tradet, by tradet, by dayRandom datesWinners, per trade
Bull2,785−0.077R−4.08−1.91 · 1,386d−0.013R · beats 0%+0.123R
Flat507−0.208R−5.68−2.15 · 257d−0.049R · beats 0%+0.066R
Bear113−0.038R−0.56−2.07 · 73d+0.096R · beats 20%−0.149R
All3,405−0.095R−0.014R+0.112R

R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 12.4 bps) plus 0.045R for the fills a real order wouldn't get. “By day” groups trades opened the same day, so a rule that fires on the same dates for every stock counts as a few events. “Random dates” places the same plan on random days of the same stocks in the same kind of market, 20 times; the idea must beat 95% of those draws.

The scanner we wroteShow the code
from decimal import Decimal

from core.domain import Bar
from strategies.indicators import atr
from scanners.base import Candidate


class Donchian55Breakout20Exit:
    name = "donchian_55_breakout_20_exit"
    description = "Long on close above prior 55-day high; exit on close below prior 20-day low."

    def __init__(self, entry_lookback: int = 55, exit_lookback: int = 20,
                 atr_period: int = 14, stop_mult: float = 4.0,
                 target_mult: float = 12.0) -> None:
        self._entry_lookback = entry_lookback
        self._exit_lookback = exit_lookback
        self._atr_period = atr_period
        self._stop_mult = stop_mult
        self._target_mult = target_mult

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        n = self._entry_lookback
        if len(bars) < max(n + 1, self._atr_period + 1):
            return None
        prior_window = bars[-(n + 1):-1]
        prior_high = max(b.high for b in prior_window)
        current = bars[-1]
        if current.close <= prior_high:
            return None
        atr_val = atr(bars, self._atr_period)
        if atr_val is None or atr_val <= 0:
            return None
        atr_dec = Decimal(str(atr_val))
        entry = current.close
        stop = entry - Decimal(str(self._stop_mult)) * atr_dec
        target = entry + Decimal(str(self._target_mult)) * atr_dec
        risk = entry - stop
        if risk <= 0 or stop <= 0:
            return None
        rr = (target - entry) / risk
        return Candidate(
            ticker=ticker,
            side="buy",
            entry=entry,
            stop=stop,
            target=target,
            risk_reward_ratio=rr.quantize(Decimal("0.01")),
            signal_strength=50,
            thesis=f"Closed above the prior {n}-day high; stop 4x ATR, target 12x ATR, exit below prior {self._exit_lookback}-day low.",
        )

    def exit_now(self, ticker: str, bars: list[Bar], entry: Decimal,
                 side: str, bars_held: int) -> bool:
        m = self._exit_lookback
        if len(bars) < m + 1:
            return False
        prior_low = min(b.low for b in bars[-(m + 1):-1])
        return bars[-1].close < prior_low

Hypothetical results from our own backtest of the rule as restated, on 42 large US stocks over 15 years. Past performance, real or simulated, does not predict future results. Research and education only; not investment advice.

Have an idea of your own?

Describe it in plain words and get the same honest test in about a minute.

Run the Gauntlet