RSI(14) Mean Reversion on XLK
Technology Select Sector SPDR Fund: S&P 500 technology stocks, the sector behind most recent bull runs. Backtest 2021-01-04 to 2026-10-02, $10,000 starting capital, computed by the same engine that runs live DeployQuant strategies.
RSI mean reversion on XLK, the technology sector fund, turned $10,000 into $16,176 from 2021-01-04 to 2026-10-02. That is a 61.76% total return, an 8.74% CAGR, a Sharpe ratio of 0.58 and a maximum drawdown of 25.98%. Buy-and-hold of XLK did a good deal more: $31,425, a 22.07% CAGR, a Sharpe ratio of 0.95 and a 32.96% drawdown.
The rule buys at the next open after the 14-day RSI drops under 30 and sells everything once it climbs over 70, with no stop and no profit target. The trade list has 16 closed round trips (32 fills), and 11 of them won, which is 69%. Winners averaged 6.90%, losers averaged negative 4.48%, and the profit factor was 3.44. It was invested at the close on 30.1% of trading days.
Only 2022 went the rule's way: XLK lost 27.2% in the buy-and-hold run that year and the rule lost 16.2%. In the other five years it trailed. XLK was one of the strongest funds in the window, and a rule that sits in cash on most days gives up a lot of a rising market.
On XLK this template ranks 10th of 12 by CAGR, and XLK ranks 10th of the 59 funds for it. The median CAGR for RSI mean reversion over all funds was 2.98%, so 8.74% is well above the typical result for this rule. Statistics for the fund itself are on the XLK page. Fees and slippage are left out of the headline run, and the window is 5.7 years.
Year by year
| Year | RSI mean reversion | buy & hold |
|---|---|---|
| 2021 | 13.9% | 36.1% |
| 2022 | −16.2% | −27.2% |
| 2023 | 15.3% | 54.6% |
| 2024 | 18.8% | 21.3% |
| 2025 | −0.3% | 24.3% |
| 2026 | 24.0% | 38.9% |
Year by year against buy-and-hold
The rule returned 13.9% in 2021, negative 16.2% in 2022, 15.3% in 2023, 18.8% in 2024, negative 0.3% in 2025 and 24.0% so far in 2026. Buy-and-hold returned 36.1%, negative 27.2%, 54.6%, 21.3%, 24.3% and 38.9%.
In 2021 the rule made 13.9% against 36.1%. It was flat in January and February, and its first trade was bought on 2021-03-05 at an adjusted $61.29 and sold on 2021-04-09 at $67.15 for 9.56%. A second trade from 2021-05-06 returned 0.96%, and a third from 2021-09-21 returned 3.30%. All three won. The months in cash, July, August, November and December, are the gap to holding.
In 2022 the rule lost 16.2% and XLK lost 27.2%, the only year the rule came out ahead. It also was the only year in which no trade won: the three trades that exited in 2022 all lost. The first, from 2022-01-18 at $78.79 to 2022-03-29 at $78.46, lost 0.42% over 70 days. The second, from 2022-04-20 at $73.33 to 2022-07-11 at $63.75, lost 13.06% over 82 days. The third, from 2022-08-31 at $66.44 to 2022-11-25 at $64.99, lost 2.18%. The monthly table shows what happened: June was negative 8.98% and September negative 11.62%, against negative 11.65% for buy-and-hold in September. The rule held the position through that month, which cost the fund the same amount. It was in cash only for short gaps in 2022, and a trade bought on 2022-12-21 at $61.59 returned 5.62% by 2023-01-24.
In 2023 the rule made 15.3% against 54.6%, the widest gap of any year. January carried the 5.62% trade, with a month of 7.07%. The rule was then in cash from February to July, in a year when XLK returned 56.01%. A trade from 2023-08-08 lost 1.13% and September 2023 was negative 6.32%. The rule bought again on 2023-10-27 at $79.11 and sold on 2023-11-10 at $86.30 for 9.09% in 14 days, the shortest hold in the test.
In 2024 the rule made 18.8% against 21.3%, the closest year. It made three trades, all wins: 6.05% from 2024-04-22, 3.75% from 2024-07-26 and 8.46% from 2024-09-09. The August 2024 sell-off is in the drawdown table, a 9.57% drop from 2024-07-31 to 2024-08-07 that recovered by 2024-08-15.
In 2025 the rule lost 0.3% against a gain of 24.3%, the second widest gap. It bought on 2025-03-04 at $107.50 and sold on 2025-04-30 at $101.45 for negative 5.63%. March was negative 4.62% and April negative 0.93%. The rule was then in cash from May through October, and bought on 2025-11-19 at $138.89 for a 5.67% gain by 2025-12-10.
In 2026 the rule made 24.0% against 38.9%. The trade from 2026-03-30 at $130.75 to 2026-04-16 at $150.38 returned 15.01% in 17 days, the best in the test, and April was 13.05%, the best month. A trade from 2026-07-30 at $172.24 to 2026-08-18 at $186.69 returned 8.39%.
Month by month
| Year | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2021 | 0.0% | 0.0% | 3.9% | 5.2% | 1.6% | −0.6% | 0.0% | 0.0% | −2.3% | 5.6% | 0.0% | 0.0% |
| 2022 | −0.7% | −4.8% | 5.4% | −6.5% | −0.7% | −9.0% | 3.3% | −1.3% | −11.6% | 7.4% | 4.4% | −1.5% |
| 2023 | 7.1% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 3.0% | −6.3% | 4.2% | 7.1% | 0.0% |
| 2024 | 0.0% | 0.0% | 0.0% | 1.2% | 4.7% | 0.0% | 1.4% | 2.3% | 8.3% | 0.0% | 0.0% | 0.0% |
| 2025 | 0.0% | 0.0% | −4.6% | −0.9% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 2.5% | 3.0% |
| 2026 | 0.0% | 0.0% | 1.4% | 13.1% | 0.0% | 0.0% | 1.6% | 6.5% | 0.0% | 0.0% | – | – |
Reading the monthly table
The monthly table has many zeros, and each is a month in cash. Of the periods without a position, the longest are February to July 2023 and May to October 2025. A month without a position cannot lose, and it also earns nothing in a month the fund rose.
The rule's best months were April 2026 at 13.05%, September 2024 at 8.27% and January 2023 at 7.07%. Its worst were September 2022 at negative 11.62%, June 2022 at negative 8.98% and April 2022 at negative 6.55%. Buy-and-hold had its best month in April 2026 as well, at 19.71%, and its worst in September 2022 at negative 11.65%. The rule took almost the full September 2022 loss because it held the position it bought on 2022-08-31.
Seasonal averages for XLK in this window show May as the strongest month at 7.38%, then November at 4.79% and October at 4.19%. September averaged negative 1.48% and February negative 0.70%. With only 5 or 6 years behind each calendar month, these averages describe this window and nothing more. The rule's own pattern does not follow the calendar: its entries fell in ten different calendar months.
Every trade
RSI mean reversion on XLK made 16 closed round trips, an average hold of 39 days, an average winner of 6.90%, an average loser of −4.48%, a profit factor of 3.44, a longest losing streak of 3. It held a position at the close on 30.1% of trading days.
| Entry | Entry price | Exit | Exit price | Return | Days held |
|---|---|---|---|---|---|
| 2021-03-05 | $61.29 | 2021-04-09 | $67.15 | 9.6% | 35 |
| 2021-05-06 | $65.41 | 2021-06-03 | $66.04 | 1.0% | 28 |
| 2021-09-21 | $73.65 | 2021-10-21 | $76.08 | 3.3% | 30 |
| 2022-01-18 | $78.79 | 2022-03-29 | $78.46 | −0.4% | 70 |
| 2022-04-20 | $73.33 | 2022-07-11 | $63.75 | −13.1% | 82 |
| 2022-08-31 | $66.44 | 2022-11-25 | $64.99 | −2.2% | 86 |
| 2022-12-21 | $61.59 | 2023-01-24 | $65.05 | 5.6% | 34 |
| 2023-08-08 | $83.41 | 2023-10-17 | $82.47 | −1.1% | 70 |
| 2023-10-27 | $79.11 | 2023-11-10 | $86.30 | 9.1% | 14 |
| 2024-04-22 | $95.50 | 2024-05-10 | $101.28 | 6.0% | 18 |
| 2024-07-26 | $106.43 | 2024-08-26 | $110.42 | 3.8% | 31 |
| 2024-09-09 | $101.82 | 2024-09-25 | $110.43 | 8.5% | 16 |
| 2025-03-04 | $107.50 | 2025-04-30 | $101.45 | −5.6% | 57 |
| 2025-11-19 | $138.89 | 2025-12-10 | $146.77 | 5.7% | 21 |
| 2026-03-30 | $130.75 | 2026-04-16 | $150.38 | 15.0% | 17 |
| 2026-07-30 | $172.24 | 2026-08-18 | $186.69 | 8.4% | 19 |
Prices are adjusted for splits and dividends, so they sit below the quotes printed at the time. An open position is marked at the last close.
The 16 round trips
Eleven of 16 trades won. The average winner returned 6.90% and the average loser lost 4.48%. The median trade returned 5.62% and the average hold was 39.2 days. The best run was 4 wins in a row. The worst was 3 losses in a row, all of them exits in 2022.
The five losers lost 0.42%, 13.06%, 2.18%, 1.13% and 5.63%. All five were held for 57 to 86 days, which is much longer than any winner. That is the pattern of this rule on a trending fund: when the bounce comes it comes fast, and when it does not come the position sits and loses. The five best trades returned 15.01% in 17 days, 9.56% in 35 days, 9.09% in 14 days, 8.46% in 16 days and 8.39% in 19 days. The winners were short and the losers were long.
The profit factor of 3.44 comes from that split between a high win rate and larger average wins than losses. The one large loss, the 13.06% trade from 2022-04-20, is larger than any other loss in the list, so the average loser of 4.48% leans on a single trade.
The rule has no filter for a falling market. Three of its 2022 entries lost as the fund kept sliding. In the other years the same signal worked: every entry from 2023-10-27 through 2024-09-09 won, and so did both entries in 2026.
Prices on the trade list are adjusted for splits and dividends, so they read lower than the quotes printed at the time.
Largest drawdowns
| Peak | Low point | Depth | Days to low | Recovered | Days to recover |
|---|---|---|---|---|---|
| 2021-10-19 | 2022-10-12 | −26.0% | 358 | 2024-05-03 | 569 |
| 2025-03-05 | 2025-04-08 | −18.3% | 34 | 2026-04-01 | 358 |
| 2024-07-31 | 2024-08-07 | −9.6% | 7 | 2024-08-15 | 8 |
Buy-and-hold's deepest drawdown ran from 2021-12-27 to 2022-10-12 and reached −33.0%.
The three deepest drawdowns
The deepest drawdown was 25.98%, from a peak on 2021-10-19 to a low on 2022-10-12, 358 days down. Recovery took until 2024-05-03, another 569 days. The second was 18.30%, from 2025-03-05 to 2025-04-08, with 34 days to the low and 358 days to recover on 2026-04-01. The third was 9.57%, from 2024-07-31 to 2024-08-07, recovered in 8 days.
Buy-and-hold had a deeper version of the first two. Its worst drawdown was 32.96% from 2021-12-27 to 2022-10-12, recovered on 2023-06-15. Its second was 25.29% from 2025-02-18 to 2025-04-08, recovered on 2025-06-12, and its third 16.74% from 2024-07-10 to 2024-08-07. The rule's maximum drawdown was shallower than holding by 6.98 points.
The recovery times are the notable part. Buy-and-hold recovered from its 2025 drawdown in 65 days. The rule took 358 days to recover from its own 2025 drawdown of 18.30%, because after the April 2025 low it stayed in cash through the rebound. A rule that waits for another oversold reading before buying cannot take part in a recovery that begins without one. The rule made no entry between 2025-04-30 and 2025-11-19, and its equity stayed below the March high until 2026-04-01.
The 2022 drawdown tells a different story. The rule's peak came on 2021-10-19, two months before the fund's own peak, because the rule was in cash for November and December 2021, and the rule's equity then fell during 2022 with the three losing trades. The drawdown was 25.98% against the fund's 32.96%, and it took longer to recover than the fund did while the rule held cash for much of 2023.
With trading costs
The headline run fills at the bar price. These runs charge slippage on every fill.
| Slippage per fill | CAGR | Max drawdown | Final value | Sharpe |
|---|---|---|---|---|
| None (headline) | 8.7% | −26.0% | $16,176 | 0.58 |
| 5 basis points | 8.4% | −26.3% | $15,915 | 0.56 |
| 10 basis points | 8.2% | −26.5% | $15,677 | 0.55 |
Slippage on 32 fills
The rule made 32 fills. At 5 basis points per fill the CAGR fell from 8.74% to 8.43% and the final value from $16,176 to $15,915. At 10 basis points the CAGR was 8.15% and the final value $15,677. The Sharpe ratio fell from 0.58 to 0.56 and then 0.55, and the maximum drawdown widened from 25.98% to 26.32% and then 26.48%.
The cost is modest because the rule trades rarely and XLK is liquid. The fund's average daily dollar volume was $1,324,049,811 and its median minute volume was 20,984 shares. A small account does not move that price. The cost runs show the rule keeping most of its return after 10 basis points on every fill.
Changing the parameters
| Version | CAGR | Max drawdown | Round trips | Win rate | Final value |
|---|---|---|---|---|---|
| Published rules | 8.7% | −26.0% | 16 | 69% | $16,176 |
| RSI < 25 / > 70 | 3.3% | −23.3% | 10 | 70% | $12,029 |
| RSI < 35 / > 70 | 13.1% | −24.4% | 22 | 77% | $20,303 |
| RSI < 30 / > 65 | 10.1% | −20.4% | 18 | 78% | $17,387 |
| RSI < 30 / > 75 | 12.7% | −23.3% | 15 | 80% | $19,821 |
Moving the thresholds
Four variants change one threshold at a time. Buying below 25 instead of 30 made 10 trades and won 7, with a CAGR of 3.27%, a drawdown of 23.27%, a Sharpe ratio of 0.285 and a final value of $12,029. Buying below 35 made 22 trades and won 17, with a CAGR of 13.13%, a drawdown of 24.44% and a final value of $20,303. Selling above 65 made 18 trades with 14 wins, a CAGR of 10.11% and a drawdown of 20.37%. Selling above 75 made 15 trades with 12 wins, a CAGR of 12.66% and a drawdown of 23.27%.
The other three variants beat the published rule's 8.74%. The widest swing is on the buy side: RSI below 25 returned 3.27% and RSI below 35 returned 13.13%. Moving the entry threshold by 5 points in either direction changed the CAGR more than anything else in the table. The published 30 sits between a result of 3.27% and a result of 13.13%, and with 10 to 22 trades per variant it is hard to say which value reflects the fund.
The lower buy threshold fires less often on a fund that rarely gets that oversold. The higher one fires more often and catches more small dips, and 17 of its 22 trades won. Both of the sell variants beat the published rule: leaving at 65 cut the drawdown to 20.37%, the shallowest in the table, while leaving at 75 returned 12.66%. The published 70 was not the best on either side in this window.
The Sharpe ratios were 0.761 for the 35 entry and 0.775 for the 75 exit, against 0.58 for the published rule. Because every one of those was found by looking at this window, the numbers say how much the result moves, and they do not say a better setting exists for the future.
How XLK behaved
| Measure | XLK |
|---|---|
| Data in this test | 2021-01-04 to 2026-10-02 (1444 sessions) |
| Total return, buy and hold | 226.1% |
| Annualized volatility | 25.1% |
| Deepest drawdown | −33.6% (2021-12-27 to 2022-10-12) |
| Up days | 55.2% |
| Average daily range | 1.77% |
| Average overnight gap | 0.69% |
| Correlation to SPY | 0.91 |
| Correlation to QQQ | 0.97 |
| Correlation to TLT | 0.07 |
| Sessions above the 200-day average | 76.5% |
| Crossings of the 200-day average | 22 |
| Falls of 10% or more from a 20-day high | 30 |
What XLK did and why an oversold rule sat out
XLK returned 226.13% over the window, a CAGR of 22.86%, with annualized volatility of 25.13%. Its calendar years were 36.99% in 2021, negative 27.73% in 2022, 56.01% in 2023, 21.64% in 2024, 24.61% in 2025 and 39.31% so far in 2026. Its deepest drawdown was 33.58% from 2021-12-27 to 2022-10-12, recovered on 2023-06-15.
The fund was above its 200-day average on 76.47% of sessions and crossed it 22 times. Up days were 55.23% of sessions with an average up day of 1.15% and an average down day of negative 1.21%. A fund that spends three quarters of the time above its 200-day average and rarely gets oversold is a hard match for a rule that needs oversold readings to enter.
What the oversold readings did show was a good bounce. After the 15 sessions with RSI(14) below 30, the median 5-day forward return was 4.01% and the median 20-day return was 4.40%, against baselines of 0.50% and 1.90% for any session. RSI(2) below 10 happened on 137 sessions with a median 5-day return of 0.60% and a 20-day return of 2.59%. The slower RSI(14) signal had the stronger edge in this window, which fits the rule's 69% win rate. The sample is 15 sessions and it comes from one window.
XLK is highly correlated with the growth trade. Its correlation was 0.97 to QQQ and 0.91 to SPY, and its beta was 1.39 to SPY and 1.08 to QQQ. The fund moved with the market on the way down in 2022, and an oversold rule that buys early meets the continuing fall. The profile counts 30 events of a 10% fall from a 20-day high and 96 sessions spent in that state.
Overnight gaps averaged 0.69%, and 55.30% of the return came overnight. The rule held the position through the worst days, negative 6.76% on 2025-04-03 and negative 6.57% on 2025-04-04, and through the best day, 13.37% on 2025-04-09. It sold on 2025-04-30.
The rules
Buy when the 14-day RSI drops below 30 (oversold), sell when it recovers above 70 (overbought).
- WHEN the market opens · IF not invested AND RSI(14) < 30 · THEN buy with 98% of the sleeve
- WHEN the market opens · IF invested AND RSI(14) > 70 · THEN sell the whole position
A standard mean-reversion setup. The Relative Strength Index measures how stretched recent price action is. Readings under 30 have historically marked short-term washouts in uptrending assets. This template buys at the next session open and holds until RSI crosses back above 70. It has no profit target and no stop.
Good for: assets that trend up over time but overshoot on the way, such as broad index ETFs.
Watch out: in a persistent downtrend, RSI can stay oversold for weeks while the position keeps losing; there is no stop-loss in this template.
The RSI thresholds on a sector fund
The relative strength index measures how stretched recent price action is on a scale of 0 to 100. A reading under 30 marks a sharp fall over the last 14 sessions, and a reading over 70 marks a sharp rise. The rule treats a sharp fall as a chance to buy and a sharp rise as the time to leave.
On XLK the buy signal is rare. RSI(14) was below 30 on 15 sessions out of 1,444 and above 70 on 153. The rule enters on a handful of washouts and then waits for a strong run to exit, so it is out of the fund for most of the window. The longest hold was 86 days, the shortest 14 and the median 31.
There is no stop. A position bought at an oversold reading can keep falling while RSI stays low, and the only exit is RSI above 70. The worst trade in the test shows the effect: a loss of 13.06% over 82 days in 2022. Oversold signals paid when the market bounced quickly, and the five best trades lasted between 14 and 35 days.
Where 8.74% sits among the other rules and sector funds
Ranked by CAGR on XLK, nine of the 12 templates finished ahead of this one. At the top were the monthly cycle at 20.86% and the weekly 7% target at 20.39%. The weekly rule also had a drawdown of 20.67%, against 32.05% for the monthly one. Trend filters came next: the 200-day regime filter at 16.81% and the golden cross at 15.33%, with drawdowns of 19.72% and 19.60%. Then came the trend plus trailing stop at 12.49%, the RSI(2) snapback at 12.11% with an 18.15% drawdown, the momentum breakout at 11.62%, the EMA 12/26 trend at 9.84% and the SMA 10/50 trend at 9.47%. Only the dip buyer at 7.85% and the 3-month momentum rule at 6.06% finished behind.
The faster RSI(2) version of the same idea ranks above this rule on XLK, with the shallowest drawdown of the 12 at 18.15%. A shorter RSI window gives more entries on a fund that rarely reaches 30 on the 14-day measure.
The same rule on other sector funds gave a wide spread. SOXX returned 12.78% but fell 35.01% at its worst, and XLF returned 11.82% with 18.73%. XLY came in at 7.00%. XLP returned 6.51% with a drawdown of only 9.64%, and VOX returned 2.39% with 35.15%. XLK's 8.74% is the median of this sector group.
What this test does not show
Everything here comes from a single stretch of 5.7 years and a single fund. Orders fill on minute bars, there is no margin, the headline run charges nothing per trade and cash earns nothing. With 16 trades, the 13.06% loss in 2022 weighs heavily on the loss side. XLK rose strongly through the window, and holding cash on most days costs a rule a lot in that setting. Another window with more oversold readings would give the rule more trades. These are hypothetical results and the page offers no forecast.
Build it from blocks (or type it in English), backtest it on 5.7 years of minute data in seconds, tweak any parameter, then paper trade it on live data. No card, no broker needed to start.
Frequently asked questions
Did RSI mean reversion beat buy-and-hold on XLK?
Over 2021-01-04 to 2026-10-02, RSI mean reversion on XLK returned 8.7% annualized vs 22.1% for buy-and-hold: it trailed buy-and-hold by 13.3% per year, with a maximum drawdown 7.0 points shallower than holding (26.0% vs 33.0%).
How many trades did it make?
16 completed round trips over 5.7 years (32 fills), with 69% of round trips closing profitably.
Why RSI 30/70?
They are the conventional oversold and overbought bands from Welles Wilder's original formulation. Treat them as a starting point. In DeployQuant you can change them to 25/65 or anything else and re-backtest in seconds.
Does this strategy use a stop-loss?
No. The only exit is RSI recovering above 70. Adding a stop or a take-profit block is a one-block edit in the Lab.
Did this rule come out ahead of simply holding XLK?
It did not. The account ended at $16,176 with an 8.74% CAGR, while holding ended at $31,425 with 22.07%. Its drawdown of 25.98% was shallower than the 32.96% from holding, and it led the fund only in 2022.
How many trades did it make and how many won?
There were 16 closed round trips, made of 32 fills. Eleven finished positive, which is 69%. Winners averaged 6.90% and losers averaged negative 4.48%, giving a profit factor of 3.44.
What was the worst trade?
A 13.06% loss over 82 days in 2022, bought at $73.33 on 2022-04-20 and sold at $63.75 on 2022-07-11. With no stop in the template, the position stayed open until RSI recovered above 70.
Why is the rule invested so little of the time?
The 14-day RSI closed below 30 on just 15 of 1,444 sessions. Exposure was 30.1% of trading days, and the account sat in cash for long stretches, February to July 2023 among them.
Does a different RSI threshold change the result?
By a wide margin. An entry below 25 returned 3.27% a year and an entry below 35 returned 13.13%. An exit above 65 gave 10.11% and an exit above 75 gave 12.66%, against 8.74% for the published 30 and 70.
What happens with trading costs?
Charging 5 basis points on each fill cut the CAGR to 8.43%, and 10 basis points cut it to 8.15%. The ending balance went from $16,176 to $15,915 and then $15,677.
Related
Backtests are hypothetical, computed by DeployQuant's engine on minute-resolution consolidated US market data (2021-01-04 to 2026-10-02, $10,000 starting capital, no margin, no fees or slippage in the headline run; buy-and-hold puts 98% of the account in at the first open, as the templates do) and do not guarantee future results. Nothing on this page is investment advice. Live trading involves risk of loss.