20-day low above the 200-day average, held 5 days
Buy a stock at its lowest close in 20 days while it is above its 200-day average; sell after 5 days.
Loses money
After costs it lost money on the stocks that decide the verdict.
- −0.078R a trade after costs on the laggard stocks.
42 large US stocks, 15 years
Before costs +0.003R
By trade and by day, sized to a first try
What the numbers say
On the laggard stocks, 2652 trades averaged −0.078R after costs, versus 0.003R before costs and 0.005R on today's winners. Bull markets were weakest at −0.106R, with 0.0% of random-date draws beaten. Flat markets showed 0.032R and bear markets −0.052R, so costs absorb the small gross edge.
How it was tested
Buy at the close when a stock makes its lowest close in 20 days while still above its 200-day simple moving average, and exit after 5 trading days.
- Side
- Long
- Time limit
- Exit at the close after 5 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
- "Lowest close in 20 days" = close is the minimum of the last 20 closes, including the signal day
- "200-day average" = 200-day simple moving average of closes
- Entry at the signal day's close
- "Sell after 5 days" = exit at the close 5 trading days after entry
- No stop or target was given, so wide protective ones were chosen: stop 3 x ATR(14), target 6 x ATR(14)
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 | 2,001 | −0.106R | −8.77 | −6.94 · 1,075d | −0.064R · beats 0% | +0.010R |
| Flat | 480 | +0.032R | 1.12 | 0.02 · 257d | −0.043R · beats 100% | +0.037R |
| Bear | 171 | −0.052R | −1.15 | −1.77 · 90d | −0.033R · beats 35% | −0.173R |
| All | 2,652 | −0.078R | −0.058R | +0.005R |
R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 16.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 codeHide
from decimal import Decimal
from core.domain import Bar
from strategies.indicators import atr, sma
from scanners.base import Candidate
class Pullback20dLowAbove200dmaLong:
name = "pullback_20d_low_above_200dma_long"
description = "Long at 20-day closing low while above 200-day SMA; 3x ATR stop, 6x ATR target, 5-day time exit."
def __init__(self, low_lookback: int = 20, sma_period: int = 200, atr_period: int = 14, stop_mult: float = 3.0, target_mult: float = 6.0) -> None:
self._low_lookback = low_lookback
self._sma_period = sma_period
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:
need = max(self._sma_period, self._low_lookback, self._atr_period + 1)
if len(bars) < need:
return None
closes = [b.close for b in bars]
current = bars[-1]
window = closes[-self._low_lookback:]
if current.close > min(window):
return None
sma_val = sma(closes, self._sma_period)
if sma_val is None:
return None
if current.close <= Decimal(str(sma_val)):
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="Lowest close in 20 days while above the 200-day SMA; pullback in an uptrend.",
asset_class="equity",
)
def exit_now(self, ticker: str, bars: list[Bar], entry: Decimal, side: str, bars_held: int) -> bool:
return bars_held >= 5
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.