Skip to content
The Casebook · An idea an AI invented

Short a failed 52-week-high breakout on heavy volume

Entry at latest close if the high of the day exceeded the prior 252-day high, close is below that prior 252-day high by at least 0.5x ATR(14), and the day's volume is above 1.5x its 20-day average. Stop = day's high plus 0.25x ATR(14). Target = entry minus 2x ATR(14).
Why the AI thought it might work

Anchoring to the 52-week high produces buying as price approaches it, but a stock that fails to hold above the high on a day of heavy volume sees the anchored buyers trapped and late long holders selling into recovery. The close back below the old high after piercing it is a disciplined observable level event distinct from simple breakouts.

VerdictTested Nov 22, 2026

Too rare to judge

Too few trades in 15 years to tell anything either way.

  • 26 trades on the laggard stocks in 15 years; 30 are needed to judge.
Trades on the laggards
26

42 large US stocks, 15 years

Per trade, after costs
−0.389R

Before costs −0.265R

Bar to clear
t > 2.95

By trade and by day, sized to 362 rules

What the numbers say

The rule fired only 26 times on the laggard stocks in 15 years, short of the 30 needed to judge. Those trades averaged −0.389R after costs, against −0.411 on the winners. Bull markets gave −0.343 over 21 trades and flat markets −0.585 over 5; there were no bear-market trades.

How it was tested

The rule as written, coded once, run on every stock the same way.

Side
Short
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.95, by trade and by day, sized to the 362 rules in the search it came from
Prices
15 years of daily bars through 2026-11-20; judged 2026-11-22

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
Bull21−0.343R−1.21−1.03 · 20d−0.141R · beats 35%−0.370R
Flat5−0.585R−1.07−1.07 · 5d−0.048R · beats 20%−0.648R
Bear0————−1.236R
All26−0.389R−0.123R−0.411R

R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 17.9 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 High52wkRetestFailureShort:
    name = "high_52wk_gap_up_retest_failure_short"
    description = "Short a failed pierce of the prior 252-day high that closes >=0.5 ATR back below it on >1.5x average volume."

    def __init__(self, lookback: int = 252, atr_period: int = 14, reject_atr: float = 0.5,
                 vol_mult: float = 1.5, vol_period: int = 20, stop_atr: float = 0.25,
                 target_atr: float = 2.0) -> None:
        self._lookback = lookback
        self._atr_period = atr_period
        self._reject_atr = Decimal(str(reject_atr))
        self._vol_mult = vol_mult
        self._vol_period = vol_period
        self._stop_atr = Decimal(str(stop_atr))
        self._target_atr = Decimal(str(target_atr))

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        need = max(self._lookback, self._vol_period, self._atr_period + 1) + 1
        if len(bars) < need:
            return None
        current = bars[-1]
        prior_window = bars[-(self._lookback + 1):-1]
        prior_high = max(b.high for b in prior_window)

        # 1. Intraday pierce of the prior 52-week high
        if current.high <= 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))

        # 2. Close back below the old high by at least reject_atr * ATR
        if current.close > prior_high - self._reject_atr * atr_dec:
            return None

        # 3. Heavy volume versus the prior 20-day average
        vol_window = bars[-(self._vol_period + 1):-1]
        avg_vol = float(sum(b.volume for b in vol_window)) / self._vol_period
        if avg_vol <= 0:
            return None
        vol_ratio = float(current.volume) / avg_vol
        if vol_ratio <= self._vol_mult:
            return None

        # Levels exactly per spec: structural stop above rejection high, fixed 2 ATR target
        entry = current.close
        stop = current.high + self._stop_atr * atr_dec
        target = entry - self._target_atr * atr_dec
        risk = stop - entry
        if risk <= 0 or target <= 0 or target >= entry:
            return None
        rr = (entry - target) / risk
        # Platform hard floor only (the orchestrator drops <=1.5 anyway); no extra gate
        if rr <= Decimal("1.5"):
            return None

        # signal_strength: volume, rejection depth, close location
        vol_score = min(40, max(0, int((vol_ratio - self._vol_mult) / 1.5 * 40)))
        reject_depth = float((prior_high - current.close) / atr_dec)
        reject_score = min(35, max(0, int((reject_depth - float(self._reject_atr)) / 1.0 * 35)))
        rng = current.high - current.low
        if rng <= 0:
            rng = Decimal("0.01")
        close_pos = float((current.high - current.close) / rng)
        close_score = min(25, max(0, int(close_pos * 25)))
        strength = max(0, min(100, vol_score + reject_score + close_score))

        return Candidate(
            ticker=ticker,
            side="sell",
            entry=entry,
            stop=stop,
            target=target,
            risk_reward_ratio=rr.quantize(Decimal("0.01")),
            signal_strength=strength,
            thesis=(
                f"Pierced the prior {self._lookback}-day high {prior_high} intraday, then closed "
                f"{reject_depth:.2f} ATR back below it on {vol_ratio:.1f}x average volume. "
                "Anchored breakout buyers are now trapped, and supply should cap any recovery. "
                "Stop sits above the rejection high; fixed 2 ATR downside target."
            ),
        )

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
Short a failed 52-week-high breakout on heavy volume: Too rare to judge · EdgeProven