Skip to content
The Casebook · An idea an AI invented

High-volume surge, pullback holding above bar midpoint

Condition: an event bar 4 to 10 sessions ago with volume at least 3x the 50-day average, close-over-close gain of at least 5% and close in the top 30% of range; since then no close below the event-bar midpoint; latest close above the prior 3 closes' mean. Entry long at close. Stop below the event-bar midpoint. Target 2.5x ATR(14) above close.
Why the AI thought it might work

A single bar on 3x+ volume with a 5%+ up close and range expansion is almost always an information event; institutions who cannot fill the whole position in one day keep accumulating over subsequent sessions, causing post-event drift that outlives costs. The pullback that holds above the event-day midpoint marks continued accumulation.

VerdictTested Nov 22, 2026

Too rare to judge

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

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

42 large US stocks, 15 years

Per trade, after costs
−0.080R

Before costs +0.012R

Bar to clear
t > 2.95

By trade and by day, sized to 362 rules

What the numbers say

The laggard stocks gave only 17 trades in 15 years, short of the 30 needed, so no verdict is given. Per trade after costs the result was −0.08R, against 0.48R on the winners. Bull markets showed 0.164R from 13 trades; flat showed −0.796R from 3 trades.

How it was tested

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

Side
Long
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
Bull13+0.164R0.310.31 · 13d+0.014R · beats 55%+0.453R
Flat3−0.796R−2.45−2.45 · 3d+0.091R · beats 20%−0.393R
Bear1−1.104R—— · 1d−0.057R · beats 10%+1.236R
All17−0.080R+0.023R+0.480R

R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 13.6 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 EarningsVolumeShockDriftLong:
    name = "earnings_season_volume_shock_drift_proxy_long"
    description = "First turn-up after a pullback holding above the midpoint of a recent 3x-volume +5% event bar"

    def __init__(self, min_age: int = 4, max_age: int = 10, vol_mult: float = 3.0, min_gain: float = 0.05, close_pos_min: float = 0.70, range_mult: float = 1.5, stop_buf_atr: float = 0.10, target_atr: float = 2.5, max_target_atr: float = 3.5, min_rr: float = 1.5, min_bars: int = 220) -> None:
        self._min_age = min_age
        self._max_age = max_age
        self._vol_mult = vol_mult
        self._min_gain = min_gain
        self._close_pos_min = close_pos_min
        self._range_mult = range_mult
        self._stop_buf = Decimal(str(stop_buf_atr))
        self._target_atr = Decimal(str(target_atr))
        self._max_target_atr = Decimal(str(max_target_atr))
        self._min_rr = Decimal(str(min_rr))
        self._min_bars = min_bars

    def _event_at(self, bars, k):
        if k < 51:
            return None
        b = bars[k]
        avg_vol = sum(float(x.volume) for x in bars[k - 50:k]) / 50.0
        if avg_vol <= 0:
            return None
        vol_ratio = float(b.volume) / avg_vol
        if vol_ratio < self._vol_mult:
            return None
        pc = float(bars[k - 1].close)
        if pc <= 0:
            return None
        gain = float(b.close) / pc - 1.0
        if gain < self._min_gain:
            return None
        rng = float(b.high - b.low)
        if rng <= 0:
            return None
        if (float(b.close) - float(b.low)) / rng < self._close_pos_min:
            return None
        avg_rng = sum(float(x.high - x.low) for x in bars[k - 20:k]) / 20.0
        if avg_rng <= 0 or rng < self._range_mult * avg_rng:
            return None
        return vol_ratio

    def _turn_up(self, bars, j):
        if j < 5:
            return False
        c = bars[j].close
        m_now = (bars[j - 1].close + bars[j - 2].close + bars[j - 3].close) / Decimal(3)
        if c <= m_now:
            return False
        m_prev = (bars[j - 2].close + bars[j - 3].close + bars[j - 4].close) / Decimal(3)
        return bars[j - 1].close <= m_prev

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        n = len(bars)
        if n < max(self._min_bars, 60 + self._max_age):
            return None
        i = n - 1
        for age in range(0, self._min_age):
            if self._event_at(bars, i - age) is not None:
                return None
        k = -1
        vol_ratio = 0.0
        for age in range(self._min_age, self._max_age + 1):
            vr = self._event_at(bars, i - age)
            if vr is not None:
                k = i - age
                vol_ratio = vr
                break
        if k < 0:
            return None
        ev = bars[k]
        mid = (ev.high + ev.low) / Decimal(2)
        post = bars[k + 1:i + 1]
        if any(b.close < mid for b in post):
            return None
        if not self._turn_up(bars, i):
            return None
        for j in range(k + self._min_age, i):
            if self._turn_up(bars, j):
                return None
        atr_val = atr(bars, 14)
        if atr_val is None or atr_val <= 0:
            return None
        a = Decimal(str(atr_val))
        cur = bars[-1]
        entry = cur.close
        stop = mid - self._stop_buf * a
        risk = entry - stop
        if risk <= 0:
            return None
        dist = max(self._target_atr * a, min(self._max_target_atr * a, Decimal("1.6") * risk))
        target = entry + dist
        rr = dist / risk
        if rr < self._min_rr:
            return None
        vol_score = min(35, max(0, int((vol_ratio - self._vol_mult) / 5.0 * 35)))
        span = float(ev.close - mid)
        min_c = float(min(b.close for b in post))
        hold = (min_c - float(mid)) / span if span > 0 else 0.0
        hold_score = min(30, max(0, int(hold * 30)))
        closes = [float(b.close) for b in bars]
        s50 = sum(closes[-50:]) / 50.0
        s200 = sum(closes[-200:]) / 200.0
        c = float(entry)
        trend_score = (10 if c > s50 else 0) + (10 if c > s200 else 0)
        rng = cur.high - cur.low
        cp = float((cur.close - cur.low) / rng) if rng > 0 else 0.5
        close_score = min(15, max(0, int(cp * 15)))
        strength = max(0, min(100, vol_score + hold_score + trend_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=(f"Volume-shock event {i - k} bars ago ({vol_ratio:.1f}x avg vol, +5%+ close, range expansion). "
                    f"Pullback held above event midpoint {mid:.2f}; first turn-up since suggests institutions are still accumulating and drift should continue."),
        )

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
High-volume surge, pullback holding above bar midpoint: Too rare to judge · EdgeProven