Skip to content
The Casebook · An idea an AI invented

Bounce after a sharp five-day drop, two up closes on volume

Require five-day return <= -8% measured at 2 bars ago, then two consecutive up closes with today's volume above yesterday's volume and above the 20-bar average, close below the 20-SMA. Enter long at the latest close; stop below the 2-day low minus 0.3 ATR(14); target 3 x ATR(14) above.
Why the AI thought it might work

After a one-sided five-day sell-off, market makers reduce quotes and spreads widen; the first bounce day is often a technical short-cover, but a second consecutive up close on rising volume shows genuine buyers entering as liquidity providers are repaid and spreads normalize. The reversal from liquidity shocks is a documented premium concentrated in the days right after the extreme.

VerdictTested Nov 22, 2026

Loses money

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

  • −0.265R a trade after costs on the laggard stocks.
Trades on the laggards
80

42 large US stocks, 15 years

Per trade, after costs
−0.265R

Before costs −0.182R

Bar to clear
t > 2.95

By trade and by day, sized to 362 rules

What the numbers say

On the laggard stocks the idea averaged −0.265R a trade after costs over 80 trades, against 0.039R on the winners. It trailed random dates in flat markets (−0.780R, t −3.09, beating 0.0% of random draws) and bear markets (−0.205R, 20% beaten). Bull markets were −0.164R, so no market type showed a gain.

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
Bull38−0.164R−0.61−0.61 · 38d−0.219R · beats 65%+0.403R
Flat11−0.780R−3.09−3.09 · 11d+0.198R · beats 0%−0.797R
Bear31−0.205R−0.870.20 · 20d+0.090R · beats 20%+0.070R
All80−0.265R−0.042R+0.039R

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.1 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 SecondGreenDayAfterSelloff:
    name = "second_green_day_after_five_day_selloff_liquidity_long"
    description = "Second consecutive up close on rising, above-average volume after a >=8% five-day selloff, still below the 20-SMA."

    def __init__(self, selloff_pct: float = -0.08, selloff_len: int = 5, vol_lookback: int = 20,
                 sma_len: int = 20, atr_len: int = 14, stop_atr_buf: float = 0.3,
                 target_atr_mult: float = 3.0, min_bars: int = 60) -> None:
        self._selloff_pct = selloff_pct
        self._selloff_len = selloff_len
        self._vol_lookback = vol_lookback
        self._sma_len = sma_len
        self._atr_len = atr_len
        self._stop_buf = stop_atr_buf
        self._tgt_mult = target_atr_mult
        self._min_bars = min_bars

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        n = len(bars)
        need = max(self._min_bars, self._selloff_len + 4, self._vol_lookback + 2, self._sma_len + 1, self._atr_len + 2)
        if n < need:
            return None
        cur = bars[-1]
        prev = bars[-2]
        anchor = bars[-3]
        base = bars[-3 - self._selloff_len]
        base_c = float(base.close)
        anchor_c = float(anchor.close)
        if base_c <= 0 or anchor_c <= 0:
            return None
        five_ret = anchor_c / base_c - 1.0
        if five_ret > self._selloff_pct:
            return None
        # two consecutive up closes
        if not (float(prev.close) > anchor_c and float(cur.close) > float(prev.close)):
            return None
        # volume confirmation
        cur_vol = float(cur.volume)
        prev_vol = float(prev.volume)
        vol_window = bars[-(self._vol_lookback + 1):-1]
        avg_vol = sum(float(b.volume) for b in vol_window) / len(vol_window)
        if avg_vol <= 0 or cur_vol <= prev_vol or cur_vol <= avg_vol:
            return None
        # still below 20-SMA
        closes = [float(b.close) for b in bars[-self._sma_len:]]
        sma_val = sum(closes) / len(closes)
        close_f = float(cur.close)
        if close_f >= sma_val:
            return None
        atr_val = atr(bars, self._atr_len)
        if atr_val is None:
            return None
        atr_f = float(atr_val)
        if atr_f <= 0:
            return None
        atr_d = Decimal(str(atr_f))
        entry = cur.close
        two_day_low = min(cur.low, prev.low)
        stop = two_day_low - Decimal(str(self._stop_buf)) * atr_d
        target = entry + Decimal(str(self._tgt_mult)) * atr_d
        risk = entry - stop
        if risk <= 0 or stop <= 0 or target <= entry:
            return None
        rr = (target - entry) / risk
        if rr < Decimal("1.5"):
            return None
        # strength components
        depth = min(1.0, max(0.0, (-five_ret - 0.08) / 0.12))
        depth_score = int(depth * 30)
        vr = cur_vol / avg_vol
        vol_score = int(min(1.0, max(0.0, (vr - 1.0) / 1.5)) * 30)
        rng = float(cur.high - cur.low)
        cpos = (close_f - float(cur.low)) / rng if rng > 0 else 0.5
        close_score = int(min(1.0, max(0.0, cpos)) * 20)
        room = (sma_val - close_f) / atr_f
        room_score = int(min(1.0, max(0.0, room / 2.0)) * 20)
        strength = max(0, min(100, depth_score + vol_score + close_score + room_score))
        thesis = (
            f"Five-day drop of {five_ret*100:.1f}% into 2 bars ago, then two consecutive up closes; "
            f"today's volume is {vr:.2f}x the 20-bar average and above yesterday's, and price is still "
            f"below the 20-SMA. This reads as liquidity-shock reversal buyers stepping in. "
            f"Stop is below the 2-day low minus {self._stop_buf} ATR; target is {self._tgt_mult} ATR above entry."
        )
        return Candidate(
            ticker=ticker,
            side="buy",
            entry=entry,
            stop=stop,
            target=target,
            risk_reward_ratio=rr.quantize(Decimal("0.01")),
            signal_strength=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
Bounce after a sharp five-day drop, two up closes on volume: Loses money · EdgeProven