Skip to content
The Casebook · An idea an AI invented

Quarter-start buy after a 12% fall, 3-day-low stop

Entry at latest close if it is among the first 5 trading days of Jan, Apr, Jul or Oct, 60-day return is below -12%, and the close is above the 3-day low by at least 0.3*ATR(14) (stabilisation). Stop = 3-day low minus 0.3*ATR(14). Target = entry + 2.4*ATR(14).
Why the AI thought it might work

At the start of a new quarter, institutions that sold losers into quarter-end for window dressing and tax and reporting reasons slowly rebuy. Stocks in the bottom of their 60-day return range that were sold into quarter end see the supply removed. Pairing the first 5 sessions of the quarter with a stock-specific drawdown keeps trades independent.

VerdictTested Nov 22, 2026

Indistinguishable from luck

It looks positive, but not more than chance would produce at this many tries, or than the same plan on random dates.

  • Positive (+0.294R a trade), but no market clears t > 2.95 by trade and by day.
Trades on the laggards
164

42 large US stocks, 15 years

Per trade, after costs
+0.294R

Before costs +0.398R

Bar to clear
t > 2.95

By trade and by day, sized to 362 rules

What the numbers say

Across 164 laggard trades the average result after costs was +0.294R, and the beat over random dates was complete in bull and bear markets. But no market reached the t bar of 2.95 by trade and by day (best: bear 1.98 and 1.53; flat 0.06 and 0.03). A gain this size is within what luck could produce among 362 rules tried.

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
Bull73+0.338R1.561.70 · 48d−0.144R · beats 100%+0.126R
Flat41+0.017R0.060.03 · 21d−0.062R · beats 70%+0.297R
Bear50+0.458R1.981.53 · 15d+0.109R · beats 100%+0.864R
All164+0.294R−0.046R+0.499R

R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 10.8 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 FirstWeekOfQuarterLaggardReinvestmentLong:
    name = "first_week_of_quarter_laggard_reinvestment_long"
    description = "Long a 60-day laggard in the first 5 sessions of a quarter after it stabilises off its 3-day low."

    def __init__(self, max_session: int = 5, ret_lookback: int = 60, ret_threshold: float = -0.12,
                 low_window: int = 3, stab_atr: float = 0.3, stop_atr: float = 0.3,
                 target_atr: float = 2.4, atr_period: int = 14, min_bars: int = 90) -> None:
        self._max_session = max_session
        self._ret_lookback = ret_lookback
        self._ret_threshold = ret_threshold
        self._low_window = low_window
        self._stab_atr = stab_atr
        self._stop_atr = stop_atr
        self._target_atr = target_atr
        self._atr_period = atr_period
        self._min_bars = min_bars

    def _session_of_quarter(self, bars):
        cur = bars[-1].timestamp
        if cur.month not in (1, 4, 7, 10):
            return None
        n = 0
        i = len(bars) - 1
        while i >= 0:
            ts = bars[i].timestamp
            if ts.year == cur.year and ts.month == cur.month:
                n += 1
                i -= 1
            else:
                break
        if i < 0:
            return None
        return n

    def _evaluate(self, bars):
        if len(bars) < self._min_bars:
            return None
        sess = self._session_of_quarter(bars)
        if sess is None or sess > self._max_session:
            return None
        cur = bars[-1]
        past = bars[-(self._ret_lookback + 1)].close
        if past <= 0:
            return None
        ret = float(cur.close / past) - 1.0
        if ret >= self._ret_threshold:
            return None
        a = atr(bars, self._atr_period)
        if a is None or a <= 0:
            return None
        a_dec = Decimal(str(a))
        low3 = min(b.low for b in bars[-self._low_window:])
        lift = cur.close - low3
        if lift < Decimal(str(self._stab_atr)) * a_dec:
            return None
        entry = cur.close
        stop = low3 - Decimal(str(self._stop_atr)) * a_dec
        target = entry + Decimal(str(self._target_atr)) * a_dec
        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
        return (sess, ret, a_dec, entry, stop, target, rr)

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        if len(bars) < self._min_bars:
            return None
        res = self._evaluate(bars)
        if res is None:
            return None
        sess, ret, a_dec, entry, stop, target, rr = res
        # Fire only on the first qualifying session of the quarter (trade independence)
        for k in range(1, sess):
            if self._evaluate(bars[:len(bars) - k]) is not None:
                return None
        cur = bars[-1]
        # Strength: drawdown depth, close location, volume, rr
        depth_score = min(30, max(0, int((-ret - 0.12) * 150) + 10))
        rng = cur.high - cur.low
        if rng > 0:
            cpos = float((cur.close - cur.low) / rng)
        else:
            cpos = 0.5
        close_score = min(25, max(0, int(cpos * 25)))
        vols = [float(b.volume) for b in bars[-21:-1]]
        avg_vol = sum(vols) / len(vols) if vols else 0.0
        vr = float(cur.volume) / avg_vol if avg_vol > 0 else 1.0
        vol_score = min(25, max(0, int((vr - 0.7) * 25)))
        rr_score = min(20, max(0, int((float(rr) - 1.5) * 10)))
        strength = max(0, min(100, depth_score + close_score + vol_score + rr_score))
        thesis = (
            f"Quarter session {sess}: 60-day return {ret*100:.1f}% after quarter-end loser selling; "
            f"close is {float((entry - stop) / a_dec) - self._stop_atr:.2f} ATR above the 3-day low, "
            f"which suggests the window-dressing supply has cleared and new-quarter money can come back in. "
            f"Stop under the 3-day low; target 2.4 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=int(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
Quarter-start buy after a 12% fall, 3-day-low stop: Indistinguishable from luck · EdgeProven