Skip to content
The Casebook · A classic strategy

5/20-day average cross, rising volume, 8% target, 4% stop

Buy when the 5-day moving average crosses above the 20-day and volume is rising; take profit at 8%, stop at 4%.
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
662

42 large US stocks, 15 years

Per trade, after costs
−0.017R

Before costs +0.069R

Bar to clear
t > 2.01

By trade and by day, sized to a first try

What the numbers say

On the 22 laggards the idea averaged −0.017R per trade after costs over 662 trades, against 0.144R on today's winners. Flat markets were the weakest, at −0.271R per trade, and no market group came near the bar of t 2.01. The winners' own rise, not the signal, appears to account for the gain.

How it was tested

Go long at the close when the 5-day moving average crosses above the 20-day moving average on rising volume, with an 8% profit target and a 4% stop.

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
  • Simple moving averages of the daily close are used for the 5-day and 20-day averages
  • Cross means the 5-day SMA closes above the 20-day SMA today after being at or below it on the prior day
  • Volume rising is defined as today's volume above both yesterday's volume and its own 20-day average volume
  • No time limit was given, so the maximum 30-trading-day hold is used
  • Stop and target are measured from the close-based entry price; if both are touched on the same day, the harness's standard bracket convention decides

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
Bull502+0.017R0.29−0.26 · 409d−0.055R · beats 100%+0.153R
Flat100−0.271R−2.07−1.24 · 76d−0.023R · beats 10%+0.084R
Bear60+0.116R0.600.45 · 54d−0.015R · beats 75%+0.174R
All662−0.017R−0.047R+0.144R

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


class Ma5CrossMa20RisingVolumeLong:
    name = "ma5_cross_ma20_rising_volume_long"
    description = "SMA5 crosses above SMA20 on rising volume; 4% stop, 8% target"

    def __init__(self, fast: int = 5, slow: int = 20, stop_pct: float = 0.04, target_pct: float = 0.08) -> None:
        self._fast = fast
        self._slow = slow
        self._stop_pct = stop_pct
        self._target_pct = target_pct

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        n = len(bars)
        if n < self._slow + 1:
            return None
        closes = [Decimal(str(b.close)) for b in bars]
        vols = [Decimal(str(b.volume)) for b in bars]

        fast_now = sum(closes[-self._fast:]) / self._fast
        slow_now = sum(closes[-self._slow:]) / self._slow
        fast_prev = sum(closes[-self._fast - 1:-1]) / self._fast
        slow_prev = sum(closes[-self._slow - 1:-1]) / self._slow

        if not (fast_now > slow_now and fast_prev <= slow_prev):
            return None

        avg_vol = sum(vols[-self._slow:]) / self._slow
        if avg_vol <= 0:
            return None
        if not (vols[-1] > avg_vol and vols[-1] > vols[-2]):
            return None

        current = bars[-1]
        entry = current.close
        entry_d = Decimal(str(entry))
        stop = entry_d * (Decimal(1) - Decimal(str(self._stop_pct)))
        target = entry_d * (Decimal(1) + Decimal(str(self._target_pct)))
        risk = entry_d - stop
        if risk <= 0:
            return None
        rr = (target - entry_d) / risk
        if rr < Decimal("1.5"):
            return None

        # Strength: volume surge, cross magnitude, close strength
        vol_ratio = float(vols[-1] / avg_vol)
        vol_score = min(40, max(0, int((vol_ratio - 1) * 40)))
        spread_pct = float((fast_now - slow_now) / slow_now) if slow_now > 0 else 0.0
        cross_score = min(30, max(0, int(spread_pct * 3000)))
        rng = Decimal(str(current.high)) - Decimal(str(current.low))
        if rng > 0:
            close_pos = float((entry_d - Decimal(str(current.low))) / rng)
        else:
            close_pos = 0.5
        close_score = min(30, max(0, int(close_pos * 30)))
        strength = max(0, min(100, vol_score + cross_score + close_score))

        return Candidate(
            ticker=ticker,
            side="buy",
            entry=entry,
            stop=stop,
            target=target,
            risk_reward_ratio=rr.quantize(Decimal("0.01")),
            signal_strength=strength,
            thesis="SMA5 crossed above SMA20 today on volume above its 20-day average and yesterday's volume, signalling momentum shift with participation; 4% stop, 8% target.",
        )

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
5/20-day average cross, rising volume, 8% target, 4% stop: Survivorship mirage · EdgeProven