BACKTEST RESULTS

RSI strategy backtest results

SPY daily data, 2016 to 2026: the RSI 14, 30/70 rule, long and short, lost 30.4% after costs over 69 trades, winning 34.8% of them, against +277.8% for holding SPY. Long only it made 14.1%. The best of 12 runs was RSI(2) 5/95, 200-day trend, 5-day exit on SPY, long and short: +25.2%, held-out survived. Every run, every trade and the script are on this page.

SPY · daily data · RSI 14, 30/70 · long and short
Net after costs
-30.4%
Holding SPY
+277.8%
Trades
69
Win rate
34.8%
Profit factor
0.68
Max drawdown
34.3%
Held out, last third: did not survive
Long only: +14.1% on 21 trades, held-out survived
4 January 2016 to 23 October 2026
  • Checked 25 October 2026
  • Alpaca daily data since 2016, 15-minute data from the last 600 sessions, and 5-minute data from the last 600 sessions
  • 0.05% commission + 0.025% slippage per fill
  • last third of the history held out
  • 12 runs, 2173 trades
  • Updated 1 November 2026

The short answer

Answers here: Does the RSI strategy work? · What is its win rate? · RSI 14 at 30/70, or RSI 2? · Long only, or both ways?

SPY daily data, 4 January 2016 to 23 October 2026, long and short: 69 trades, lost 30.4% after costs, 34.8% of trades won, profit factor 0.68, worst drawdown 34.3%, 20% of the time in the market. Holding SPY returned +277.8% over the same period.

Held out on its own, the last third (16 March 2023 to 23 October 2026) lost 19.1% on 26 trades: it did not survive its held-out period.

Long only, the same rule made 14.1% on 21 trades (52.4% won, profit factor 1.43, held-out survived): the short side cost 44.5 points of return in a period when SPY rose 277.8%.

On 5-minute data the same rule traded 1098 times in 2.4 years on SPY and lost 79.5%: at 0.15% a round trip, costs alone came to roughly 165% of the account over the period, which is where a daily rule moved to minute charts usually dies.

Across all 12 runs on this page, 7 made money after costs, 6 survived the held-out third, and 0 beat holding the symbol (1 had too few trades to judge).

The best run was RSI(2) 5/95, 200-day trend, 5-day exit on SPY, long and short: +25.2% net on 61 trades, profit factor 1.88, worst drawdown 12.2%, held-out survived. The tester's verdict on it reads "made money, but could be luck".

One symbol's past after modelled costs is not a forecast. Prices are split-adjusted and not dividend-adjusted, so every return here is a price return; the period includes a long rise with two sharp falls, and a rule that is often long did well for that reason as much as any other. These are research results, not investment advice.

What the script does

RSI Mean-Reversion Strategy, from the strategy library.

Two RSI rules were tested. The classic mean-reversion rule goes long when RSI(14) crosses up through 30 and goes short when it crosses down through 70; a cross back through 50 closes the trade, and a stop sits 2 ATR away. The RSI(2) pullback rule goes long when RSI(2) is under 10 while the close is above its 200-day average, goes short when RSI(2) is over 90 while the close is below it, and exits when the close crosses its 5-day average. Each was also run long only.

The indicator itself, with its Pine code drawn on real market data: Relative Strength Index (RSI).

The numbers, run by run

Net and holding the symbol are after costs over the same period. Held-out is the verdict on the last third of the history judged alone: survived, decayed, did not survive, or too few trades to judge.

SymbolTimeframeSettingsDirectionTradesWin rateNetHoldingProfit factorMax drawdownHeld-out
SPYdailyRSI 14, 30/70long and short6934.8%-30.4%+277.8%0.6834.3%did not survive
SPYdailyRSI 14, 25/75long and short2744.4%-3.6%+277.8%0.9211.9%did not survive
QQQdailyRSI 14, 30/70long and short7240.3%-35.7%+542.3%0.6646.0%did not survive
SPYdailyRSI(2) 10/90, 200-day trend, 5-day exitlong and short11367.3%+20.3%+277.8%1.3312.2%survived
QQQdailyRSI(2) 10/90, 200-day trend, 5-day exitlong and short10868.5%+32.1%+542.3%1.4517.3%survived
SPYdailyRSI(2) 5/95, 200-day trend, 5-day exitlong and short6170.5%+25.2%+277.8%1.8812.2%survived
SPYdailyRSI 14, 30/70long only2152.4%+14.1%+277.8%1.4314.9%survived
QQQdailyRSI 14, 30/70long only1752.9%+3.0%+542.3%1.1522.5%too few trades to judge
SPYdailyRSI(2) 10/90, 200-day trend, 5-day exitlong only9070.0%+25.5%+277.8%1.6413.7%survived
QQQdailyRSI(2) 10/90, 200-day trend, 5-day exitlong only8868.2%+29.9%+542.3%1.6610.2%survived
SPY5-minuteRSI 14, 30/70long and short109828.9%-79.5%+44.4%0.2879.6%did not survive
SPY15-minuteRSI 14, 30/70long and short40945.5%-35.4%+44.3%0.5835.8%did not survive

Year by year

RSI 14, 30/70 on SPY, long and short, the same rule long only, and SPY itself, each calendar year after costs. A partial first or last year counts the sessions it has.

YearRSI 14, 30/70, long and shortRSI 14, 30/70, long onlyHolding SPY
2016+2.8%+5.0%+11.2%
2017-5.4%+4.3%+18.5%
2018-0.4%-2.7%-6.9%
2019-2.4%+5.9%+28.6%
2020-6.3%-2.7%+15.1%
2021-3.0%0.0%+28.8%
2022+2.6%-3.0%-19.9%
2023-0.1%+6.5%+24.8%
2024-9.8%0.0%+24.0%
2025-6.1%-0.6%+16.6%
2026-4.3%+0.4%+11.2%

Every trade

The 69 trades of RSI 14, 30/70 on SPY, long and short, oldest first: side, entry and exit days, fill prices after slippage, and the return after both commissions. The other runs' trades open below.

SideInOutEntryExitReturn
long2016-11-082016-11-29212.76220.45+3.5%
short2016-11-292016-12-07220.45224.01-1.7%
short2016-12-152017-01-25226.09228.77-1.3%
short2017-03-072017-03-22237.28233.84+1.4%
short2017-06-062017-06-28243.24242.57+0.2%
short2017-10-262017-10-27255.92257.64-0.8%
short2017-10-312017-11-07257.11259.30-1.0%
short2017-11-102017-11-28257.66260.87-1.3%
short2017-12-062017-12-12262.79266.90-1.7%
short2017-12-152018-01-03265.37270.49-2.0%
short2018-01-312018-02-05282.65273.55+3.1%
long2018-02-072018-02-08268.58261.70-2.7%
long2018-02-122018-02-16263.95272.23+3.0%
long2018-03-272018-04-02266.25256.39-3.8%
short2018-08-312018-10-05289.76289.77-0.1%
long2018-10-172018-10-23280.52270.86-3.5%
long2018-10-262018-10-29266.00261.42-1.8%
long2018-10-312018-11-08270.73280.06+3.3%
long2018-12-272019-01-09242.64257.48+6.0%
short2019-02-222019-03-21278.03285.06-2.6%
short2019-04-102019-04-23287.69292.27-1.7%
short2019-04-262019-05-08292.02287.62+1.4%
long2019-08-072019-08-22284.49293.15+2.9%
short2019-11-122019-11-27308.65315.23-2.2%
short2019-12-032019-12-12308.56315.82-2.5%
short2019-12-312020-01-02320.43324.86-1.5%
short2020-01-062020-01-09320.40326.64-2.0%
short2020-01-132020-01-17326.31331.84-1.8%
short2020-01-272020-01-28322.94325.15-0.8%
long2020-03-032020-03-06309.59293.10-5.4%
long2020-03-112020-03-12280.78255.93-9.0%
long2020-03-162020-03-16241.25241.11-0.2%
long2020-03-252020-04-09244.94277.50+13.2%
short2020-06-112020-06-12311.37308.33+0.9%
short2020-08-122020-08-24335.36342.22-2.1%
short2020-09-042020-09-09346.03337.64+2.3%
short2021-01-122021-01-28378.79376.45+0.5%
short2021-04-212021-04-29411.40420.45-2.3%
short2021-07-072021-07-14433.54438.01-1.1%
short2021-11-112021-11-29465.08464.20+0.1%
long2022-01-312022-02-03441.36450.83+2.0%
short2022-08-182022-08-29426.74402.31+5.6%
long2022-09-292022-10-13366.91349.13-4.9%
short2023-06-212023-07-12436.07446.51-2.5%
short2023-07-172023-08-07449.01448.83-0.1%
long2023-10-052023-10-11424.48435.53+2.5%
long2023-10-312023-11-03416.29432.99+3.9%
short2023-11-282023-12-13453.96464.88-2.5%
short2023-12-212023-12-26471.19476.57-1.2%
short2024-01-022024-01-22472.03484.14-2.7%
short2024-02-012024-02-02484.50491.16-1.5%
short2024-02-142024-02-22496.66504.14-1.6%
short2024-03-052024-03-21510.10523.52-2.7%
short2024-05-232024-06-12532.82541.79-1.8%
short2024-06-242024-07-05544.18553.57-1.8%
short2024-07-122024-07-16557.48565.21-1.5%
short2024-07-182024-07-22558.36553.15+0.8%
short2024-12-062024-12-19607.28591.52+2.5%
long2025-03-132025-04-03558.64542.25-3.0%
long2025-04-102025-04-25532.38546.50+2.6%
short2025-05-212025-06-27588.31613.04-4.3%
short2025-07-022025-07-24617.08634.97-3.0%
short2025-07-312025-08-04639.30625.84+2.0%
short2025-09-172025-10-13659.84660.83-0.2%
long2026-03-242026-03-27651.49635.38-2.6%
long2026-04-012026-04-09654.05674.66+3.1%
short2026-04-222026-05-06708.99733.79-3.6%
short2026-05-182026-05-28739.63754.73-2.1%
short2026-06-042026-06-08751.90743.56+1.0%

The script

Pine v6, exactly as it ran for RSI 14, 30/70 on SPY, long and short. The variants change only the inputs listed in the table.

//@version=6
strategy("RSI Mean-Reversion Strategy", overlay=false, default_qty_type=strategy.percent_of_equity, default_qty_value=100, initial_capital=100000, commission_type=strategy.commission.percent, commission_value=0.05, slippage=1, margin_long=0, margin_short=0)

src      = input.source(close, "Source", group="Setup")
len      = input.int(14, "RSI length", minval=1, group="Setup")
os       = input.int(30, "Oversold", minval=0, maxval=50, group="Levels")
ob       = input.int(70, "Overbought", minval=50, maxval=100, group="Levels")
useLong  = input.bool(true, "Trade longs", group="Direction")
useShort = input.bool(true, "Trade shorts", group="Direction")
atrLen   = input.int(14, "ATR length", minval=1, group="Risk")
stopMult = input.float(2, "Stop (ATR multiples)", minval=0, step=0.5, group="Risk")

rsi = ta.rsi(src, len)
atr = ta.atr(atrLen)

longSig   = ta.crossover(rsi, os) and barstate.isconfirmed
shortSig  = ta.crossunder(rsi, ob) and barstate.isconfirmed
exitLong  = ta.crossover(rsi, 50) and barstate.isconfirmed
exitShort = ta.crossunder(rsi, 50) and barstate.isconfirmed

plot(rsi, "RSI", color=rsi > ob ? color.new(#E5484D, 0) : rsi < os ? color.new(#16A56A, 0) : color.new(#A3A39E, 0), linewidth=2)
hline(ob, "Overbought", color=color.new(#E5484D, 50), linestyle=hline.style_dashed)
hline(os, "Oversold", color=color.new(#16A56A, 50), linestyle=hline.style_dashed)
hline(50, "Mid", color=color.new(#A3A39E, 70), linestyle=hline.style_dotted)

if longSig and useLong
    strategy.entry("Long", strategy.long)
    strategy.exit("Long stop", "Long", stop=stopMult > 0 ? close - stopMult * atr : na)
if shortSig and useShort
    strategy.entry("Short", strategy.short)
    strategy.exit("Short stop", "Short", stop=stopMult > 0 ? close + stopMult * atr : na)
if exitLong
    strategy.close("Long")
if exitShort
    strategy.close("Short")

How it was tested

Alpaca daily data since 2016, 15-minute data from the last 600 sessions, and 5-minute data from the last 600 sessions, 0.05% commission and 0.025% slippage on every fill, the last third of the history held out, textbook settings and nothing tuned. The engine, fills and what it does not model are written out once, in data and methodology.

Run the RSI strategy on your own symbol, free

Describe the rule in your own words or paste the script. The Free plan writes the Pine v6 script with the AI, runs it on any US stock or ETF with the same costs and the same held-out check, and shows every trade on the chart. No card.

Every strategy tested

Seventeen popular rules through the same engine, the same costs and the same held-out check, with every trade listed. Next: Stochastic strategy, Bollinger Bands strategy, Mean reversion strategy.

Questions

Does the RSI strategy work?

SPY, daily data, 2016 to 2026, long and short: RSI 14, 30/70 lost 30.4% after costs over 69 trades (34.8% won, profit factor 0.68) against +277.8% for holding SPY, and the held-out third did not survive. Long only it made 14.1%. Across all 12 runs on the page, 7 made money after costs, 6 survived their held-out third and 0 beat holding the stock.

What is the win rate of the RSI strategy?

From 28.9% to 70.5% across the 12 runs. The classic setting, RSI 14, 30/70 on SPY long and short, won 34.8% of 69 trades. The win rate alone does not decide the result: that run's profit factor was 0.68, so its losers outweighed its winners, and the net return was -30.4%.

What are the best RSI settings?

Of the 4 settings tested, RSI(2) 5/95, 200-day trend, 5-day exit on SPY (long and short) did best: +25.2% net, profit factor 1.88, held-out survived. That is the best of 12 tries on 10.8 years of daily data of one symbol, which is already a fitted number. A setting that works on one symbol or one period only is a coincidence, not a setting; run it on your own symbol and timeframe before trusting it.

Does the RSI strategy beat holding the stock?

0 of the 12 runs did. SPY itself returned +277.8% between 4 January 2016 and 23 October 2026, so a rule that is out of the market part of the time has a lot to make up; what a timing rule usually gets you is a smaller drawdown, not a bigger return. The classic run's worst drawdown was 34.3% with 20% of the time in the market.

Did the RSI strategy hold up out of sample?

The last third of every run's history (16 March 2023 to 23 October 2026 for the lead run) was judged on its own, with no fitting on it: 6 of 12 runs survived, 0 decayed, 5 did not survive and 1 had too few trades there to judge. Survived means a positive Sharpe ratio on the held-out part at least half the fitted period's; it is a check on one later stretch, not a forecast.

How was this tested?

With the free Alpha Charts tester's own engine: the Pine v6 scripts on this page, run on Alpaca daily data since 2016, 15-minute data from the last 600 sessions, and 5-minute data from the last 600 sessions, split-adjusted and not dividend-adjusted, one position at a time with the whole account, fills at the next candle's open, a commission of 0.05% and slippage of 0.025% on every fill, the last third of the history held out. The settings are the textbook ones and every variant is stated; nothing was tuned to make the page look better.

Every number on this page is the output of the Alpha Charts backtest engine on 25 October 2026, on Alpaca market data; the scripts are the strategy library's templates, shown as they ran. Symbols are US-listed ETFs and stocks; results are price returns after the costs stated. Past results are not a forecast and nothing here is investment advice. TradingView and Pine Script belong to TradingView, Inc.; Alpha Charts is not affiliated with it.