Rising 50-day average plus a 3% up day, long
Buy when the 50-day moving average has been rising for 20 days and the stock closes up 3% in a day.
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.
42 large US stocks, 15 years
Before costs +0.159R
By trade and by day, sized to a first try
What the numbers say
On laggards the idea made 0.084R per trade after costs over 662 trades, against 0.162 on today's winners. Its edge sits in bull markets (0.135R, t 2.33) and is absent in flat (−0.123) and bear (−0.072) ones. The winners' own rise did the work, hence the survivorship verdict.
How it was tested
Buy at the close of a day when the stock closes up at least 3% from the prior close while its 50-day simple moving average has risen every day for the last 20 days.
- Side
- Long
- Time limit
- Exit at the close after 20 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
- The 50-day moving average is a simple moving average of closes
- Rising for 20 days means SMA50 is higher than the previous day's SMA50 on each of the last 20 days, including the signal day
- Closes up 3% means close-to-close change of at least +3% versus the prior close
- No stop or target was given, so the stop is 2 x ATR(14) below entry and the target is 4 x ATR(14) above entry
- No hold period was given, so the time exit is 20 trading days after entry
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 | 525 | +0.135R | 2.33 | 1.96 · 422d | −0.031R · beats 100% | +0.160R |
| Flat | 108 | −0.123R | −1.07 | −1.11 · 91d | −0.057R · beats 40% | +0.253R |
| Bear | 29 | −0.072R | −0.30 | −0.16 · 26d | +0.092R · beats 20% | −0.128R |
| All | 662 | +0.084R | −0.030R | +0.162R |
R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 9.3 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 RisingSma50Plus3PctUpDayLong:
name = "rising_sma50_plus_3pct_up_day_long"
description = "Long on a +3% close-to-close day when SMA50 has risen for each of the last 20 days."
def __init__(self, sma_period: int = 50, rising_days: int = 20, min_gain: float = 0.03, atr_period: int = 14, stop_mult: float = 2.0, target_mult: float = 4.0) -> None:
self._sma_period = sma_period
self._rising_days = rising_days
self._min_gain = min_gain
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 = self._sma_period + self._rising_days + 1
if len(bars) < max(need, self._atr_period + 2):
return None
current = bars[-1]
prev = bars[-2]
if prev.close <= 0:
return None
gain = (current.close - prev.close) / prev.close
if gain < Decimal(str(self._min_gain)):
return None
closes = [b.close for b in bars]
n = len(closes)
# SMA50 values for indices t-20 .. t (21 values) to compare 20 consecutive rises
smas = []
for end in range(n - self._rising_days, n + 1):
window = closes[end - self._sma_period:end]
if len(window) < self._sma_period:
return None
smas.append(sum(window) / Decimal(self._sma_period))
for i in range(1, len(smas)):
if not (smas[i] > smas[i - 1]):
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="Closed up at least 3% with SMA50 rising for each of the last 20 days.",
)
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.