IEF trading strategies, backtested
iShares 7-10 Year Treasury Bond ETF: intermediate Treasuries, a common 60/40 diversifier. Every DeployQuant template run on IEF over 5.7 years of minute data, same engine, same window, sorted by return.
IEF holds Treasury bonds with 7 to 10 years to maturity. Over the 5.7 years from 2021-01-04 to 2026-10-02 it lost 2.29% a year in the test and $10,000 became $8,756. The fund fell 21.77% from its first day to 2023-10-19 and had not recovered by 2026-10-02. In calendar terms 2022 was a loss of 15.16%, 2023 and 2025 were gains of 3.64% and 8.03%, and 2021, 2024 and the part of 2026 in the data were small losses.
Twelve templates were run on IEF. Eleven beat buy-and-hold on CAGR, eleven had a shallower maximum drawdown, and two finished with a positive CAGR. RSI(2) snapback returned 1.84% a year and SMA 10/50 trend returned 1.33%. Two templates, the drawdown dip buyer and momentum breakout, never made a trade and finished at $10,000. The only template that fell behind holding was monthly cycle at minus 2.69%.
A bond fund with one large down year is a good test of a rule that can go to cash. Every template that avoided part of 2022 was ahead. Most of those wins are small in absolute terms, and cash earns nothing in this test, so none of the results include interest. The window is one stretch with a single bond bear market in it and the headline numbers carry no fees.
| Strategy | CAGR | max DD | Sharpe | trades | win rate | final value |
|---|---|---|---|---|---|---|
| RSI(2) Dip Snapback | 1.8% | −12.9% | 0.39 | 172 | 62% (+1 open) | $11,106 |
| SMA 10/50 Trend | 1.3% | −5.7% | 0.31 | 14 | 43% | $10,788 |
| Drawdown Dip Buyer + 8% Target | 0.0% | −0.0% | 0.00 | 0 | – | $10,000 |
| 20-Day Momentum + Trailing Stop | 0.0% | −0.0% | 0.00 | 0 | – | $10,000 |
| Golden Cross (SMA 50/200) | −0.3% | −8.5% | -0.05 | 4 | 50% | $9,833 |
| EMA 12/26 Trend | −0.4% | −10.6% | -0.06 | 26 | 19% | $9,778 |
| RSI(14) Mean Reversion | −0.8% | −13.6% | -0.13 | 15 | 67% (+1 open) | $9,529 |
| 3-Month Momentum Switch | −1.4% | −9.1% | -0.52 | 4 | 25% | $9,252 |
| 200-Day SMA Regime Filter | −1.5% | −11.5% | -0.33 | 30 | 20% | $9,152 |
| Weekly Entry + 7% Target | −1.5% | −18.2% | -0.20 | 68 | 7% (+1 open) | $9,146 |
| SMA-200 Trend + 15% Trailing Stop | −2.1% | −21.5% | -0.32 | 1 | 0% (+1 open) | $8,838 |
| First-to-Last Day of Month | −2.7% | −24.7% | -0.36 | 69 | 46% (+1 open) | $8,551 |
| Buy & hold IEF | −2.3% | −21.8% | -0.29 | – | – | $8,756 |
Each template against a falling bond fund
Holding lost 3.3% in 2021, lost 14.8% in 2022, gained 3.5% in 2023, lost 0.6% in 2024, gained 7.8% in 2025 and lost 4.5% in 2026 so far. The Sharpe ratio was minus 0.29. The year that decides the ranking is 2022, and the gaps to holding in that year are large: RSI(2) snapback was 6.5 points ahead, SMA 10/50 11.7 points ahead, golden cross 14.8 points ahead and the three templates with no trades 14.8 points ahead.
RSI(2) snapback made 172 round trips with a 62% win rate and a profit factor of 1.27. The average win was 0.55% and the average loss was 0.72%, so the edge was the hit rate. It lost 8.3% in 2022, which is the worst year in its table, against 14.8% for the fund. It gained 8.3% in 2023, 2.7% in 2024 and 7.5% in 2025. Its drawdown of 12.86% ran from 2021-12-21 to 2022-10-19 and took until 2024-07-29 to recover. The largest single loss was a 30-day trade from 2022-08-30 to 2022-09-29 that lost 5.12%,. The template ended at $11,106, the best result on the page, with an open position at the end that was down 1.01%.
SMA 10/50 trend made 14 round trips with a 43% win rate, a profit factor of 1.94 and a drawdown of 5.67%. It lost 3.1% in 2022. The average win was 2.7% and the average loss was 1.02%. Its best trade, from 2024-05-17 to 2024-10-10, held 146 days and gained 4.26%. It ended at $10,788. It was invested 46.7% of the time and beat holding in 2021, 2022, 2023, 2024 and 2026, and trailed in 2025.
The two templates that never traded are worth a sentence each. The dip buyer needs a 20-day drawdown worse than 10%, and IEF never had one: the fund fell 10% or more from a 20-day high on 0 occasions in the data. Momentum breakout needs a 20-day gain above 10%, and IEF never produced one either. Both finished at $10,000 with a CAGR of 0%, which beat the fund's minus 2.29% because the fund lost money and they held cash. Those two results measure nothing about the rules and a good deal about how quiet this fund is.
Golden cross made 4 round trips and returned minus 0.29%. Its best trade, from 2025-04-01 to 2026-05-22, held 416 days and gained 2.77%, and its worst, from 2023-04-25 to 2023-08-07, lost 3.77%. Its profit factor was 0.62. It held no position in 2022. EMA 12/26 trend returned minus 0.39% with 26 round trips and a win rate of 19%. Its average win was 3.35% and its average loss was 0.89%, so its winners were few and large, and its best, from 2024-05-14 to 2024-10-08, gained 5.01%. It had no winning trades in 2022, 2023 or 2026.
RSI(14) mean reversion returned minus 0.84% with a 67% win rate and a profit factor of 0.92. Its average win was 2.08% and its average loss was 4.32%. The worst trade held 239 days from 2021-09-30 to 2022-05-27 and lost 8.48%, a large loss for a Treasury fund, and the template's drawdown of 13.64% ran from 2021-02-12 to 2022-10-20 with no recovery by the end. The 3-month momentum switch made 4 round trips and won one, returning minus 1.35%. The 200-day filter made 30 round trips with a 20% win rate and returned minus 1.53%. Its 13 round trips in 2023 produced 2 wins.
Weekly 7% target made 68 round trips and won 7% of them It was in the market 90.7% of the time, and its average win of 7.19% against an average loss of 0.69% was not enough to reach breakeven on such a low win rate. Trend plus trailing stop made one round trip, entered on 2021-11-08 and stopped on 2022-06-13 for a loss of 14.07%, then bought again on 2023-01-13 and held through the end of the data with a gain of 2.43%. Its exposure was 74.9%, and it finished 0.16 points ahead of holding.
Monthly cycle returned minus 2.69%, 0.4 points behind holding, with a 24.73% drawdown. It held 95.2% of the time, so it copied the fund and paid for the boundary days.
The other bond funds in the data show a similar pattern. AGG held at minus 0.78% and RSI(2) snapback made 1.57%. BND held at minus 0.8% and RSI(2) made 1.41%. TLT, with much longer maturities, held at minus 8.23% and RSI(2) made 0.96%. IEI held at minus 0.36% and trend plus trailing stop made 1.43%. IGIB, a corporate bond fund, held at 0.21% and EMA 12/26 trend made 2.35%. SGOV, the 0 to 3 month Treasury fund, held at 3.22% and golden cross matched it. RSI(2) snapback was the best template on three of the six.
How each strategy traded IEF
| Strategy | Time in market | Avg hold (days) | Best trade | Worst trade | Profit factor | With 10 bps slippage |
|---|---|---|---|---|---|---|
| RSI(2) snapback | 45.6% | 5 | 2.6% | −5.1% | 1.27 | −4.0% |
| SMA 10/50 trend | 46.7% | 70 | 4.3% | −2.0% | 1.94 | 0.8% |
| dip buyer | 0.0% | – | – | – | – | 0.0% |
| momentum breakout | 0.0% | – | – | – | – | 0.0% |
| golden cross | 43.7% | 229 | 2.8% | −3.8% | 0.62 | −0.4% |
| EMA 12/26 trend | 48.5% | 39 | 5.0% | −1.9% | 0.87 | −1.3% |
| RSI mean reversion | 48.3% | 63 | 4.5% | −8.5% | 0.92 | −1.4% |
| 3-month momentum | 13.4% | 72 | 0.9% | −3.3% | 0.10 | −1.5% |
| 200-day regime filter | 45.7% | 32 | 3.6% | −2.6% | 0.49 | −2.5% |
| weekly 7% target | 90.7% | 27 | 7.5% | −2.4% | 0.78 | −3.8% |
| trend + trailing stop | 74.9% | 217 | −14.1% | −14.1% | – | −2.2% |
| monthly cycle | 95.2% | 28 | 4.4% | −4.7% | 0.73 | −5.0% |
Trade counts, exposure and costs
Exposure ranged from 0% for the two templates that never traded to 95.2% for monthly cycle. The rest: weekly 7% target 90.7%, trend plus trailing stop 74.9%, EMA 12/26 48.5%, RSI(14) 48.3%, SMA 10/50 46.7%, the 200-day filter 45.7%, RSI(2) 45.6%, golden cross 43.7% and 3-month momentum 13.4%. The 3-month momentum switch was in cash most of the time and still lost 1.35% a year, because its four trades lost on average 2.91% when they lost.
Median holding periods run from 3 days for weekly 7% target and 5 for RSI(2) to 363 days for golden cross. Average win and average loss are tiny on this fund: RSI(2) 0.55% and 0.72%, the 200-day filter 1.56% and 0.76%. With edges of that size, costs matter more than they do on an equity fund.
The cost runs show it. RSI(2) snapback fell from 1.84% with no costs to minus 1.1% at 5 basis points per trade and minus 3.96% at 10, which puts it behind holding at 10 basis points, and its drawdown rose from 12.86% to 20.77%. Monthly cycle fell to minus 3.84% and minus 4.96%. Weekly 7% target fell to minus 2.63% and minus 3.75%. EMA 12/26 fell to minus 0.83% and minus 1.26%. SMA 10/50 held up better at 1.09% and 0.85% because it makes 14 trades. Golden cross went to minus 0.36% and minus 0.43%, and the single-trade trend template barely moved. With 10 basis points, SMA 10/50 is the only template with a positive CAGR.
IEF is liquid, with $675,908,601 of average daily dollar volume and a median minute volume of 7,536 shares. A cost of 10 basis points is a large share of a 0.36% average move, which is why the cost runs separate the templates by turnover.
What the individual trades did on IEF
Trade by trade, the pattern on IEF is that rules lost in 2021 to 2023 and won in 2024 and 2025. The EMA 12/26 rule won 1 of 6 round trips in 2021, none of 5 in 2022 and none of 2 in 2023. It then won 2 of 5 in 2024 and 2 of 3 in 2025, with a best trade of 5.01% over 147 days from 2024-05-14 at 84.6. In 2026 it lost on all 5. Its median trade lost 0.63% and its profit factor was 0.87. The SMA 10/50 rule found nearly the same winners: 4.26% over 146 days from 2024-05-17 and 4.06% over 185 days from 2025-06-13. It lost 1.98% over 34 days from 2021-12-03, and went 0 for 3 in 2026.
The 200-day regime filter shows the whipsaw cost. It made 30 round trips and won 20%, with 13 trips in 2023 alone and only 2 winners. On 2023-03-14 it bought at 86.29 and sold the next day at 87.18 for 1.03%, then bought again on 2023-03-16 and lost 2.58% over 71 days. Its two longest winners were 3.62% over 304 days from 2025-05-27 and 2.88% over 160 days from 2024-05-31. The median trade lost 0.5% and the median hold was 6 days. The fund crossed its 200-day average 60 times and spent 53.01% of sessions above it, which means no direction was held for long.
The golden cross made 4 trades with a median return of 0.11%. It lost 3.77% over 104 days from 2023-04-25 and 0.73% over 363 days from 2024-01-17, then gained 2.77% over 416 days from 2025-04-01. A 34-day trade from 2021-10-19 returned 0.11%. The RSI mean reversion rule had a bad start and a better finish. Its first trade lost 8.48% over 239 days from 2021-09-30 at 98.55, and a second lost 5.18% over 78 days from 2022-08-25. After that it won 4.53% from 2022-06-13, 4.09% from 2022-12-29 and 2.76% from 2024-04-16, and won all 3 trades in 2025 and both in 2026. The average loss of 4.32% against an average win of 2.08% explains a profit factor of 0.92 despite a 67% win rate. The open position from 2026-07-24 at 92 was down 3.2% at the end.
The 3-month momentum rule had 4 trades and only one winner, 0.87% over 104 days from 2024-07-18. It lost 3.32% from 2023-01-13, 2.66% from 2023-12-21 and 2.75% from 2025-04-04. The weekly 7% target made 68 round trips and won 7%. It lost on all 6 trades in 2021 and all 15 in 2022, then won 2 of 13 in 2023. Its best three trades were 7.46% over 81 days from 2025-01-13, 7.29% over 95 days from 2024-04-29 and 7.19% over 276 days from 2025-05-27, and a 3-day loss of 2.42% on 2024-08-05 shows a rule built for large moves taking a small loss each time.
The monthly cycle won 3 of 12 in 2022 and 8 and 9 of 12 in 2024 and 2025. Its best month was November 2023 at 4.41%, and its worst was March 2022 at negative 4.65%. In 2026 it won only 2 of 9 trades. The trend plus trailing stop made one completed trade, a loss of 14.07% over 217 days from 2021-11-08 at 99.11 to 2022-06-13 at 85.16, and re-entered on 2023-01-13 with a gain of 2.43% still open.
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 |
Calendar years
| Year | Return |
|---|---|
| 2021 | −3.4% |
| 2022 | −15.2% |
| 2023 | 3.6% |
| 2024 | −0.6% |
| 2025 | 8.0% |
| 2026 (part) | −4.6% |
Biggest single days
| Best day | Move |
|---|---|
| 2022-09-28 | 2.3% |
| 2022-11-10 | 2.2% |
| 2023-03-10 | 1.8% |
| 2024-08-02 | 1.5% |
| 2023-11-14 | 1.5% |
| Worst day | Move |
|---|---|
| 2022-06-13 | −1.8% |
| 2022-09-26 | −1.7% |
| 2022-03-02 | −1.5% |
| 2022-09-22 | −1.5% |
| 2022-08-05 | −1.4% |
Average return by calendar month
| Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0.4% | −0.5% | −0.7% | −0.8% | 0.0% | 0.3% | 0.9% | −0.3% | −1.8% | −1.3% | 2.2% | −0.2% |
Most and least correlated funds
| Most correlated | Least correlated | ||
|---|---|---|---|
| BND | 0.98 | TBF | -0.91 |
| AGG | 0.97 | KMLM | -0.44 |
| IEI | 0.97 | RINF | -0.37 |
| UST | 0.94 | CTA | -0.35 |
| IGIB | 0.92 | USDU | -0.35 |
How IEF behaved
IEF's annualized volatility was 7.39%. The average up day was 0.36% and the average down day was minus 0.36%, with 48.51% of days up and an average intraday range of 0.42%. Moves are small and the direction is close to a coin flip, which fits a lag-1 autocorrelation of minus 0.01.
The fund's correlation to SPY was 0.09 and to QQQ 0.1, against 0.91 to TLT. It was most correlated with BND at 0.98, AGG at 0.97, IEI at 0.97, UST at 0.94 and IGIB at 0.92, and least correlated with TBF at minus 0.91. KMLM at minus 0.44 and RINF at minus 0.37 were the next least. The 15.16% loss in 2022 is the largest calendar-year loss in the data.
The fund was above its 200-day average on 53.01% of sessions and crossed it 60 times, which fits the 30 round trips and 20% win rate of the 200-day filter. The signal flipped often on a fund that spent long stretches near its average.
The RSI statistics are weak. RSI(14) fell under 30 on 64 sessions, with a median forward 5-day return of minus 0.09% against minus 0.04% for the baseline, and a forward 20-day return of minus 1% against minus 0.02%. A fund below 30 on RSI(14) kept falling over the next month, which fits the 8.48% loss on the long RSI(14) trade in 2022. RSI(2) fell under 10 on 186 sessions, with forward 5-day returns of 0.05% and 20-day returns of minus 0.21%. The 5-day number is slightly above baseline, which is what the RSI(2) template used.
Of the fund's log return, 81.25% came from overnight moves and 18.75% intraday, though both were negative in total: minus 11.05% overnight and minus 2.55% intraday. The average overnight gap was 0.26%.
The fund's own series shows a total return of minus 12.95% and a CAGR of minus 2.39%, a little different from the test's buy-and-hold figures because the series and the test sleeve are measured separately. The calendar years were minus 3.35% in 2021, minus 15.16% in 2022, 3.64% in 2023, minus 0.63% in 2024, 8.03% in 2025 and minus 4.58% in 2026 so far. Three of six years were losses of 3% or more, which gave a rule that sits out of the market room to win. The 2025 gain of 8.03% is the year the templates fell behind: golden cross trailed by 5.5 points, the 3-month momentum switch by 10.5 and the two templates that never traded by 7.8.
The best day was 2022-09-28 at 2.26%, and the next was 2022-11-10 at 2.24%. The worst day was 2022-06-13 at minus 1.77%. Every one of the five best and five worst days came in 2022, 2023 or 2024, and the largest are in 2022. The fund never fell 10% or more from a 20-day high, which is why two templates did not trade. Its drawdown of 22.23% from 2021-01-04 to 2023-10-19 was spread over 1,018 days, a slow decline and not a crash.
By month, November averaged 2.24% and July 0.88%, against minus 1.79% for September, minus 1.31% for October and minus 0.76% for April. With five or six observations per month, these averages describe six years and not a seasonal rule. Holding's best month was November 2023 at 4.47% and its worst was September 2022 at minus 4.56%.
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
What was the best strategy for IEF?
Of the 12 templates tested on IEF over 2021-01-04 to 2026-10-02, the strongest by CAGR was RSI(2) snapback at 1.8% (max drawdown 12.9%), versus −2.3% for buy-and-hold. The best result in hindsight is not a forecast. Check drawdowns and trade counts before drawing conclusions.
Did any strategy beat buying and holding IEF?
11 of 12 templates beat IEF buy-and-hold (−2.3% CAGR) on this window; 11 of 12 had a shallower maximum drawdown than holding (21.8%).
What was the best strategy for IEF from 2021 to 2026?
RSI(2) snapback returned 1.84% a year with a 12.86% maximum drawdown and ended at $11,106. Buy-and-hold lost 2.29% a year and ended at $8,756. Only two of the 12 templates had a positive CAGR.
Did any strategy beat buy-and-hold on IEF?
Eleven of 12 did on CAGR. Monthly cycle was the only one behind, at minus 2.69% against minus 2.29%. Two of the 11 were templates that never traded and stayed in cash.
Why did two strategies make no trades on IEF?
The dip buyer needs a 10% fall from a 20-day high, and momentum breakout needs a 10% gain over 20 days. IEF never moved that far in either direction in the data, so both finished at $10,000.
How much did IEF lose in 2022?
The calendar year was a loss of 15.16%, and the test's buy-and-hold lost 14.8%. The deepest drawdown ran 22.23% in the fund's own series, from 2021-01-04 to 2023-10-19. It had not recovered by 2026-10-02.
Do trading costs matter for bond ETF strategies on IEF?
Yes. RSI(2) snapback fell from 1.84% to minus 3.96% at 10 basis points per trade, and its drawdown grew from 12.86% to 20.77%. The average winning trade was only 0.55%, so costs take a large share.
Is IEF correlated with stocks?
The correlation to SPY was 0.09 and to QQQ 0.1 over the window. Its highest correlations were with other bond funds, BND at 0.98 and AGG at 0.97, and the lowest was TBF at minus 0.91.
Other bond etfs
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.