Skip to content
The Casebook · A classic strategy

Buy at an all-time-high close

Buy when the stock closes at an all-time high.
VerdictTested Nov 22, 2026

Survivorship mirage

It clears the bar on today's winners, the stocks everyone wishes they had bought, but not on the laggards, which is where hindsight can't help.

  • It clears the bar on today's winners but not on the laggards: the winners' own rise did the work.
Trades on the laggards
3,210

42 large US stocks, 15 years

Per trade, after costs
−0.125R

Before costs −0.033R

Bar to clear
t > 2.01

By trade and by day, sized to a first try

What the numbers say

On the 22 laggards, 3210 trades averaged −0.125R after costs, below zero in bull, flat and bear markets. On today's winners the same entry averaged 0.069R. The edge shows up only on stocks that already rose, so the gain tracks the winners' own climb, not the entry rule.

How it was tested

Buy at the close when the stock's close is the highest close in the available daily history, and hold with a bracket stop and target for at most 30 trading days.

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.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
  • All-time high is approximated by the highest close within the available 300-bar window, requiring at least 250 prior bars
  • High is measured on closing prices, not intraday highs
  • Stop at 2 x ATR(14) below entry and target at 2 x risk (4 x ATR(14)) above entry were chosen because the idea named none
  • Maximum hold of 30 trading days chosen because the idea named no time exit
  • No exit rule beyond stop, target and time limit

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,723−0.107R−4.01−1.46 · 1,409d−0.013R · beats 0%+0.073R
Flat422−0.215R−3.46−2.08 · 260d+0.027R · beats 5%+0.093R
Bear65−0.282R−2.02−2.25 · 51d+0.067R · beats 5%−0.472R
All3,210−0.125R−0.005R+0.069R

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.5 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 CloseAtAllTimeHighLong:
    name = "close_at_all_time_high_long"
    description = "Long when close is the highest close in the available window (up to 300 bars), 2x ATR stop, 4x ATR target"

    def __init__(self, max_window: int = 300, min_prior: int = 250, atr_period: int = 14, stop_mult: float = 2.0, target_mult: float = 4.0) -> None:
        self._max_window = max_window
        self._min_prior = min_prior
        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._min_prior + 1:
            return None
        window = bars[-(self._max_window + 1):]
        current = window[-1]
        prior = window[:-1]
        if len(prior) < self._min_prior:
            return None
        prior_max = max(b.close for b in prior)
        if current.close <= prior_max:
            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 = current.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="Close is the highest close in the available history window.",
        )

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 at an all-time-high close: Survivorship mirage · EdgeProven