RSI(14) Mean Reversion on IEF
iShares 7-10 Year Treasury Bond ETF: intermediate Treasuries, a common 60/40 diversifier. Backtest 2021-01-04 to 2026-10-02, $10,000 starting capital, computed by the same engine that runs live DeployQuant strategies.
The RSI mean reversion rule buys when the 14-day RSI drops below 30 and sells when it climbs back above 70. It has no stop and no profit target. Applied to IEF, the iShares 7-10 Year Treasury Bond ETF, it turned $10,000 into $9,529 between 2021-01-04 and 2026-10-02. That is a total return of -4.71% and a CAGR of -0.84%.
Buy-and-hold on IEF did worse. It ended at $8,756, a CAGR of -2.29%, with a maximum drawdown of 21.77%. The rule's maximum drawdown was 13.64%. The rule lost money, but it lost less than holding, finished $774 ahead of it, and took a shallower fall along the way. The Sharpe ratio was -0.13 for the rule and -0.29 for the fund.
The rule made 15 closed round trips and 31 fills, and one more position was still open at the end. Ten of the 15 closed trips made money, a win rate of 67%. The average winner made 2.08% and the average loser lost 4.32%, which is why a two-thirds win rate still produced a profit factor of 0.92, below 1. The rule was invested on 48.3% of trading days.
The pattern is common for a mean-reversion rule on a fund in a long decline. Small wins arrive often, and a few long holds in a falling market take them back. Two of the losers lasted 239 and 169 days. On 15 trades the individual dates carry most of the information, so the dates are named below.
The test covers a single stretch of about 5.7 years. Signals are daily, fills come from minute bars, there is no leverage, and the headline run charges no fees. IEF lost 12.95% in total over those years, which is the reason every rule on this fund looks weak.
Year by year
| Year | RSI mean reversion | buy & hold |
|---|---|---|
| 2021 | −1.8% | −3.3% |
| 2022 | −9.5% | −14.8% |
| 2023 | 1.3% | 3.5% |
| 2024 | 2.6% | −0.6% |
| 2025 | 4.5% | 7.8% |
| 2026 | −1.3% | −4.5% |
How each year went
The rule returned -1.8% in 2021, -9.5% in 2022, 1.3% in 2023, 2.6% in 2024, 4.5% in 2025 and -1.3% in 2026 to date. Buy-and-hold returned -3.3%, -14.8%, 3.5%, -0.6%, 7.8% and -4.5%. Against the fund, the rule came out ahead in 2021, 2022, 2024 and 2026. It trailed in 2023 and 2025.
The year 2022 was the worst for both. IEF lost 15.16% on a calendar basis as yields rose, and the rule lost 9.5%, five points less than holding. The rule made 3 round trips that exited in 2022 with 1 winner. The big loss belongs to the trade entered on 2021-09-30 at an adjusted $98.55 and exited on 2022-05-27 at $90.19, a loss of 8.48% over 239 days. That trade crossed from 2021 into 2022, and it is the worst in the table. The RSI had fallen below 30 and the rule bought, but the fund kept sliding for months.
In 2022 the rule also took the best trade of the window. It entered on 2022-06-13 at $86.14 and exited on 2022-07-06 at $90.04, a gain of 4.53% in 23 days. The entry was on the worst day of the year for the fund, a fall of 1.77%. After it, the rule's next trade, from 2022-08-25 at $88.04 to 2022-11-11 at $83.48, lost 5.18% over 78 days.
In 2021 the rule made one trip that exited in the year, from 2021-02-16 at $100.04 to 2021-04-22 at $97.89, losing 2.15%. The fund lost 3.35% on the calendar. The rule was in cash for May to August and entered again on 2021-09-30.
In 2023 the rule made 1.3% with 3 trips and 2 winners, against 3.5% for holding. The first two trips were small winners, 4.09% from 2022-12-29 to 2023-01-19 and 1.83% from 2023-02-15 to 2023-03-14. The third, from 2023-05-24 at $86.34 to 2023-11-09 at $82.36, lost 4.61% over 169 days. It sat through the September and October declines, at -3.05% and -1.9% in the monthly table. Holding made 3.5% that year because the fund rallied in November, and the rule exited on 2023-11-09, just before that move.
In 2024 the rule made 2.6% with 3 trips and 2 winners, against -0.6% for the fund. In 2025 it made 4.5% with 3 trips and all 3 winners, against 7.8% for the fund. In 2026 through 2026-10-02, 2 closed trips both won, but the open position entered on 2026-07-24 at $92.00 was marked at -3.2%, and the year totals -1.3% for the rule against -4.5% for holding.
Month by month
| Year | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2021 | 0.0% | −1.2% | −2.3% | 1.5% | 0.0% | 0.0% | 0.0% | 0.0% | 0.2% | −0.5% | 1.1% | −0.5% |
| 2022 | −2.1% | −0.3% | −4.0% | −4.1% | 1.7% | 2.6% | 1.8% | −0.6% | −4.6% | −1.4% | 1.5% | −0.2% |
| 2023 | 4.2% | −0.8% | 2.6% | 0.0% | 0.3% | −1.2% | −0.6% | −0.7% | −3.0% | −1.9% | 2.7% | 0.0% |
| 2024 | 1.8% | −2.0% | 1.4% | 0.1% | 2.6% | 0.0% | 0.0% | 0.0% | 0.0% | −1.6% | 0.9% | −0.4% |
| 2025 | 0.6% | 0.3% | 0.0% | 0.0% | 1.2% | 1.3% | 0.0% | 0.0% | 0.0% | 0.0% | 0.9% | 0.0% |
| 2026 | 0.0% | 0.0% | −0.6% | 0.8% | 1.1% | 0.6% | −0.0% | 0.1% | −3.3% | 0.1% | – | – |
Monthly returns: long cash stretches and a few hard months
The rule's best month was 2023-01 at 4.15%, which came from the 2022-12-29 entry and the 2023-01-19 exit. Its worst was 2022-09 at -4.56%, the same figure as buy-and-hold's worst month. In September 2022 the rule was holding the position from 2022-08-25, so it took the full hit. Buy-and-hold's best month was 2023-11 at 4.47%, a month the rule was out for, since it had sold on 2023-11-09.
Several spring months in 2022 show how a rising-rate year hurts. January was -2.08%, March -3.96% and April -4.07%. The rule was in the long trade from 2021-09-30 through all of them. May 2022 brought a 1.67% gain, and the exit on 2022-05-27 came right after.
The zeros in the table mark time in cash. May to August 2021 are zero, as is April 2023 and December 2023. June to September 2024 are zero. Most of 2025's second half is zero: July, August, September, October, and December. January and February 2026 are zero as well. Exposure of 48.3% is the sum of these gaps.
September 2026 shows -3.27%, the second-worst figure in the table after 2022-09 and the worst of 2026. It comes from the open position, which was entered on 2026-07-24 at $92.00 and is marked at -3.2% at the end of the data. If that position is still open when the RSI climbs above 70, the figures will change. The window ends before any exit.
The fund's own month-of-year averages show November at 2.24% and September at -1.79%, with October at -1.31%. These are averages over five or six years, so one year can set them, and the clustering of the 2022 and 2023 autumn losses is the obvious source. The rule does not use the calendar.
Every trade
RSI mean reversion on IEF made 15 closed round trips and one position still open at the end of the test, an average hold of 63 days, an average winner of 2.08%, an average loser of −4.32%, a profit factor of 0.92, a longest losing streak of 2. It held a position at the close on 48.3% of trading days.
| Entry | Entry price | Exit | Exit price | Return | Days held |
|---|---|---|---|---|---|
| 2021-02-16 | $100.04 | 2021-04-22 | $97.89 | −2.1% | 65 |
| 2021-09-30 | $98.55 | 2022-05-27 | $90.19 | −8.5% | 239 |
| 2022-06-13 | $86.14 | 2022-07-06 | $90.04 | 4.5% | 23 |
| 2022-08-25 | $88.04 | 2022-11-11 | $83.48 | −5.2% | 78 |
| 2022-12-29 | $84.03 | 2023-01-19 | $87.47 | 4.1% | 21 |
| 2023-02-15 | $84.74 | 2023-03-14 | $86.29 | 1.8% | 27 |
| 2023-05-24 | $86.34 | 2023-11-09 | $82.36 | −4.6% | 169 |
| 2024-01-19 | $85.47 | 2024-03-11 | $86.37 | 1.1% | 52 |
| 2024-04-16 | $83.04 | 2024-05-16 | $85.33 | 2.8% | 30 |
| 2024-10-07 | $88.97 | 2024-12-04 | $87.90 | −1.2% | 58 |
| 2024-12-19 | $86.32 | 2025-02-03 | $87.18 | 1.0% | 46 |
| 2025-05-21 | $88.40 | 2025-06-30 | $90.75 | 2.7% | 40 |
| 2025-11-06 | $93.10 | 2025-11-26 | $94.00 | 1.0% | 20 |
| 2026-03-16 | $93.72 | 2026-04-17 | $93.94 | 0.2% | 32 |
| 2026-05-18 | $92.04 | 2026-06-30 | $93.60 | 1.7% | 43 |
| 2026-07-24 | $92.00 | open | – | −3.2% | – |
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.
Fifteen closed trades and one open one
The median closed trade returned 1% and the median hold was 43 days. Holds ranged from 20 to 239 days, and the average was 62.9 days. Wins ran in a streak of at most 5 trades, and losses in a streak of at most 2.
The five best trades were 4.53% (2022-06-13 to 2022-07-06), 4.09% (2022-12-29 to 2023-01-19), 2.76% (2024-04-16 to 2024-05-16), 2.66% (2025-05-21 to 2025-06-30) and 1.83% (2023-02-15 to 2023-03-14). The five worst were -8.48%, -5.18%, -4.61%, -2.15% (2021-02-16 to 2021-04-22) and -1.2% (2024-10-07 to 2024-12-04).
The distribution is lopsided. Winners were many and small. Every winner returned under 5%, and the best made 4.53%. Losers were fewer and larger, with three below -4%. All three of those were long holds: 239, 78 and 169 days. The three losses account for most of the damage, and each one was a trade held while the fund fell steadily after the entry.
The win streak of 5 runs from the trade on 2024-12-19 through 2026-06-30, the stretch where the fund was steadier. The trades were 1% (2024-12-19 to 2025-02-03), 2.66%, 0.97% (2025-11-06 to 2025-11-26), 0.23% (2026-03-16 to 2026-04-17) and 1.69% (2026-05-18 to 2026-06-30), with 1.05% and 2.76% for the two trips earlier in 2024. These are all small gains of one to three percent, and the shorter holds of 20 to 46 days came with RSI recoveries.
By exit year the closed trips and wins were 1 and 0 in 2021, 3 and 1 in 2022, 3 and 2 in 2023, 3 and 2 in 2024, 3 and 3 in 2025 and 2 and 2 in 2026. The rule did best in 2025 and 2026, when IEF traded in a narrower range, and worst in 2021 and 2022, when it fell.
The open position began on 2026-07-24 at $92.00. At the last close it was down 3.2%. The result of $9,529 includes that open loss, so the closed trades alone were slightly better.
Largest drawdowns
| Peak | Low point | Depth | Days to low | Recovered | Days to recover |
|---|---|---|---|---|---|
| 2021-02-12 | 2022-10-20 | −13.6% | 615 | not yet | – |
Buy-and-hold's deepest drawdown ran from 2021-01-04 to 2023-10-19 and reached −21.8%.
Drawdown: shallower than the fund, and still open
The table lists one drawdown for the rule. It began at a peak on 2021-02-12, reached a low of 13.64% on 2022-10-20 after 615 days, and had not recovered by the end of the data. The rule's equity has not made a new high since February 2021.
Buy-and-hold's drawdown began on 2021-01-04 and reached 21.77% on 2023-10-19, after 1,018 days, and it too had not recovered. The rule's low came about a year before the fund's, which says that the rule stopped losing sooner. The fund's own drawdown, measured on its price series, was 22.23% and the longest drawdown ran 1,443 sessions, nearly the whole window.
The rule's drawdown was 8.13 points shallower than holding. That is where the rule helped on this fund. It did not protect the account from a loss, since the equity ended below its start, but it cut the worst of the fall by being in cash on a good share of the days. It was invested on 48.3% of the days, and the worst months of 2022 were partly spent in the long trade.
The lack of recovery matters for how to read the result. The rule is below its 2021 peak at the end of the window, so the full period reads as a drawdown with a few rallies in it. No stop exists in the template to cap the worst trade. The 239-day trade lost 8.48%, which is moderate in dollar terms for a bond fund, but it lasted most of a year.
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) | −0.8% | −13.6% | $9,529 | -0.13 |
| 5 basis points | −1.1% | −14.0% | $9,377 | -0.18 |
| 10 basis points | −1.4% | −14.3% | $9,243 | -0.23 |
Cost runs
At 5 basis points of slippage per fill, the CAGR was -1.11%, the maximum drawdown 14% and the final value $9,377. At 10 basis points the CAGR was -1.36%, the maximum drawdown 14.25% and the final value $9,243. The headline run had no costs and ended at $9,529.
The Sharpe ratio moved from -0.13 to -0.182 and -0.228. For a rule with 31 fills, the cost is visible but not large in dollar terms. Because each winning trade made only a couple of percent, costs take a larger relative share of the gains than they would on a volatile fund.
IEF is a deep market. Liquidity was ample: $675,908,601 traded on an average day, and the median minute saw 7,536 shares. Small orders at 5 or 10 basis points of slippage are a cautious assumption for a fund that liquid. The cost rows are assumptions, not measured fills.
Changing the parameters
| Version | CAGR | Max drawdown | Round trips | Win rate | Final value |
|---|---|---|---|---|---|
| Published rules | −0.8% | −13.6% | 15 | 67% | $9,529 |
| RSI < 25 / > 70 | −1.3% | −12.6% | 11 | 55% | $9,257 |
| RSI < 35 / > 70 | −1.2% | −13.7% | 19 | 74% | $9,347 |
| RSI < 30 / > 65 | −0.1% | −8.4% | 18 | 61% | $9,924 |
| RSI < 30 / > 75 | −1.5% | −17.5% | 11 | 64% | $9,164 |
Changing the RSI thresholds
Four variants move one threshold at a time. None of them made money, but one came close.
Buying below 25 instead of 30 gave a CAGR of -1.34% with a drawdown of 12.6%, 11 trades and 6 wins. A stricter entry meant fewer trades and a lower win rate, with a final value of $9,257.
Buying below 35 gave -1.17% with a drawdown of 13.71%, 19 trades and 14 wins, ending at $9,347. A looser entry bought more often and won more often, but the average winner was small.
Selling above 65 instead of 70 gave the best result: a CAGR of -0.13%, a drawdown of 8.42%, 18 trades with 11 wins and a final value of $9,924. The Sharpe ratio was -0.002, the only one near zero in the table. An earlier exit took the small gains sooner, and it also shortened the long holds that did the damage in the published rules.
Selling above 75 gave the worst result: -1.51%, a drawdown of 17.47%, 11 trades with 7 wins and a final value of $9,164. A later exit waited for a stronger RSI, and on IEF, RSI rarely reached it. The fund spent 34 sessions with RSI(14) above 70 across the window, so a higher threshold left positions open longer.
The overall pattern is that the exit threshold mattered more than the entry threshold. The spread in final value across the exit variants, from $9,164 to $9,924, was larger than across the entry variants. That fits the trade list, where the damage came from holds that lasted too long. Choosing 65 after seeing the results would be a fit to this window, and a rule with 18 trades does not give much to fit against.
How IEF behaved
| Measure | IEF |
|---|---|
| Data in this test | 2021-01-04 to 2026-10-02 (1444 sessions) |
| Total return, buy and hold | −12.9% |
| Annualized volatility | 7.4% |
| Deepest drawdown | −22.2% (2021-01-04 to 2023-10-19) |
| Up days | 48.5% |
| Average daily range | 0.42% |
| Average overnight gap | 0.26% |
| Correlation to SPY | 0.09 |
| Correlation to QQQ | 0.10 |
| Correlation to TLT | 0.91 |
| Sessions above the 200-day average | 53.0% |
| Crossings of the 200-day average | 60 |
| Falls of 10% or more from a 20-day high | 0 |
How IEF behaved
IEF lost 12.95% in total over the window, a CAGR of -2.39%, with annualized volatility of 7.39%. The deepest drawdown was 22.23% from 2021-01-04 to 2023-10-19, and the fund had not recovered by 2026-10-02. Year by year the fund returned -3.35% for 2021, -15.16% for 2022, 3.64% for 2023, -0.63% for 2024, 8.03% for 2025 and -4.58% for 2026 to date.
The fund moves little. Up days averaged 0.36% and down days -0.36%. The typical intraday range was 0.42%, and 48.51% of sessions closed higher. The best day was 2022-09-28 at 2.26% and the worst was 2022-06-13 at -1.77%. The rule's best trade was entered on that worst day.
Over the window IEF sat above its 200-day average on 53.01% of sessions and crossed that line 60 times, which made trend rules flip often. Lag-1 autocorrelation was -0.01, effectively zero. RSI(14) fell below 30 on 64 sessions and above 70 on 34. After an RSI(14) reading under 30, the median 5-day return was -0.09% and the median 20-day return was -1%, against baselines of -0.04% and -0.02%. A reading below 30 on this fund was followed by nothing better than average and a slightly worse 20 days. That is the weak point for a mean-reversion rule. RSI(2) below 10 occurred on 186 sessions, with a median 5-day return of 0.05% and a median 20-day return of -0.21%.
The fund was highly correlated with other bond funds, with BND at 0.98, AGG at 0.97, IEI at 0.97, UST at 0.94 and IGIB at 0.92, and with TLT at 0.91. Its correlation to SPY was 0.09 and its beta to SPY was 0.04. It has no leverage and no decay.
The same rule on other bond funds gave similar results: IEI at -0.2%, AGG and BND at -0.23%, IGIB at -0.48% and TLT at -5.4%. IEF's -0.84% sits in the middle of the group. SGOV, the cash-like fund, made no trades and returned 0%. The median CAGR for the rule across the bond group was -0.23%, and across all 59 funds it was 2.98%. IEF ranked 44th of 59 for this rule.
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.
How the rule meets a bond fund
Entries are decided at the open. With no position and RSI(14) under 30, the strategy buys using 98% of the sleeve. The exit is another check at the open: if invested and RSI(14) is above 70, sell everything. Nothing caps the loss on a trade, and the strategy page names that risk: during a lasting downtrend RSI can sit oversold for weeks while the position keeps falling.
That is the situation in the 2021 to 2022 trade. The fund fell from a price near 98.55 at entry to 90.19 at exit, and the rule held the whole way. The strategy is written for assets that trend up and overshoot on the way, and IEF in this window did not trend up.
Among the 12 rules on IEF, the RSI mean reversion ranked 7th at -0.84%. The RSI(2) snapback led at 1.84% with a 12.86% drawdown, and the SMA 10/50 trend was second at 1.33% with a 5.67% drawdown, the shallowest of any rule that traded. The dip buyer and momentum breakout both show 0% because they never entered. The golden cross returned -0.29% and the EMA 12/26 trend -0.39%. Behind this rule came 3-month momentum at -1.35%, the 200-day regime filter at -1.53%, the weekly profit target at -1.54%, trend plus trailing stop at -2.13% and the monthly cycle at -2.69%.
Eight of the 12 rules had a negative CAGR on IEF, and the two that stayed in cash show how much the window punished any exposure. A rule that never bought beat most of the rules that did. The result for this rule is a smaller loss than holding, which is a modest finding and not evidence of an edge.
The IEF page puts all 12 rules side by side, and the strategy page shows the rule across every fund. The limits here are 15 trades, one window, and a period in which intermediate Treasuries lost value. A different rate period would give different numbers.
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 IEF?
Over 2021-01-04 to 2026-10-02, RSI mean reversion on IEF returned −0.8% annualized vs −2.3% for buy-and-hold: it beat buy-and-hold by 1.5% per year, with a maximum drawdown 8.1 points shallower than holding (13.6% vs 21.8%).
How many trades did it make?
15 completed round trips over 5.7 years (31 fills), with 67% 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 RSI mean reversion beat buy-and-hold on IEF?
Yes, with a loss on both. The rule returned a CAGR of -0.84% and ended at $9,529. Buy-and-hold returned -2.29% and ended at $8,756. The rule's maximum drawdown was 13.64% against 21.77%.
How many trades did the rule make?
It made 15 closed round trips and 31 fills, with one position still open from 2026-07-24. Ten of the closed trips made money, a win rate of 67%. The rule was invested on 48.3% of trading days.
Why is the profit factor below 1 with a 67% win rate?
The average winner made 2.08% and the average loser lost 4.32%. The worst three trades lost 8.48%, 5.18% and 4.61% and lasted 239, 78 and 169 days, which outweighed the many small wins.
Which RSI thresholds worked best?
Selling above 65 instead of 70 gave a CAGR of -0.13% with a drawdown of 8.42%. Buying below 25 gave -1.34%, buying below 35 gave -1.17% and selling above 75 gave -1.51%. All four variants lost money.
Do trading costs change the result?
A little. At 5 basis points per fill the final value was $9,377 and at 10 basis points it was $9,243, against $9,529 with no costs.
Is the rule still holding a position?
Yes. A position entered on 2026-07-24 at an adjusted $92.00 was open at the end of the data and marked at -3.2%.
Which strategy did best on IEF?
RSI(2) snapback returned a CAGR of 1.84% with a 12.86% drawdown, and SMA 10/50 trend returned 1.33% with a 5.67% drawdown. This rule ranked 7th of 12.
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.