Skip to content
The Casebook · An idea an AI invented

Short the low-volume bounce to a broken 20-bar low

Require close below the 200-SMA and the 50-SMA, a prior 20-bar low breakdown within the last 15 bars, and a 3-day bounce of >=4% that reaches within 1.5% of the breakdown level with each bounce day's volume lower than the previous. Enter short at the latest close; stop 1.5 x ATR(14) above; target 3 x ATR(14) below.
Why the AI thought it might work

In bear regimes, rallies on thin volume are driven by short covering and noise traders, not by new institutional demand. Index-aware funds underweight rallies lacking volume, and sellers wait to reload at resistance. A stock that bounces 3 days to the prior breakdown level on declining volume offers a repeating overhead supply zone where trapped longs from the breakdown exit at breakeven, a documented disposition-effect supply.

VerdictTested Nov 22, 2026

Loses money

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

  • −0.393R a trade after costs on the laggard stocks.
Trades on the laggards
151

42 large US stocks, 15 years

Per trade, after costs
−0.393R

Before costs −0.296R

Bar to clear
t > 2.95

By trade and by day, sized to 362 rules

What the numbers say

On the laggard stocks the short lost −0.393R a trade after costs over 151 trades, and the winners also lost, at −0.251R. It was negative in bull markets (−0.45R) and in bear markets (−0.69R, t −4.67), where it was meant to work; only flat markets were positive, at 0.138R. That is why the verdict is a loss.

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
Bull59−0.450R−2.05−1.52 · 53d−0.094R · beats 5%−0.248R
Flat37+0.138R0.420.35 · 30d−0.101R · beats 70%+0.216R
Bear55−0.690R−4.67−4.97 · 36d−0.302R · beats 5%−0.582R
All151−0.393R−0.171R−0.251R

R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 6.8 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 UpperRangeCloseAfterLowVolumePullbackShort:
    name = "upper_range_close_after_low_volume_pullback_short"
    description = "Bear-trend short: thin-volume 3-day bounce retesting a recent 20-bar-low breakdown level from below."

    def __init__(self, breakdown_lookback: int = 20, breakdown_recency: int = 15, bounce_days: int = 3, min_bounce_pct: float = 0.04, level_tolerance: float = 0.015, max_close_above_level: float = 0.01, stop_buffer_atr: float = 0.25, min_stop_atr: float = 0.75, max_stop_atr: float = 2.5, target_atr: float = 3.0, min_rr: float = 1.5) -> None:
        self._lb = breakdown_lookback
        self._rec = breakdown_recency
        self._bd = bounce_days
        self._min_bounce = min_bounce_pct
        self._tol = level_tolerance
        self._max_above = max_close_above_level
        self._buf = stop_buffer_atr
        self._min_stop = min_stop_atr
        self._max_stop = max_stop_atr
        self._tgt_atr = target_atr
        self._min_rr = min_rr

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        n = len(bars)
        if n < 220:
            return None
        cur = bars[-1]
        close = float(cur.close)
        if close <= 0:
            return None
        closes = [float(b.close) for b in bars]
        s200 = sma(closes, 200)
        s50 = sma(closes, 50)
        if s200 is None or s50 is None:
            return None
        if not (close < float(s200) and close < float(s50)):
            return None

        a = atr(bars, 14)
        if a is None or float(a) <= 0:
            return None
        a = float(a)

        bd = self._bd
        # Find most recent breakdown (close below prior 20-bar low) that occurred before the bounce window
        last_allowed = n - 1 - bd
        first_allowed = max(self._lb, n - self._rec)
        bj = None
        level = None
        for j in range(last_allowed, first_allowed - 1, -1):
            prior_low = min(float(b.low) for b in bars[j - self._lb:j])
            if float(bars[j].close) < prior_low:
                bj = j
                level = prior_low
                break
        if bj is None or level is None or level <= 0:
            return None

        # Bounce: last bd bars, measured from the low at the bar before the bounce window
        base_idx = n - 1 - bd
        base_low = min(float(bars[base_idx].low), min(float(b.low) for b in bars[-bd:]))
        if base_low <= 0:
            return None
        bounce_pct = close / base_low - 1.0
        if bounce_pct < self._min_bounce:
            return None
        if close <= float(bars[base_idx].close):
            return None

        # Declining volume across each bounce day
        vols = [float(b.volume) for b in bars[-bd:]]
        for k in range(1, len(vols)):
            if vols[k] >= vols[k - 1]:
                return None

        # Reached within tolerance of breakdown level, but did not reclaim it
        bounce_high = max(float(b.high) for b in bars[-bd:])
        if bounce_high < level * (1.0 - self._tol):
            return None
        if close > level * (1.0 + self._max_above):
            return None

        # Structural levels
        swing_low = min(float(b.low) for b in bars[bj:])
        stop_f = max(bounce_high, level) + self._buf * a
        stop_f = max(stop_f, close + self._min_stop * a)
        risk_f = stop_f - close
        if risk_f <= 0 or risk_f > self._max_stop * a:
            return None
        target_f = min(swing_low, close - self._tgt_atr * a)
        if target_f <= 0 or target_f >= close:
            return None

        entry = cur.close
        stop = Decimal(str(round(stop_f, 4)))
        target = Decimal(str(round(target_f, 4)))
        risk = stop - entry
        reward = entry - target
        if risk <= 0 or reward <= 0:
            return None
        rr = reward / risk
        if rr < Decimal(str(self._min_rr)):
            return None

        # Score components
        avg_vol = sum(float(b.volume) for b in bars[-21 - bd:-bd]) / 20.0
        vol_ratio = vols[-1] / max(avg_vol, 1.0)
        vol_score = max(0, min(35, int((1.2 - vol_ratio) * 35)))
        trend_score = 0
        if float(s50) < float(s200):
            trend_score += 15
        s50_prev = sma(closes[:-10], 50)
        if s50_prev is not None and float(s50) < float(s50_prev):
            trend_score += 10
        prox = abs(bounce_high - level) / level
        prox_score = max(0, min(20, int((1.0 - prox / max(self._tol, 1e-6)) * 20)))
        rng = float(cur.high) - float(cur.low)
        close_pos = (close - float(cur.low)) / rng if rng > 0 else 0.5
        rej_score = max(0, min(20, int((1.0 - close_pos) * 20)))
        strength = max(0, min(100, vol_score + trend_score + prox_score + rej_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"Below 50/200-SMA; broke 20-bar low {level:.2f} {n - 1 - bj} bars ago, then bounced "
                    f"{bounce_pct * 100:.1f}% on declining volume into that level. Trapped breakdown longs supply "
                    f"overhead; short toward post-breakdown low / 3 ATR."),
        )

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 the low-volume bounce to a broken 20-bar low: Loses money · EdgeProven