Skip to content
The Casebook · A classic strategy

Buy a 5-day RSI dip below 25 above the 100-day average

Buy when the 5-day RSI is below 25 and the stock is above its 100-day moving average; sell when the RSI goes above 60.
VerdictTested Nov 22, 2026

Loses money

After costs it lost money on the stocks that decide the verdict.

  • −0.076R a trade after costs on the laggard stocks.
Trades on the laggards
1,623

42 large US stocks, 15 years

Per trade, after costs
−0.076R

Before costs +0.004R

Bar to clear
t > 2.01

By trade and by day, sized to a first try

What the numbers say

Across 1623 trades on the laggard stocks the result was −0.076R a trade after costs, against 0.01R on the winners. In bull markets it was −0.085R (t −4.22 by day) and in bear markets −0.158R, beating 0.0% of random-date draws. Only flat markets came near random dates, at −0.016R.

How it was tested

Buy a stock at the close when its 5-day RSI drops below 25 while it trades above its 100-day moving average, and exit when the 5-day RSI rises above 60.

Side
Long
Its own exit
At any close after entry, exit at that close if RSI(5) is above 60., 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
Choices made where the idea was open
  • RSI uses Wilder smoothing on daily closes
  • The 100-day moving average is a simple moving average of closes
  • Entry is at the signal day's close, per the harness
  • The idea names no stop or target, so a wide protective 3 x ATR(14) stop and 6 x ATR(14) target are used so the RSI exit does the main work
  • The idea names no time limit, so the 30-bar maximum is used as a backstop
  • 'Sell when RSI goes above 60' is read as exiting the long position at the first close with RSI(5) above 60

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
Bull1,214−0.085R−4.10−4.22 · 801d−0.070R · beats 15%+0.012R
Flat317−0.016R−0.41−1.30 · 185d−0.033R · beats 70%+0.035R
Bear92−0.158R−2.05−2.15 · 55d−0.023R · beats 0%−0.097R
All1,623−0.076R−0.060R+0.010R

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.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 code
from decimal import Decimal

from core.domain import Bar
from strategies.indicators import atr
from scanners.base import Candidate


class Rsi5OversoldAboveSma100:
    name = "rsi5_oversold_above_sma100_exit_rsi60"
    description = "Long when RSI(5) < 25 and close > SMA(100); exit when RSI(5) > 60."

    def __init__(self, rsi_period: int = 5, rsi_entry: float = 25.0, rsi_exit: float = 60.0,
                 sma_period: int = 100, atr_period: int = 14,
                 stop_mult: float = 3.0, target_mult: float = 6.0) -> None:
        self._rsi_period = rsi_period
        self._rsi_entry = rsi_entry
        self._rsi_exit = rsi_exit
        self._sma_period = sma_period
        self._atr_period = atr_period
        self._stop_mult = stop_mult
        self._target_mult = target_mult

    def _wilder_rsi(self, bars):
        n = self._rsi_period
        if len(bars) < n + 1:
            return None
        closes = [float(b.close) for b in bars]
        gains = []
        losses = []
        for i in range(1, len(closes)):
            d = closes[i] - closes[i - 1]
            gains.append(d if d > 0 else 0.0)
            losses.append(-d if d < 0 else 0.0)
        avg_gain = sum(gains[:n]) / n
        avg_loss = sum(losses[:n]) / n
        for i in range(n, len(gains)):
            avg_gain = (avg_gain * (n - 1) + gains[i]) / n
            avg_loss = (avg_loss * (n - 1) + losses[i]) / n
        if avg_loss == 0:
            return 100.0 if avg_gain > 0 else 50.0
        rs = avg_gain / avg_loss
        return 100.0 - 100.0 / (1.0 + rs)

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        min_len = max(self._sma_period, self._atr_period + 1, self._rsi_period + 1)
        if len(bars) < min_len:
            return None
        current = bars[-1]
        sma_val = sum(float(b.close) for b in bars[-self._sma_period:]) / self._sma_period
        if float(current.close) <= sma_val:
            return None
        r = self._wilder_rsi(bars)
        if r is None or r >= self._rsi_entry:
            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=f"RSI(5)={r:.1f} below {self._rsi_entry} while close is above the {self._sma_period}-day SMA.",
        )

    def exit_now(self, ticker: str, bars: list[Bar], entry: Decimal,
                 side: str, bars_held: int) -> bool:
        r = self._wilder_rsi(bars)
        if r is None:
            return False
        return r > self._rsi_exit

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