Buy first down close after a 20-day high, exit at next high
Buy the first down close after a new 20-day high and sell at the next new high.
Loses money
After costs it lost money on the stocks that decide the verdict.
- −0.058R a trade after costs on the laggard stocks.
42 large US stocks, 15 years
Before costs +0.021R
By trade and by day, sized to a first try
What the numbers say
Across 5333 laggard-stock trades the idea averaged −0.058R after costs, versus 0.022R before costs, so trading costs turn a small edge into a loss. In bull and flat markets it was −0.061R and −0.072R, beating only 10% and 5% of random-date draws. Bear markets were 0.008R, within noise (t 0.30).
How it was tested
Go long at the close of the first down-close day following a new 20-day closing high, and exit at the close of the next new 20-day closing high.
- Side
- Long
- Its own exit
- At each close after entry, exit if close is a new 20-day high (close greater than the highest close of the prior 20 days)., checked at each close
- 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
- 'New 20-day high' means close above the highest close of the prior 20 trading days
- 'First down close' means close below the prior day's close, occurring after the new-high day with no other down close in between
- 'Next new high' means the next new 20-day closing high after entry, exited at that close
- Stop of 3 x ATR(14) and target of 6 x ATR(14) are protective choices since the idea names none
- Time limit set to the 30-day maximum since the idea names none
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.
| Market | Trades | Per trade | t, by trade | t, by day | Random dates | Winners, per trade |
|---|---|---|---|---|---|---|
| Bull | 4,073 | −0.061R | −6.51 | −5.11 · 1,696d | −0.035R · beats 10% | −0.011R |
| Flat | 899 | −0.072R | −3.43 | −3.02 · 355d | −0.029R · beats 5% | +0.017R |
| Bear | 361 | +0.008R | 0.30 | −1.73 · 138d | +0.042R · beats 35% | +0.048R |
| All | 5,333 | −0.058R | −0.029R | −0.004R |
R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 14.4 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 codeHide
from decimal import Decimal
from core.domain import Bar
from strategies.indicators import atr
from scanners.base import Candidate
class FirstDownCloseAfter20dHigh:
name = "first_down_close_after_20d_high_long"
description = "Buy first down close after a new 20-day closing high; exit on next new 20-day closing high."
def __init__(self, lookback: int = 20, atr_period: int = 14, stop_mult: float = 3.0, target_mult: float = 6.0) -> None:
self._lookback = lookback
self._atr_period = atr_period
self._stop_mult = stop_mult
self._target_mult = target_mult
def _is_new_high(self, closes, k: int) -> bool:
if k < self._lookback:
return False
return closes[k] > max(closes[k - self._lookback:k])
def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
n = len(bars)
if n < max(self._lookback + 2, self._atr_period + 2) + 5:
return None
closes = [b.close for b in bars]
t = n - 1
if not (closes[t] < closes[t - 1]):
return None
# walk back through an unbroken run of non-down closes looking for a new 20d closing high
k = t - 1
found = False
while k >= 1:
if self._is_new_high(closes, k):
found = True
break
if closes[k] < closes[k - 1]:
break
k -= 1
if not found:
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 = closes[t]
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="First down close after a new 20-day closing high; long at the close.",
)
def exit_now(self, ticker: str, bars: list[Bar], entry: Decimal, side: str, bars_held: int) -> bool:
if len(bars) < self._lookback + 1:
return False
closes = [b.close for b in bars]
return closes[-1] > max(closes[-(self._lookback + 1):-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.
Describe it in plain words and get the same honest test in about a minute.