Skip to content
The Casebook · A classic strategy

Buy the day before a US market holiday, sell the day after

Buy the day before a US market holiday and sell the day after.
VerdictTested Nov 22, 2026

Loses money

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

  • −0.080R a trade after costs on the laggard stocks.
Trades on the laggards
2,827

42 large US stocks, 15 years

Per trade, after costs
−0.080R

Before costs −0.002R

Bar to clear
t > 2.01

By trade and by day, sized to a first try

What the numbers say

Across 2827 laggard-stock trades the idea averaged −0.080R after costs, against −0.002R before costs, so trading costs account for nearly the whole loss. The 20 winners were also negative at −0.055R. Every market type was negative: bull −0.093R, flat −0.053R, bear −0.031R.

How it was tested

Buy at the close on the last trading day before a US market holiday and sell at the close of the first trading day after the holiday.

Side
Long
Its own exit
Exit at the close of the first trading day after the holiday, i.e. the first bar following the multi-day gap in dates., checked at each close
Time limit
Exit at the close after 3 trading days, unless the stop, the target or its own exit comes first
Bar to clear
t > 2.01, by trade and by day, sized to a first try (one idea, tested once)
Prices
15 years of daily bars through 2026-11-20; judged 2026-11-22
Choices made where the idea was open
  • Holidays are detected from the bars themselves: a missing weekday between two consecutive bars (excluding ordinary weekends) marks a market holiday.
  • 'Day before' means the last trading day before the closure; 'day after' means the first trading day after it.
  • Entry and exit are both at the close, consistent with the harness.
  • Stop and target are wide protective levels (3 x ATR and 6 x ATR) since the idea names none; the real exit is the post-holiday close.
  • Three-day weekends (Friday or Monday holidays) are included, as are midweek holidays; max hold of 3 bars is a safety cap.

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
Bull2,048−0.093R−16.86−8.01 · 94d−0.081R · beats 5%−0.063R
Flat474−0.053R−4.51−1.32 · 22d−0.073R · beats 95%−0.063R
Bear305−0.031R−2.52−0.71 · 14d−0.058R · beats 90%+0.004R
All2,827−0.080R−0.077R−0.055R

R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 13.9 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
from scanners.base import Candidate


def _bar_dt(b):
    try:
        d = b.timestamp
    except AttributeError:
        d = b.date
    if isinstance(d, datetime):
        return datetime(d.year, d.month, d.day)
    return datetime(d.year, d.month, d.day)


def _nth_weekday(year, month, weekday, n):
    d = datetime(year, month, 1)
    while d.weekday() != weekday:
        d += timedelta(days=1)
    return d + timedelta(days=7 * (n - 1))


def _last_weekday(year, month, weekday):
    d = datetime(year + (month == 12), (month % 12) + 1, 1) - timedelta(days=1)
    while d.weekday() != weekday:
        d -= timedelta(days=1)
    return d


def _easter(year):
    a = year % 19
    b = year // 100
    c = year % 100
    d = b // 4
    e = b % 4
    f = (b + 8) // 25
    g = (b - f + 1) // 3
    h = (19 * a + b - d - g + 15) % 30
    i = c // 4
    k = c % 4
    l = (32 + 2 * e + 2 * i - h - k) % 7
    m = (a + 11 * h + 22 * l) // 451
    month = (h + l - 7 * m + 114) // 31
    day = ((h + l - 7 * m + 114) % 31) + 1
    return datetime(year, month, day)


def _observed(d, is_new_year=False):
    if d.weekday() == 5:
        if is_new_year:
            return None
        return d - timedelta(days=1)
    if d.weekday() == 6:
        return d + timedelta(days=1)
    return d


def _holidays(year):
    hs = set()
    cands = []
    ny = _observed(datetime(year, 1, 1), True)
    cands.append(ny)
    cands.append(_nth_weekday(year, 1, 0, 3))
    cands.append(_nth_weekday(year, 2, 0, 3))
    cands.append(_easter(year) - timedelta(days=2))
    cands.append(_last_weekday(year, 5, 0))
    if year >= 2022:
        cands.append(_observed(datetime(year, 6, 19)))
    cands.append(_observed(datetime(year, 7, 4)))
    cands.append(_nth_weekday(year, 9, 0, 1))
    cands.append(_nth_weekday(year, 11, 3, 4))
    cands.append(_observed(datetime(year, 12, 25)))
    for c in cands:
        if c is not None:
            hs.add((c.year, c.month, c.day))
    return hs


class PreHolidayCloseLong:
    name = "pre_holiday_close_long"
    description = "Buy the close before a US market holiday closure; exit at the first post-holiday close."

    def __init__(self, atr_period: int = 14, stop_mult: float = 3.0, target_mult: float = 6.0) -> None:
        self._atr_period = atr_period
        self._stop_mult = stop_mult
        self._target_mult = target_mult

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        if len(bars) < self._atr_period + 2:
            return None
        today = _bar_dt(bars[-1])
        nxt = today + timedelta(days=1)
        while nxt.weekday() >= 5:
            nxt += timedelta(days=1)
        if (nxt.year, nxt.month, nxt.day) not in _holidays(nxt.year):
            return None
        atr_val = atr(bars, self._atr_period)
        if atr_val is None or atr_val <= 0:
            return None
        atr_dec = Decimal(str(atr_val))
        entry = bars[-1].close
        stop = entry - Decimal(str(self._stop_mult)) * atr_dec
        target = entry + Decimal(str(self._target_mult)) * atr_dec
        risk = entry - stop
        if risk <= 0 or stop <= 0:
            return None
        rr = (target - entry) / risk
        return Candidate(
            ticker=ticker,
            side="buy",
            entry=entry,
            stop=stop,
            target=target,
            risk_reward_ratio=rr.quantize(Decimal("0.01")),
            signal_strength=50,
            thesis="Last trading day before a US market holiday closure; hold to first post-holiday close.",
        )

    def exit_now(self, ticker: str, bars: list[Bar], entry: Decimal, side: str, bars_held: int) -> bool:
        # The first bar after entry is the first trading day after the holiday.
        return bars_held >= 1

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