Skip to content
The Casebook · An idea an AI invented

Short a 5-day rise on light volume and a down bar

Entry at latest close if the 5-day return exceeds 4*ATR(14) divided by close, average volume over those 5 days is below the 50-day average volume, and the latest bar closed below its open. Stop = 5-day high plus 0.3*ATR(14). Target = entry minus 2.0*ATR(14).
Why the AI thought it might work

After a five-day advance of more than 4*ATR on average-or-lower volume, the move reflects thin-liquidity drift rather than information, and with no committed buyers the price lacks support. The imbalance reverses as providers who took the other side unwind. Weekly extension is visible from five closes.

VerdictTested Nov 22, 2026

Too rare to judge

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

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

42 large US stocks, 15 years

Per trade, after costs
−0.665R

Before costs −0.500R

Bar to clear
t > 2.95

By trade and by day, sized to 362 rules

What the numbers say

The rule fired only 7 times on the laggard stocks in 15 years, short of the 30 needed to judge. Those trades averaged −0.665R after costs (−0.499766 before costs), and the 20 winner stocks averaged −1.328R. With 5 bull-market and 2 flat-market trades and none in bear markets, the sample is too thin to support a verdict.

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
Bull5−0.443R−0.62−0.62 · 5d−0.015R · beats 45%−1.393R
Flat2−1.218R−8.48−8.48 · 2d+0.101R · beats 10%−1.177R
Bear0————−1.184R
All7−0.665R+0.018R−1.328R

R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 4.0 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 UpperGapUnfilledAfterExhaustionWeekShort:
    name = "upper_gap_unfilled_after_exhaustion_week_short"
    description = "Short after a >4 ATR five-day advance on at-or-below-average volume once the latest bar closes red."

    def __init__(self, window: int = 5, atr_period: int = 14, ext_atr_mult: float = 4.0,
                 vol_lookback: int = 50, stop_atr_buffer: float = 0.3,
                 target_atr_mult: float = 2.0, min_rr: float = 1.5) -> None:
        self._window = window
        self._atr_period = atr_period
        self._ext_mult = ext_atr_mult
        self._vol_lookback = vol_lookback
        self._stop_buf = stop_atr_buffer
        self._target_mult = target_atr_mult
        self._min_rr = Decimal(str(min_rr))

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        # Minimal history on purpose: no 200-SMA gate, to preserve trade count.
        need = max(self._vol_lookback, self._atr_period + 1, self._window + 1) + 5
        if len(bars) < need:
            return None
        cur = bars[-1]
        # Rule: latest bar closed below its open
        if cur.close >= cur.open:
            return None
        atr_val = atr(bars, self._atr_period)
        if atr_val is None:
            return None
        atr_f = float(atr_val)
        if atr_f <= 0:
            return None
        close_f = float(cur.close)
        base_f = float(bars[-(self._window + 1)].close)
        if close_f <= 0 or base_f <= 0:
            return None
        # Rule: 5-day return exceeds 4*ATR/close
        ret5 = close_f / base_f - 1.0
        thresh = self._ext_mult * atr_f / close_f
        if ret5 <= thresh:
            return None
        # Rule: avg volume of the 5 days at or below 50-day average (50 bars ending today)
        win = bars[-self._window:]
        avg5 = sum(float(b.volume) for b in win) / self._window
        avg50 = sum(float(b.volume) for b in bars[-self._vol_lookback:]) / self._vol_lookback
        if avg50 <= 0 or avg5 > avg50:
            return None
        atr_dec = Decimal(str(atr_f))
        entry = cur.close
        high5 = max(b.high for b in win)
        stop = high5 + Decimal(str(self._stop_buf)) * atr_dec
        target = entry - Decimal(str(self._target_mult)) * atr_dec
        if not (target < entry < stop) or target <= 0:
            return None
        risk = stop - entry
        if risk <= 0:
            return None
        rr = (entry - target) / risk
        if rr < self._min_rr:
            return None
        # Strength: extension beyond threshold (0-40), volume dryness (0-30), red-bar decisiveness (0-30)
        ext_ratio = ret5 / thresh if thresh > 0 else 1.0
        ext_score = max(0, min(40, int((ext_ratio - 1.0) * 40)))
        dry = 1.0 - avg5 / avg50
        vol_score = max(0, min(30, int(dry * 75)))
        rng = float(cur.high - cur.low)
        if rng > 0:
            body = float(cur.open - cur.close) / rng
            close_pos = float(cur.high - cur.close) / rng
        else:
            body = 0.0
            close_pos = 0.0
        bar_score = max(0, min(30, int(body * 15 + close_pos * 15)))
        strength = max(0, min(100, ext_score + vol_score + bar_score))
        thesis = (
            f"5-day gain {ret5*100:.1f}% exceeds 4xATR/close ({thresh*100:.1f}%) on volume "
            f"{avg5/avg50:.2f}x the 50-day average: thin-liquidity drift without committed buyers. "
            f"Red close signals the stall; expect the imbalance to unwind toward entry - 2 ATR. "
            f"Stop above 5-day high {high5} + 0.3 ATR."
        )
        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,
            asset_class="equity",
        )

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 5-day rise on light volume and a down bar: Too rare to judge · EdgeProven