Skip to content
The Casebook · An idea an AI invented

Year-end laggard bounce, Dec 26 to Jan 6 entries

Latest bar between Dec 26 and Jan 6. Require close < 0.80 * 250-day high and 40-day return < -8%. Enter long at close. Stop = entry - 2.0*ATR(14). Target = entry + 3.0*ATR(14).
Why the AI thought it might work

Tax-loss selling in December depresses prior-year losers, especially small/beaten-down names, with a compelled seller (taxable holders realising losses before year-end) and an unwind in early January when selling pressure vanishes. It shows in a single stock as a deep late-year drawdown followed by a mechanical bounce.

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.602R a trade), but no market clears t > 2.95 by trade and by day.
Trades on the laggards
33

42 large US stocks, 15 years

Per trade, after costs
+0.602R

Before costs +0.670R

Bar to clear
t > 2.95

By trade and by day, sized to 362 rules

What the numbers say

Across 33 laggard trades the average was +0.602R after costs, but no market clears the t > 2.95 bar by both trade and day. Bear reached t 3.46 by trade yet only 1.07 by day, resting on 4 distinct days, and flat averaged −1.059R. That is why the verdict is indistinguishable from luck.

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.731R2.081.65 · 8d−0.082R · beats 90%−0.428R
Flat4−1.059R−153.45−15242.43 · 2d+0.152R · beats 0%−0.403R
Bear16+0.912R3.461.07 · 4d+0.181R · beats 100%+1.321R
All33+0.602R+0.074R+0.595R

R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 6.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 JanuaryEffectLoserRebound:
    name = "january_effect_loser_rebound_long"
    description = "First Dec26-Jan6 bar where a deep 250d/40d loser qualifies; long at close, 2.0 ATR stop, 3.2 ATR target, one fire per ticker per window"

    def __init__(self, high_lookback: int = 250, dd_threshold: float = 0.80, ret_lookback: int = 40, ret_threshold: float = -0.08, atr_period: int = 14, stop_atr: float = 2.0, target_atr: float = 3.2) -> None:
        self._hl = high_lookback
        self._dd = dd_threshold
        self._rl = ret_lookback
        self._rt = ret_threshold
        self._ap = atr_period
        self._sa = stop_atr
        self._ta = target_atr

    @staticmethod
    def _in_window(b: Bar) -> bool:
        ts = b.timestamp
        m = ts.month
        d = ts.day
        return (m == 12 and d >= 26) or (m == 1 and d <= 6)

    @staticmethod
    def _window_id(b: Bar) -> int:
        ts = b.timestamp
        return ts.year + 1 if ts.month == 12 else ts.year

    def _qualifies(self, closes: list, highs: list, j: int) -> bool:
        if j < self._hl or j < self._rl:
            return False
        hi = max(highs[j - self._hl + 1:j + 1])
        if hi <= 0 or closes[j] >= self._dd * hi:
            return False
        base = closes[j - self._rl]
        if base <= 0:
            return False
        return (closes[j] / base - 1.0) < self._rt

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        n = len(bars)
        if n < max(self._hl, self._rl) + 20:
            return None
        cur = bars[-1]
        if not self._in_window(cur):
            return None
        i = n - 1
        closes = [float(b.close) for b in bars]
        highs = [float(b.high) for b in bars]
        if not self._qualifies(closes, highs, i):
            return None
        # Dedupe: fire only on the first qualifying bar in this window
        wid = self._window_id(cur)
        j = i - 1
        while j >= 0 and self._in_window(bars[j]) and self._window_id(bars[j]) == wid:
            if self._qualifies(closes, highs, j):
                return None
            j -= 1

        atr_val = atr(bars, self._ap)
        if atr_val is None or atr_val <= 0:
            return None
        a = Decimal(str(atr_val))
        entry = cur.close
        stop = entry - Decimal(str(self._sa)) * a
        target = entry + Decimal(str(self._ta)) * a
        if stop <= 0 or not (stop < entry < target):
            return None
        risk = entry - stop
        rr = (target - entry) / risk
        if rr < Decimal("1.5"):
            return None

        hi = max(highs[i - self._hl + 1:i + 1])
        dd = 1.0 - closes[i] / hi
        ret40 = closes[i] / closes[i - self._rl] - 1.0
        dd_score = min(40, max(0, int((dd - 0.20) / 0.40 * 40)))
        ret_score = min(30, max(0, int((-ret40 - 0.08) / 0.25 * 30)))
        avg_vol = sum(float(b.volume) for b in bars[-21:-1]) / 20.0
        vol_ratio = float(cur.volume) / max(avg_vol, 1.0)
        vol_score = min(15, max(0, int((vol_ratio - 0.8) * 15)))
        rng = float(cur.high - cur.low)
        cpos = (closes[i] - float(cur.low)) / rng if rng > 0 else 0.5
        close_score = min(15, max(0, int(cpos * 15)))
        strength = max(0, min(100, dd_score + ret_score + vol_score + close_score))

        season = f"{wid - 1}-{wid}"
        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"[TLS window {season}] Tax-loss rebound: close {dd*100:.1f}% below 250d high, "
                f"40d return {ret40*100:.1f}%. Compelled December sellers exhausted; expecting turn-of-year unwind. "
                f"First qualifying bar this window; fixed 2.0/3.2 ATR geometry."
            ),
        )

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
Year-end laggard bounce, Dec 26 to Jan 6 entries: Indistinguishable from luck · EdgeProven