Skip to content
The Casebook · An idea an AI invented

Dip buy on Mon/Tue after monthly option expiry, uptrend only

Entry at latest close if today is the Monday or Tuesday after the third Friday of a month (date-based), the stock fell at least 3% over the prior 5 sessions, and the close is above the 200-day SMA. Stop 1.3 ATR below. Target 2 ATR above.
Why the AI thought it might work

Dealers hedging large option positions pin or push stocks into expiration Friday. After expiry, hedges roll off and displaced prices revert. A stock that fell more than 3% during opex week alone, with the decline concentrated at the Friday close, tends to recover as pinning pressure disappears the following Monday and Tuesday.

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

42 large US stocks, 15 years

Per trade, after costs
+0.073R

Before costs +0.165R

Bar to clear
t > 2.95

By trade and by day, sized to 362 rules

What the numbers say

On 201 laggard trades the idea averaged +0.073R after costs (0.165R before). Bull markets were −0.050R (t −0.42 by trade, −0.43 by day), flat 0.320R and bear 0.608R, but the flat and bear gains rest on only 14 and 6 distinct days. No market reached the t of 2.95 needed by trade and by day, so luck explains the result as well as an edge.

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
Bull149−0.050R−0.42−0.43 · 65d−0.036R · beats 35%+0.240R
Flat33+0.320R1.22−0.37 · 14d−0.033R · beats 85%−0.126R
Bear19+0.608R1.731.14 · 6d−0.010R · beats 100%+0.828R
All201+0.073R−0.033R+0.228R

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.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 datetime import datetime, timedelta

from core.domain import Bar
from strategies.indicators import atr, sma
from scanners.base import Candidate


def _bar_date(b):
    try:
        d = b.timestamp
    except AttributeError:
        try:
            d = b.date
        except AttributeError:
            try:
                d = b.ts
            except AttributeError:
                return None
    if isinstance(d, datetime):
        return d.date()
    return d


class PostOpexGammaReleaseReversionLong:
    name = "post_opex_monday_gamma_release_reversion_long"
    description = "Long the first session after monthly opex when the stock fell >=3% during opex week and holds above its 200-SMA."

    def __init__(self, min_drop: float = 0.03, week_len: int = 5, stop_atr: float = 1.3, target_atr: float = 2.0, max_target_atr: float = 3.0) -> None:
        self._min_drop = min_drop
        self._week_len = week_len
        self._stop_atr = stop_atr
        self._target_atr = target_atr
        self._max_target_atr = max_target_atr

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        if len(bars) < 220:
            return None
        today = _bar_date(bars[-1])
        prev = _bar_date(bars[-2])
        if today is None or prev is None:
            return None
        wd = today.weekday()
        if wd not in (0, 1):
            return None
        # Friday immediately preceding today
        fri = today - timedelta(days=wd + 3)
        if not (15 <= fri.day <= 21):
            return None
        # Today must be the FIRST session after opex Friday (Monday, or Tuesday if Monday was a holiday)
        if prev > fri:
            return None
        # prev bar is the opex Friday session (or Thursday if Friday was a holiday)
        if (fri - prev).days > 3:
            return None
        n = self._week_len
        fri_idx = len(bars) - 2
        if fri_idx - n < 0:
            return None
        week_start_close = bars[fri_idx - n].close
        fri_close = bars[fri_idx].close
        if week_start_close <= 0:
            return None
        week_ret = float((fri_close - week_start_close) / week_start_close)
        if week_ret > -self._min_drop:
            return None
        current = bars[-1]
        entry = current.close
        # Displacement must still exist: not already fully reverted
        if entry >= week_start_close:
            return None
        closes = [b.close for b in bars]
        sma_200 = sma(closes, 200)
        if sma_200 is None:
            return None
        sma_dec = Decimal(str(sma_200))
        if entry <= sma_dec:
            return None
        atr_val = atr(bars, 14)
        if atr_val is None or atr_val <= 0:
            return None
        atr_dec = Decimal(str(atr_val))
        stop = entry - Decimal(str(self._stop_atr)) * atr_dec
        base_target = entry + Decimal(str(self._target_atr)) * atr_dec
        cap_target = entry + Decimal(str(self._max_target_atr)) * atr_dec
        # Structural anchor: pre-opex-week close (full reversion), bounded to [2, 3] ATR
        target = max(base_target, min(week_start_close, cap_target))
        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
        drop_score = min(35, max(0, int((abs(week_ret) - self._min_drop) / 0.07 * 35)))
        prev_close_thu = bars[fri_idx - 1].close
        fri_ret = float((fri_close - prev_close_thu) / prev_close_thu) if prev_close_thu > 0 else 0.0
        conc = 0.0
        if fri_ret < 0 and week_ret < 0:
            conc = min(1.0, fri_ret / week_ret)
        conc_score = int(conc * 30)
        trend_gap = float((entry - sma_dec) / sma_dec)
        trend_score = min(15, max(0, int(trend_gap * 150)))
        rng = current.high - current.low
        close_pos = float((current.close - current.low) / rng) if rng > 0 else 0.5
        close_score = min(20, max(0, int(close_pos * 20)))
        strength = max(0, min(100, drop_score + conc_score + trend_score + close_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"First session after monthly opex ({fri.isoformat()}): fell {week_ret*100:.1f}% during opex week "
                f"(Friday share {conc*100:.0f}%), still above the 200-SMA. Expect reversion as dealer hedges roll off; "
                f"target is the pre-week close, bounded to 2-3 ATR."
            ),
        )

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
Dip buy on Mon/Tue after monthly option expiry, uptrend only: Indistinguishable from luck · EdgeProven