Skip to content
The Casebook · An idea an AI invented

Buy after four weak closes, stop 1.5x ATR, target 2.5x ATR

Fire when each of the last 4 closes is in the bottom 20% of that day's range and the 4-day return is below -6%, with close above the 250-day low by at least 5%. Enter long at close. Stop 1.5x ATR(14) below the 4-day low; target 2.5x ATR above.
Why the AI thought it might work

Four consecutive closes in the bottom 20% of the daily range indicate persistent forced selling into the close, typical of fund redemptions and stop cascades at session end. When sellers have no further inventory to dump, the closing auction pressure vanishes and price reverts.

VerdictTested Nov 22, 2026

Loses money

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

  • −0.226R a trade after costs on the laggard stocks.
Trades on the laggards
41

42 large US stocks, 15 years

Per trade, after costs
−0.226R

Before costs −0.150R

Bar to clear
t > 2.95

By trade and by day, sized to 362 rules

What the numbers say

On the 22 laggard stocks, 41 trades averaged −0.226R after costs (−0.150R before costs). The 20 winner stocks did worse at −0.355R. Bull (−0.155R), flat (−0.217R) and bear (−0.563R) markets were all negative, and in each the idea beat only 30%, 25% and 15% of random-date draws.

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
Bull22−0.155R−0.56−0.56 · 22d−0.003R · beats 30%−0.169R
Flat14−0.217R−0.58−0.23 · 10d+0.074R · beats 25%−0.396R
Bear5−0.563R−0.85−0.85 · 5d−0.007R · beats 15%−2.049R
All41−0.226R+0.023R−0.355R

R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 14.3 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 MultiDayLowCloseExhaustionLong:
    name = "multi_day_low_close_location_exhaustion_long"
    description = "Four consecutive bottom-20% closes with a >6% 4-day drop, still >5% above the 250-day low: fade exhausted closing-auction selling."

    def __init__(self, streak: int = 4, close_loc_max: float = 0.20, min_drop_pct: float = 0.06, low_lookback: int = 250, min_above_low_pct: float = 0.05, atr_period: int = 14, stop_atr_mult: float = 1.5, target_atr_mult: float = 2.5, target_cap_atr_mult: float = 3.5, min_rr: float = 1.52) -> None:
        self._streak = streak
        self._close_loc_max = close_loc_max
        self._min_drop = min_drop_pct
        self._low_lookback = low_lookback
        self._min_above_low = min_above_low_pct
        self._atr_period = atr_period
        self._stop_mult = Decimal(str(stop_atr_mult))
        self._tgt_mult = Decimal(str(target_atr_mult))
        self._cap_mult = Decimal(str(target_cap_atr_mult))
        self._min_rr = Decimal(str(min_rr))

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        need = max(self._low_lookback, self._atr_period + 1, self._streak + 25) + 5
        if len(bars) < need:
            return None
        current = bars[-1]
        window = bars[-self._streak:]

        locs = []
        for b in window:
            rng = b.high - b.low
            if rng <= 0:
                return None
            loc = float((b.close - b.low) / rng)
            if loc > self._close_loc_max:
                return None
            locs.append(loc)

        ref_close = bars[-self._streak - 1].close
        if ref_close <= 0:
            return None
        ret = float(current.close / ref_close) - 1.0
        if ret > -self._min_drop:
            return None

        low_n = min(b.low for b in bars[-self._low_lookback:])
        if low_n <= 0:
            return None
        above_low = float(current.close / low_n) - 1.0
        if above_low < self._min_above_low:
            return None

        atr_val = atr(bars, self._atr_period)
        if atr_val is None or atr_val <= 0:
            return None
        atr_d = Decimal(str(atr_val))

        entry = current.close
        low4 = min(b.low for b in window)
        stop = low4 - self._stop_mult * atr_d
        risk = entry - stop
        if risk <= 0 or stop <= 0:
            return None

        spec_target = entry + self._tgt_mult * atr_d
        cap = entry + self._cap_mult * atr_d
        anchor = min(ref_close, cap)
        target = max(spec_target, anchor)
        rr = (target - entry) / risk
        if rr < self._min_rr:
            floor_t = entry + self._min_rr * risk
            if floor_t > cap:
                return None
            target = floor_t
            rr = (target - entry) / risk
        if target <= entry or rr < self._min_rr:
            return None

        drop_score = min(40.0, max(0.0, 10.0 + (abs(ret) - self._min_drop) / 0.10 * 30.0))
        avg_loc = sum(locs) / len(locs)
        loc_score = min(30.0, max(0.0, 30.0 * (1.0 - avg_loc / self._close_loc_max)))
        prior = bars[-(self._streak + 20):-self._streak]
        prior_vol = sum(float(b.volume) for b in prior) / max(len(prior), 1)
        recent_vol = sum(float(b.volume) for b in window) / len(window)
        vol_ratio = recent_vol / prior_vol if prior_vol > 0 else 1.0
        vol_score = min(30.0, max(0.0, (vol_ratio - 1.0) * 30.0))
        strength = int(max(0, min(100, round(drop_score + loc_score + vol_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"{self._streak} straight closes in the bottom {int(self._close_loc_max*100)}% of range "
                f"(avg loc {avg_loc:.2f}), 4-day return {ret*100:.1f}%, {above_low*100:.1f}% above 250-day low; "
                f"forced closing-auction selling likely exhausted, expect reversion. Vol ratio {vol_ratio:.2f}."
            ),
        )

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 four weak closes, stop 1.5x ATR, target 2.5x ATR: Loses money · EdgeProven