Skip to content
The Casebook · An idea an AI invented

Short a wide-range breakdown bar below the 50-day average

Entry at latest close if today's true range is at least 2.0x ATR(14), close is in the bottom 25% of the day's range, close is below the 50-day SMA, and the prior bar's true range was below 1.2x ATR(14). Stop = entry plus 1.3x ATR(14). Target = entry minus 2x ATR(14).
Why the AI thought it might work

In a bear regime, a sudden realized-vol spike forces volatility-managed and risk-parity accounts to sell more over the following days as their lagged vol estimates catch up, and the selling is mechanical. A stock breaking down with a vol jump and a close near its low is in the early phase of this forced reduction.

VerdictTested Nov 22, 2026

Loses money

After costs it lost money on the stocks that decide the verdict.

  • −0.121R a trade after costs on the laggard stocks.
Trades on the laggards
497

42 large US stocks, 15 years

Per trade, after costs
−0.121R

Before costs −0.035R

Bar to clear
t > 2.95

By trade and by day, sized to 362 rules

What the numbers say

Across 497 laggard trades the idea lost 0.121R a trade after costs (−0.218R on the winners). It lost in bull markets (−0.116R) and flat markets (−0.319R, t −2.65). Only bear markets were positive at 0.187R, on 60 trades with t 1.05, too weak to offset the rest.

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
Bull336−0.116R−1.64−1.13 · 258d−0.145R · beats 60%−0.369R
Flat101−0.319R−2.65−2.30 · 73d−0.129R · beats 0%−0.107R
Bear60+0.187R1.05−0.13 · 34d−0.237R · beats 100%+0.299R
All497−0.121R−0.153R−0.218R

R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 11.3 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, sma
from scanners.base import Candidate


class RangeExpansionVolSpikeExposureCutShort:
    name = "range_expansion_vol_spike_exposure_cut_short"
    description = "Short a quiet-to-violent range-expansion bar closing near its low below the 50-SMA; stop above the spike high."

    def __init__(self, atr_period: int = 14, spike_mult: float = 2.0, prior_max_mult: float = 1.2, close_pos_max: float = 0.25, sma_period: int = 50, high_buffer_atr: float = 0.25, min_stop_atr: float = 1.3, max_stop_atr: float = 2.0, rr_mult: float = 1.75, min_target_atr: float = 2.0, min_bars: int = 80) -> None:
        self._atr_period = atr_period
        self._spike_mult = Decimal(str(spike_mult))
        self._prior_max_mult = Decimal(str(prior_max_mult))
        self._close_pos_max = Decimal(str(close_pos_max))
        self._sma_period = sma_period
        self._high_buffer_atr = Decimal(str(high_buffer_atr))
        self._min_stop_atr = Decimal(str(min_stop_atr))
        self._max_stop_atr = Decimal(str(max_stop_atr))
        self._rr_mult = Decimal(str(rr_mult))
        self._min_target_atr = Decimal(str(min_target_atr))
        self._min_bars = min_bars

    @staticmethod
    def _d(x) -> Decimal:
        return Decimal(str(x))

    def _tr(self, bar: Bar, prev: Bar) -> Decimal:
        h = self._d(bar.high)
        l = self._d(bar.low)
        pc = self._d(prev.close)
        return max(h - l, abs(h - pc), abs(l - pc))

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        if len(bars) < max(self._min_bars, self._sma_period + 5, self._atr_period + 5):
            return None
        cur = bars[-1]
        prev = bars[-2]
        prev2 = bars[-3]

        # Pre-spike ATR (excludes today) for the gating rules
        pre_atr_raw = atr(bars[:-1], self._atr_period)
        if pre_atr_raw is None:
            return None
        pre_atr = self._d(pre_atr_raw)
        if pre_atr <= 0:
            return None

        tr_today = self._tr(cur, prev)
        tr_prev = self._tr(prev, prev2)
        if tr_today < self._spike_mult * pre_atr:
            return None
        if tr_prev >= self._prior_max_mult * pre_atr:
            return None

        high = self._d(cur.high)
        low = self._d(cur.low)
        close = self._d(cur.close)
        rng = high - low
        if rng <= 0:
            return None
        close_pos = (close - low) / rng
        if close_pos > self._close_pos_max:
            return None

        sma_raw = sma([b.close for b in bars], self._sma_period)
        if sma_raw is None:
            return None
        sma50 = self._d(sma_raw)
        if close >= sma50:
            return None

        # Post-shock ATR (includes today's spike) for stop sizing
        post_atr_raw = atr(bars, self._atr_period)
        if post_atr_raw is None:
            return None
        post_atr = self._d(post_atr_raw)
        if post_atr <= 0:
            return None

        entry = close
        # Structural anchor: just above the spike bar's high, bounded by post-shock ATR
        anchored = high + self._high_buffer_atr * post_atr
        floor_stop = entry + self._min_stop_atr * post_atr
        cap_stop = entry + self._max_stop_atr * post_atr
        stop = min(max(anchored, floor_stop), cap_stop)
        risk = stop - entry
        if risk <= 0:
            return None

        reward = max(self._rr_mult * risk, self._min_target_atr * pre_atr)
        target = entry - reward
        if target <= 0:
            return None
        rr = reward / risk
        if rr < Decimal("1.5"):
            return None

        # Strength sub-scores
        spike_ratio = float(tr_today / pre_atr)
        spike_score = min(35, max(0, int((spike_ratio - 2.0) * 25)))
        close_score = min(25, max(0, int((0.25 - float(close_pos)) / 0.25 * 25)))
        vol_window = bars[-21:-1]
        avg_vol = sum(float(b.volume) for b in vol_window) / max(len(vol_window), 1)
        vol_ratio = float(cur.volume) / max(avg_vol, 1.0)
        vol_score = min(25, max(0, int((vol_ratio - 1.0) * 20)))
        dist = float((sma50 - close) / sma50)
        trend_score = min(15, max(0, int(dist * 150)))
        strength = max(0, min(100, spike_score + close_score + vol_score + trend_score))

        thesis = (
            f"Vol spike: TR {spike_ratio:.2f}x pre-spike ATR after a quiet day, close at "
            f"{float(close_pos) * 100:.0f}% of range, below 50-SMA. Lagged vol-targeting/risk-parity "
            f"de-risking should extend selling; stop above spike high ({float(high):.2f}), "
            f"volume {vol_ratio:.1f}x avg."
        )

        return Candidate(
            ticker=ticker,
            side="sell",
            entry=entry,
            stop=stop,
            target=target,
            risk_reward_ratio=rr.quantize(Decimal("0.01")),
            signal_strength=int(strength),
            thesis=thesis,
        )

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 wide-range breakdown bar below the 50-day average: Loses money · EdgeProven