Skip to content
The Casebook · A classic strategy

NR7 narrowest-range day, buy the breakout of its high

Buy NR7 days, the narrowest range of the last 7 days, and trade the breakout of that day's high.
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
11,785

42 large US stocks, 15 years

Per trade, after costs
−0.035R

Before costs +0.069R

Bar to clear
t > 2.01

By trade and by day, sized to a first try

What the numbers say

On the laggards, 11785 trades averaged −0.035R after costs, against 0.049 on today's winners, so the result leans on stocks that already rose. By market, bull was −0.055 and flat −0.038, while bear was 0.112 (t by trade 3.50, beating 80% of random-date draws). The edge appears on the winners but not on the laggards, which fits the verdict.

How it was tested

Buy at the close of a day whose high-low range is the narrowest of the last 7 days, with a bracket stop and target and a time limit.

Side
Long
Time limit
Exit at the close after 10 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
  • NR7 means strictly narrowest high-low range of the last 7 bars, including the signal day
  • The breakout buy-stop above the NR7 high cannot be modeled as the harness enters at the signal day close, so entry is at that close instead
  • No trend filter is applied; every NR7 day is a signal
  • Stop chosen as 1.5 x ATR(14) below entry since the idea names none
  • Target chosen at twice the risk (3 x ATR(14)) since the idea names none
  • Time limit of 10 trading days chosen since the idea gives no holding period

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
Bull8,460−0.055R−4.17−2.97 · 2,247d−0.071R · beats 65%+0.031R
Flat2,127−0.038R−1.46−1.46 · 553d−0.028R · beats 40%+0.086R
Bear1,198+0.112R3.502.41 · 272d+0.045R · beats 80%+0.107R
All11,785−0.035R−0.051R+0.049R

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 Nr7BreakoutLong:
    name = "nr7_breakout_long"
    description = "Long at the close of a strict NR7 day with 1.5x ATR stop and 3x ATR target"

    def __init__(self, lookback: int = 7, atr_period: int = 14,
                 stop_atr_mult: float = 1.5, target_atr_mult: float = 3.0) -> None:
        self._lookback = lookback
        self._atr_period = atr_period
        self._stop_mult = stop_atr_mult
        self._target_mult = target_atr_mult

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        min_bars = max(self._lookback, self._atr_period) + 5
        if len(bars) < min_bars:
            return None

        window = bars[-self._lookback:]
        current = window[-1]
        ranges = [b.high - b.low for b in window]
        cur_range = ranges[-1]
        prior_ranges = ranges[:-1]

        # Strictly narrowest of the last N ranges, including today
        for r in prior_ranges:
            if not (cur_range < r):
                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
        if stop <= 0 or not (stop < entry < target):
            return None
        risk = entry - stop
        rr = (target - entry) / risk
        if rr < Decimal("1.5"):
            return None

        # Signal strength: ranking only, no extra filtering
        avg_prior = sum(prior_ranges) / len(prior_ranges)
        if avg_prior <= 0:
            return None
        tightness = 1.0 - float(cur_range / avg_prior)  # 0..1, higher = tighter
        tight_score = min(40, max(0, int(tightness * 40)))
        range_atr = float(cur_range / atr_dec)  # small = compressed vs typical range
        atr_score = min(35, max(0, int((1.0 - range_atr) * 35)))
        denom = max(current.high - current.low, Decimal("0.01"))
        close_pos = float((current.close - current.low) / denom)
        close_score = min(25, max(0, int(close_pos * 25)))
        strength = max(0, min(100, tight_score + atr_score + close_score))

        return Candidate(
            ticker=ticker,
            side="buy",
            entry=entry,
            stop=stop,
            target=target,
            risk_reward_ratio=rr.quantize(Decimal("0.01")),
            signal_strength=strength,
            thesis=("NR7: today's range is the strictly narrowest of the last 7 bars, a volatility "
                    "squeeze that often precedes range expansion. Long at the close, stop 1.5x ATR(14) "
                    "below, target 3x ATR(14) above, 10-day time exit applied by the harness."),
        )

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