Skip to content
The Casebook · An idea an AI invented

Buy after a high-volume gap-down and two calm up days

Entry at latest close if 3 bars ago was a gap-down (open < prior low) with volume >= 2.5x the 20-day average and a close in the lower half of the range, and the last two bars each had range below 0.8*ATR(14) and closed above their open. Stop = low of the capitulation bar. Target = entry + 2.0*ATR(14).
Why the AI thought it might work

After a gap-down day on 2.5x volume, the next two days narrowing to below-average range show forced sellers are done and liquidity providers have absorbed the supply. Value investors and short-covering then drive a rebound. Condition appears in one stock's daily OHLCV.

VerdictTested Nov 22, 2026

Too rare to judge

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

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

42 large US stocks, 15 years

Per trade, after costs
−0.035R

Before costs +0.054R

Bar to clear
t > 2.95

By trade and by day, sized to 362 rules

What the numbers say

On the laggard stocks the pattern appeared only 6 times in 15 years, all in bull markets, against the 30 needed to judge. Those trades averaged −0.035R after costs (0.054 before), and beat 65% of random-date draws, which averaged −0.194. The 20 winners averaged 1.025R, but they don't decide the verdict, so the sample is too small to judge.

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
Bull6−0.035R−0.05−0.05 · 6d−0.194R · beats 65%+2.093R
Flat0————−1.112R
Bear0—————
All6−0.035R−0.194R+1.025R

R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 7.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 RangeCompressionAfterCapitulationGapLong:
    name = "range_compression_after_capitulation_gap_long"
    description = "High-volume gap-down capitulation followed by two compressed non-down bars holding the capitulation low; long the rebound."

    def __init__(self, vol_mult: float = 2.0, compression_mult: float = 0.8, atr_period: int = 14, target_atr_mult: float = 2.0, vol_lookback: int = 20, min_rr: float = 1.5) -> None:
        self._vol_mult = vol_mult
        self._comp = compression_mult
        self._atr_p = atr_period
        self._tgt_mult = target_atr_mult
        self._vol_lb = vol_lookback
        self._min_rr = min_rr

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        need = max(self._vol_lb, self._atr_p) + 10
        if len(bars) < need:
            return None
        cap = bars[-3]
        pre = bars[-4]
        d1 = bars[-2]
        d2 = bars[-1]

        # 1. Gap-down capitulation bar: open below the prior bar's low.
        if cap.open >= pre.low:
            return None
        cap_rng = cap.high - cap.low
        if cap_rng <= 0:
            return None
        cap_close_pos = float((cap.close - cap.low) / cap_rng)
        if cap_close_pos > 0.5:
            return None
        vol_window = bars[-(self._vol_lb + 3):-3]
        avg_vol = sum(float(b.volume) for b in vol_window) / len(vol_window)
        if avg_vol <= 0:
            return None
        vol_ratio = float(cap.volume) / avg_vol
        if vol_ratio < self._vol_mult:
            return None

        # 2. Compression measured against the PRE-capitulation ATR, so the
        #    capitulation bar does not inflate the threshold.
        pre_atr = atr(bars[:-3], self._atr_p)
        if pre_atr is None or pre_atr <= 0:
            return None
        thresh = Decimal(str(pre_atr)) * Decimal(str(self._comp))
        r1 = d1.high - d1.low
        r2 = d2.high - d2.low
        if r1 >= thresh or r2 >= thresh:
            return None

        # 3. Absorption: both bars close >= open (one may be flat), at least one up.
        if d1.close < d1.open or d2.close < d2.open:
            return None
        if not (d1.close > d1.open or d2.close > d2.open):
            return None
        # Sellers done: no undercut of the capitulation low.
        if min(d1.low, d2.low) <= cap.low:
            return None

        # Levels
        cur_atr = atr(bars, self._atr_p)
        if cur_atr is None or cur_atr <= 0:
            return None
        atr_dec = Decimal(str(cur_atr))
        entry = d2.close
        stop = cap.low
        risk = entry - stop
        if risk <= 0:
            return None
        target = entry + Decimal(str(self._tgt_mult)) * atr_dec
        if target <= entry:
            return None
        rr = (target - entry) / risk
        if rr < Decimal(str(self._min_rr)):
            return None

        # Strength: volume climax + compression tightness + capitulation decisiveness
        vol_score = min(35.0, max(0.0, (vol_ratio - self._vol_mult) / 2.0 * 35.0 + 10.0))
        avg_r = float((r1 + r2) / 2)
        tight = 1.0 - avg_r / float(thresh)
        comp_score = min(35.0, max(0.0, tight * 35.0 / 0.6))
        gap_pct = float((pre.low - cap.open) / pre.low) if pre.low > 0 else 0.0
        decis = (0.5 - cap_close_pos) / 0.5 * 15.0 + min(15.0, gap_pct * 500.0)
        decis_score = min(30.0, max(0.0, decis))
        strength = int(max(0, min(100, round(vol_score + comp_score + decis_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"Gap-down capitulation 2 bars ago on {vol_ratio:.1f}x volume with a weak close, "
                f"followed by two compressed (<{self._comp}x pre-gap ATR) non-down bars holding the "
                f"capitulation low. Forced selling looks absorbed; targeting a {self._tgt_mult}x ATR rebound."
            ),
        )

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
Buy after a high-volume gap-down and two calm up days: Too rare to judge · EdgeProven