Daily RSI 9, 14, 21 on US Stocks|What Changes in Backtests
A backtest of 100 US stocks on daily charts (5–56 years per stock) in ENTRIQ, changing only the RSI period to 9, 14 or 21 and comparing results by exit pattern.
What changes when you change the RSI period
RSI (Relative Strength Index) is an oscillator that uses recent price moves to express overbought and oversold conditions as a score from 0 to 100. The period setting determines "how many trading days of price moves are used to calculate the score."
The shorter the period, the more sensitively RSI reacts to recent moves, and the more easily it reaches the level below 30 that is treated as a gauge of being oversold. The longer the period, the more sluggish it becomes, and it only gets below 30 after a sustained decline. Even with the same "buy when RSI drops below 30" rule, changing the period directly changes how much selling must have occurred for a situation to meet the entry condition.
These are the results of backtesting 100 stocks in ENTRIQ (5 to 56 years of data depending on the stock) (Dataset v2.0). We set the RSI period to 9, 14 and 21 and compare the results for each side by side, by exit pattern.
Test conditions
- Universe: 100 US stocks selected from the current S&P 500 constituents, taking the largest by market cap with up to 15 stocks per sector
- Period: The full history available for each stock; only stocks with at least 5 years of data (5 to 56 years depending on the stock)
- Timeframe: Daily (split-adjusted)
- Entry: Buy at the open on the next trading day after RSI(9), RSI(14) or RSI(21) crosses below 30 (Wilder's smoothing; all conditions other than the period are the same)
- Overlapping positions: New signals in the same stock while a position is open are skipped (only one position at a time)
Exit patterns (definitions)
- Pattern A: Exit at the open on the next trading day after RSI returns to 50 or above (if it doesn't, exit at the close on the 60th trading day). No stop loss
- Pattern B: Exit at the close on the 10th trading day after entry. No stop loss
- Pattern C: Stop loss at -5%. If the stop isn't hit, exit at the close on the 10th trading day. If the stock gaps down at the open, the fill is at that open price, so a single trade's loss can exceed -5%
About survivorship bias
This test uses the current S&P 500 constituents. Stocks that were delisted or removed from the index in the past are not included. This may make the backtest results look more favorable than the actual market at the time, which also included those stocks. Please keep this in mind when reading the figures.
Overall results (by period and pattern)
Pattern A: hold until RSI recovers to 50
| Metric | RSI(9) | RSI(14) | RSI(21) |
|---|---|---|---|
| Sample size | 13,165 | 5,318 | 1,845 |
| Share of trades closed in profit | 71.2% | 72.2% | 73.0% |
| Average P/L | +1.42% | +2.21% | +3.54% |
| Profit factor | 1.77 | 1.92 | 2.14 |
| Largest loss | -77.0% | -93.3% | -87.9% |
| Longest losing streak (per stock) | 6 | 7 | 6 |
| Median MAE | -3.58% | -4.73% | -6.96% |
| Average holding period | 12.2 trading days | 19.2 trading days | 29.5 trading days |
Note: Past sample (N=13,165, N=5,318, N=1,845); not indicative of future results.
Pattern B: exit after 10 trading days
| Metric | RSI(9) | RSI(14) | RSI(21) |
|---|---|---|---|
| Sample size | 16,135 | 7,029 | 2,400 |
| Share of trades closed in profit | 55.8% | 56.9% | 57.2% |
| Average P/L | +0.98% | +1.20% | +1.50% |
| Profit factor | 1.45 | 1.51 | 1.57 |
| Largest loss | -72.5% | -72.5% | -58.3% |
| Longest losing streak (per stock) | 10 | 12 | 7 |
| Median MAE | -3.37% | -3.57% | -4.15% |
| Average holding period | 10.0 trading days | 10.0 trading days | 10.0 trading days |
Note: Past sample (N=16,135, N=7,029, N=2,400); not indicative of future results.
Pattern C: -5% stop loss + 10 trading days
| Metric | RSI(9) | RSI(14) | RSI(21) |
|---|---|---|---|
| Sample size | 18,008 | 7,865 | 2,736 |
| Share of trades closed in profit | 46.5% | 45.9% | 43.1% |
| Average P/L | +0.48% | +0.54% | +0.50% |
| Profit factor | 1.21 | 1.23 | 1.19 |
| Largest loss | -67.2% | -37.9% | -32.3% |
| Longest losing streak (per stock) | 20 | 16 | 15 |
| Median MAE | -3.53% | -3.76% | -4.32% |
| Average holding period | 7.8 trading days | 7.6 trading days | 7.1 trading days |
Note: Past sample (N=18,008, N=7,865, N=2,736); not indicative of future results.
What the comparison by period shows
Sample size and sensitivity
Because RSI(9) reacts sensitively to short-term moves, its sample size is larger than RSI(14)'s in every pattern. RSI(21), on the other hand, has a smaller sample size than RSI(14). The longer the period, the fewer the opportunities to get "below 30," so only situations with deeper selling are picked up.
Share of trades closed in profit, average P/L and profit factor
In patterns A and B, the share of trades closed in profit, average P/L and profit factor were higher for RSI(21) than for RSI(14), and higher for RSI(14) than for RSI(9). In these two patterns, a tendency for these figures to be higher the longer the period was observed.
In pattern C (-5% stop loss + 10 trading days), the direction changes. For all three metrics (share of trades closed in profit, average P/L and profit factor), the figures were higher for RSI(14) than for RSI(21). Comparing RSI(9) and RSI(14), the share of trades closed in profit was higher for RSI(9), while average P/L and profit factor were higher for RSI(14). With a stop loss and a short-term exit, the observed relationship between these metrics and the RSI period is no longer monotonic.
Median MAE (maximum adverse excursion) and largest loss
Looking at the median MAE, which shows how far unrealized losses extend while holding, in patterns A and B the median MAE was larger (more negative) for RSI(21) than for RSI(14). The numbers show that picking up more deeply sold-off situations also tends to come with larger adverse moves while holding.
As for the largest loss, in patterns A and B it was larger (more negative) for RSI(14) than for RSI(21). This is the opposite direction from the median MAE, so it cannot be said across the board that "the longer the period, the larger every risk metric." In pattern C, the largest loss was larger (more negative) for RSI(9) than for RSI(14), and larger (more negative) for RSI(14) than for RSI(21).
Longest losing streak (per stock)
The longest losing streak shows the longest losing streak within a single stock. In pattern A, the longest losing streak for RSI(14) was longer than for both RSI(9) and RSI(21). In pattern B, it was longer for RSI(14) than for RSI(21). In pattern C, it was longer for RSI(9) than for RSI(14). Because the direction of the relationship with the period differs by pattern, it needs to be checked individually when comparing.
Average holding period in trading days
Pattern A is designed to keep holding until RSI returns to 50, so the longer the period, as with RSI(21), the longer the average holding period. For RSI(21) in pattern A, the average holding period was 29.5 trading days, noticeably longer than the 12.2 trading days for RSI(9). It is observed that recovery from deeply sold-off situations tends to take time. Note: Past sample (N=1,845, N=13,165); not indicative of future results.
In patterns B and C, the number of days to exit is fixed or the stop loss takes priority, so the average holding period barely changes with the period.
Looking by trend, volatility and earnings
By trend (pattern A)
In pattern A, the share of trades closed in profit, average P/L and profit factor all ranked uptrend > range > downtrend. In downtrends, both the average loss (trades closed at a loss) and the median MAE were the largest (most negative). The same ordering across trend categories was observed at each RSI period.
By volatility (pattern A)
In pattern A, the median MAE tended to be the largest (most negative) in high volatility, and the largest loss also tended to be the largest (most negative). For RSI(21) in pattern A under high volatility, the median MAE was a particularly large -10.10%. The numbers show that as the holding period lengthens, adverse moves in unrealized losses also tend to widen. Note: Past sample (N=883); not indicative of future results.
Around earnings (pattern A, RSI(14))
For RSI(14) in pattern A, the share of trades closed in profit, average P/L and profit factor were observed to be higher away from earnings than near earnings. The largest loss was also larger (more negative) away from earnings. On the other hand, the median MAE (maximum adverse excursion) was larger (more negative) near earnings. Different aspects are observed at the same time: near earnings, adverse moves while holding tend to be larger, while the largest loss tends to be more limited. Note: Past sample (N=1,750, N=551); not indicative of future results.
What changes and what doesn't when you change the period
The observations that can be drawn from this backtest are as follows.
What changes
- The number of entry opportunities (more with a shorter period)
- The average holding period (longer with a longer period in pattern A)
- The size of the median MAE (in patterns A and B, adverse moves tend to be larger with a longer period)
- The level of the share of trades closed in profit, average P/L and profit factor (in patterns A and B, a tendency to be higher with a longer period; in pattern C, the direction differs by metric)
- How long the longest losing streak is (the direction of the relationship with the period changes by pattern)
What doesn't change (observed in pattern A)
- The ordering across trend categories (uptrend > range > downtrend)
- The tendency for adverse moves to be larger in higher-volatility environments
Limitations and caveats
- Survivorship bias: Only current constituents are included, so the results may be skewed in a more favorable direction than the actual market in the past
- Trading costs and slippage: Not included
- Limit on overlapping positions in the same stock: Limited to one, which may differ from a real trading environment
- Only 3 points compared: This backtest is "a comparison of 3 points: 9, 14 and 21," and results outside this range or in other markets and timeframes need to be checked separately
- RSI(21) uptrend sample: Because RSI(21) has a long period, it rarely gets below 30, and the sample is especially small in uptrends. Treat figures for buckets with small samples as reference only
Repeated testing under the same conditions provides a basis for judging which period suits your stocks and timeframe. With ENTRIQ's Chart Replay, you can practice on real historical charts while changing the period. You can organize and build up your results by condition with Strategy Tags.
Summary
We compared buying when RSI(9), RSI(14) and RSI(21) drop below 30 across 3 exit patterns.
- The shorter the period, the more entry opportunities. In patterns A and B, a tendency for the share of trades closed in profit and average P/L to be higher with a longer period was observed
- In pattern C, the direction of the relationship with the period switches depending on the metric, so it cannot simply be summed up as "longer period = better or worse"
- The direction of the tendencies by trend direction and volatility was observed consistently even when the period was changed
- In patterns A and B, the median MAE tends to be larger (more negative) with a longer period, and for RSI(21) in pattern A the average holding period is also longer
- The largest loss and the median MAE do not necessarily move in the same direction, so it helps to check both
Rather than asking which single period is "right," the perspective of checking with historical data "which period fits your own rules and stocks" is a step toward building a basis for your own discretionary decisions. For details on each RSI-below-30 pattern, see also Buying When RSI Drops Below 30.
Frequently asked questions (FAQ)
Q. How should I choose the RSI period? A. Periods of 9, 14 and 21 are commonly referenced, but there is no single correct answer. The backtest in this article aims to lay out points of comparison, and which period to choose needs to be checked against your own stocks, timeframe and exit rules.
Q. Is it a good thing that a shorter period produces more signals? A. More opportunities make it easier to build up a backtest sample. On the other hand, in this backtest, the share of trades closed in profit and average P/L were higher with the longer period in patterns A and B. More opportunities do not necessarily translate directly into better results.
Q. Why is the RSI(21) uptrend sample so small? A. Because RSI(21) has a long period, it rarely gets below 30, which narrows the overall sample. In uptrends in particular, prices tend to be supported, so RSI(21) has even fewer opportunities to drop below 30. Treat figures for buckets with small samples as reference only.
Q. Can I use these results directly? A. Results change if the stocks, period, timeframe or exit rules differ. Use the figures as a reference for organizing your thinking, and run the backtest again under your own conditions.
Related articles
- Complete Guide to RSI|Reading, Settings, Entries and Testing
- Daily RSI Below 20 on US Stocks|Comparing 3 Exits
This article is provided for informational purposes to examine and organize historical data and does not recommend any specific trade. The figures shown are past samples and do not indicate future results. All investment decisions are your own responsibility.
Reproduce this validation yourself
With ENTRIQ's chart replay, you can trade through past charts using the same rules.
Try the demo — no sign-upNo sign-up or card needed. Runs right in your browser. Start 14-day free trial →
Validate your method on past charts
The same validation in this article can be reproduced with your own method. On past charts, do the classics really work?
- ✓ Replay past charts
- ✓ AI feedback on your trades
- ✓ Validate methods with statistics
No sign-up or card needed. Runs right in your browser.