20-Day Momentum + Trailing Stop 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 momentum breakout template waits for a fund to rise by more than 10% in 20 sessions, buys, and exits through a 10% trailing stop. On the iShares 7-10 Year Treasury Bond ETF it never bought. From 2021-01-04 to 2026-10-02 the account made 0 fills, spent 0% of the time invested, and finished at the $10,000 it started with. CAGR, drawdown and Sharpe ratio are all 0.
The comparison with holding looks favourable only because the fund fell. $10,000 left in IEF from the first open ended at $8,755.84, a total return of -12.44% and a CAGR of -2.29%, with a 21.77% drawdown that started on 2021-01-04, bottomed on 2023-10-19 and had not recovered by the end of the data. Sitting in cash was ahead of that by 2.29 points of CAGR, by $1,244.16 of ending value and by 21.77 points of drawdown.
A zero here is a statement about the entry rule. The template was written for assets where trends extend, and its own description names semiconductor and leveraged tech funds. A 20-day gain of more than 10% is a large move for a fund whose annualized volatility was 7.39%, whose average daily range was 0.42% and whose best single day was 2.26%. No stretch of 20 sessions in this window produced it, so the rule waited through all 1,444 sessions.
The template ranks 4th of 12 on IEF and 30th of 59 funds for itself, tied at 0% with the dip buyer. The median CAGR of the template is 0% across the bond category and 0% across all 59 funds. A reader who wants an opinion on the breakout rule should look at the funds where it traded. The evidence here is a single fund, one run, one window of 5.74 years, and a headline result with no fees or slippage.
Year by year
| Year | momentum breakout | buy & hold |
|---|---|---|
| 2021 | 0.0% | −3.3% |
| 2022 | 0.0% | −14.8% |
| 2023 | 0.0% | 3.5% |
| 2024 | 0.0% | −0.6% |
| 2025 | 0.0% | 7.8% |
| 2026 | 0.0% | −4.5% |
Year by year
The strategy returned 0.0% in each of the six years. Buy-and-hold returned -3.3% in 2021, -14.8% in 2022, 3.5% in 2023, -0.6% in 2024, 7.8% in 2025 and -4.5% in 2026, which runs only to the end of the data. The fund's own calendar returns were close to those: -3.35%, -15.16%, 3.64%, -0.63%, 8.03% and -4.58%.
Cash was ahead in four years: 2021 by 3.3 points, 2022 by 14.8, 2024 by 0.6 and 2026 by 4.5. It was behind in 2023 by 3.5 points and in 2025 by 7.8. The year that dominates the comparison is 2022, when intermediate Treasuries fell 15.16% across the calendar year. That year also holds IEF's five worst days: -1.77% on 2022-06-13, -1.68% on 2022-09-26, -1.52% on 2022-03-02, -1.5% on 2022-09-22 and -1.45% on 2022-08-05. The best days cluster there too, at 2.26% on 2022-09-28 and 2.24% on 2022-11-10.
The strategy's 2022 lead came from having no position, and the rule did not forecast anything. Even the largest up days of 2022 were isolated sessions of about 2%, and a 10% gain over 20 sessions needs many such days in sequence. In 2025, when the fund returned 8.03% over the calendar year, the gain arrived gradually and also never reached the trigger inside any 20-session window.
The two years that favoured holding are 2023 and 2025, and neither produced a breakout. A trend-following buyer of strength would have needed the fund to move the way a technology fund moves, in jumps.
Month by month
| Year | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2021 | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% |
| 2022 | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% |
| 2023 | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% |
| 2024 | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% |
| 2025 | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% |
| 2026 | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | – | – |
Month by month
Each month in the grid is 0.0%, since the account held nothing. The months for 2026 stop at September because the data ends on 2026-10-02.
The fund's own monthly record helps place the zeros. Buy-and-hold had a best month of 4.47% in 2023-11 and a worst month of -4.56% in 2022-09. No month in the window reached 10%. In calendar terms, November averaged 2.24% over 5 observations and July 0.88% over 6. The weak months were September at -1.79%, October at -1.31%, April at -0.76% and March at -0.67%, each from 5 or 6 observations. Averages from so few years describe this window and nothing more.
The best single month was smaller than the entry threshold, and the trigger applies to a rolling 20-session window and not a calendar month, so a rise that spans two months could in principle qualify. It still did not.
The trade list
The list is empty. Nothing was bought, so the page has no closed round trips, no open position, no best or worst trade, no median return, no hold time and no win rate. Average win, average loss and profit factor are blank for the same reason.
The data does say what an entry would have looked like. After a 20-day return above 10%, the rule would have bought at the next open with 98% of the sleeve and placed a stop 10% under the highest close. A winner would run until a close fell 10% below the high-water mark. A 10% stop is wide for IEF, whose average daily range is 0.42%, so on this fund it would sit far from the price on a normal day.
Because nothing triggered, the test shows nothing about whether a trailing stop adds value on a Treasury fund. The only fact it establishes is the absence of the entry signal for 1,444 sessions.
Drawdowns
The strategy's drawdown table is empty. Equity was $10,000 on every day of the window, so the maximum drawdown is 0.0%.
Buy-and-hold had one drawdown of 21.77%, from the peak on 2021-01-04 to the low on 2023-10-19, which took 1,018 days. It had no recovery by 2026-10-02. The fund's own series shows 22.23% over the same dates, with 1,443 sessions as the longest drawdown, which is the entire window less one session. An investor who bought IEF on the first day of 2021 was still below that price at the end of the data.
That makes the 21.77-point advantage in the headline sentence an artefact of doing nothing in a falling fund. A strategy that never trades has the shallowest possible drawdown. The risk of the template is in the position it takes after a burst, which can be 10% below its entry when the trail is hit, and IEF produced none to measure. The TLT run of the same template shows the closest evidence in the category: two trades, a net CAGR of -1.2% and a drawdown of 10.32%.
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.0% | −0.0% | $10,000 | 0.00 |
| 5 basis points | 0.0% | −0.0% | $10,000 | 0.00 |
| 10 basis points | 0.0% | −0.0% | $10,000 | 0.00 |
Trading costs
Slippage at 5 and 10 basis points per fill has nothing to charge with 0 fills. CAGR stays at 0.0%, drawdown at 0.0% and final value at $10,000 in both runs, the same as the headline.
Changing the parameters
| Version | CAGR | Max drawdown | Round trips | Win rate | Final value |
|---|---|---|---|---|---|
| Published rules | 0.0% | −0.0% | 0 | – | $10,000 |
| 5% trailing stop | 0.0% | −0.0% | 0 | – | $10,000 |
| 15% trailing stop | 0.0% | −0.0% | 0 | – | $10,000 |
| 20% return entry | 0.0% | −0.0% | 0 | – | $10,000 |
Parameter variants
The variants were a tighter 5% trailing stop, a wider 15% trailing stop and a higher entry threshold of a 20% return. Each had 0 trades, a CAGR of 0.0%, a drawdown of 0.0% and a final value of $10,000.
The variants could not have produced anything else. The two trailing-stop versions change only the exit, and the exit runs only after an entry. The 20% entry is stricter than the published 10%, so a rule that never entered at 10% cannot enter at 20%. None of the three variants lowers the entry, which is the one change that could have created a trade. The table therefore confirms the zero without testing the setting that matters, and a lower entry threshold such as 5% was not run.
The same limit applies to reading the result as robustness. A parameter table where every row is identical normally signals a stable strategy. Here it signals that nothing fired, and the stability is an absence of trades.
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 returned -12.95% in total over 1,444 sessions, a CAGR of -2.39%, with annualized volatility of 7.39% and a maximum drawdown of 22.23%. It rose on 48.51% of days. Its average up day was 0.36%, average down day -0.36%, average daily range 0.42% and average overnight gap 0.26%. Calendar returns ran from -15.16% in 2022 to 8.03% in 2025.
Its price tracks the rest of the bond market and little else. The correlation to SPY was 0.09 and to QQQ 0.1, with betas of 0.04 and 0.03. The correlation to TLT was 0.91 with a beta of 0.44. Correlation was highest with BND at 0.98, then AGG and IEI at 0.97, UST at 0.94 and IGIB at 0.92. The least related were TBF at -0.91, KMLM at -0.44, RINF at -0.37, CTA at -0.35 and USDU at -0.35.
IEF was over its 200-day average on 53.01% of sessions and crossed it 60 times, a lot of crossings for a fund that returned little. A fund that sits close to its long average for years produces many small crosses and few large trends, which is the setting where a momentum entry rarely fires. RSI(14) was below 30 on 64 sessions, with a median 5-day move of -0.09% and a median 20-day move of -1%. RSI(2) was below 10 on 186 sessions, with medians of 0.05% over 5 days and -0.21% over 20. The unconditional medians were -0.04% and -0.02%. Oversold readings did not lead to a bounce that beat the baseline.
The lag-1 autocorrelation of daily returns was -0.01, so one day's move told almost nothing about the next. The overnight and intraday split uses adjusted prices: overnight moves summed to a log return of -11.05% and intraday moves to -2.55%.
The rules
Buy after a +10% four-week burst and let a 10% trailing stop manage the exit.
- WHEN the market opens · IF not invested AND the 20-day return > +10% · THEN buy with 98% of the sleeve
- WHILE invested · a managed trailing stop follows 10% below the position's high-water mark
Momentum entry, trailing-stop exit. A +10% gain over 20 sessions marks a burst of momentum. The template buys the strength and exits on a 10% trailing stop that ratchets up beneath the highest close and never moves down. There is no profit target, so winners run until the trail is hit.
Good for: high-momentum assets where trends extend, such as semiconductor and leveraged tech ETFs.
Watch out: buying strength means buying high; when a burst immediately reverses, the trail exits about 10% below the entry.
Why a momentum trigger stays quiet on an intermediate Treasury fund
The entry reads: at the open, with the account flat and a 20-day return over +10%, buy using 98% of the sleeve. The exit is a managed trailing stop set 10% below the position's high-water mark, and it only ever moves up. No profit target exists. A winning position stays open until the trail triggers. The template's caveat describes the cost of this design: buying strength means buying high, and a burst that reverses at once is exited about 10% below the entry.
The exit never mattered on IEF, because the entry never fired. That leaves the entry threshold as the only live parameter, and it is set for volatile assets. IEF holds Treasuries with maturities of 7 to 10 years, and the profile shows what that means for daily moves: it rose on 48.51% of sessions by 0.36% on average and fell by 0.36% on average on the others. A run of up days large enough to add 10% inside four weeks did not occur.
The fall side was just as quiet. The count of falls of 10% or more from a 20-day high was 0 on IEF, the same count the dip buyer's trigger would use, so neither a sharp rally nor a sharp drop appeared in the window. The decline from 2021-01-04 to 2023-10-19, 22.23% on the fund's own series, took 1,018 days to reach its low, and a 20-session window never saw much of it at once.
On the other bond funds the same template shows the same result. AGG, BND, IEI, IGIB and SGOV each have 0.0% CAGR and 0 round trips. TLT is the exception, with a CAGR of -1.2%, a drawdown of 10.32% and 2 round trips. A longer-duration Treasury fund moves enough for a burst to appear, and the two trades there lost money on net. The pages are AGG, BND, IEI, IGIB, SGOV and TLT.
What traded on IEF instead
Of the 12 templates run on IEF, the RSI(2) snapback posted the top CAGR, 1.84%, at a 12.86% drawdown. The SMA 10/50 trend followed at 1.33% with a 5.67% drawdown. The dip buyer and the momentum breakout both sit at 0% with no drawdown, which is what puts the breakout fourth.
Eight rules traded and lost money on IEF. In order of CAGR they were the golden cross (-0.29%, drawdown 8.52%), the EMA 12/26 trend (-0.39%, 10.63%), RSI mean reversion (-0.84%, 13.64%) and the 3-month momentum (-1.35%, 9.07%). The rest were the 200-day regime filter (-1.53%, 11.5%), the weekly 7% target (-1.54%, 18.17%), the trend plus trailing stop (-2.13%, 21.47%) and the monthly cycle (-2.69%, 24.73%).
In a window where IEF fell, doing nothing beat most of the rules that acted. The limit of that reading is that the result depends on a fund and a window in which nothing happened to trigger the rule. The ETF hub for IEF lists all 12 results together.
What this result does and does not show
The result shows that a +10% twenty-day entry does not occur on IEF in this window, and that cash beat a falling fund. It shows nothing about how the trailing stop behaves, how large a winner runs, or what a burst on a bond fund looks like afterward, because no burst arrived. Comparing the template with the others on the same fund is fair on one point only: a rule that does not trade matches the 0% line, and every rule that did trade can be judged against it.
Intermediate Treasuries had one large drawdown and one weak calendar year, 2022, in this window. A window with a faster rate move inside four weeks would have given the rule something to act on. Decisions are daily, fills use minute bars, and no margin is used. The headline run carries no fees or slippage. The 5 and 10 basis point cost runs above change nothing because no order was sent. Everything is hypothetical, and none of it forecasts a later period.
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 momentum breakout beat buy-and-hold on IEF?
Over 2021-01-04 to 2026-10-02, momentum breakout on IEF returned 0.0% annualized vs −2.3% for buy-and-hold: it beat buy-and-hold by 2.3% per year, with a maximum drawdown 21.8 points shallower than holding (0.0% vs 21.8%).
How many trades did it make?
0 completed round trips over 5.7 years (0 fills).
How does the trailing stop work in the backtest?
The stop sits 10% below the highest price since entry and only ratchets up. When a bar trades through it, the position sells at the stop, or at the open if the price gaps below it. Trailing-stop exits can be backtested now; deploying them live is not available yet.
Did the momentum breakout strategy trade IEF?
No. From 2021-01-04 to 2026-10-02 it made 0 fills and 0 round trips. A rise of more than 10% in 20 sessions is required to enter, and IEF never delivered one in this window.
Why did the strategy finish at exactly $10,000?
It held cash for the whole window, so equity never changed. Buy-and-hold on IEF ended at $8,755.84, which is why the strategy's CAGR of 0.0% beats the fund's -2.29%.
Are the parameter variants useful here?
Not much. The 5% and 15% trailing stops and the 20% entry all returned 0 trades. The two stop variants change only the exit, and the 20% entry is stricter than the published rule, so none of them could have created a trade.
Did the strategy trade on other bond funds?
On TLT it made 2 round trips and returned a CAGR of -1.2% with a 10.32% drawdown. On AGG, BND, IEI, IGIB and SGOV it made no trades, like IEF.
How volatile is IEF compared with what the rule needs?
IEF's annualized volatility was 7.39% and its best day was 2.26%, on 2022-09-28. The rule needs a gain of more than 10% over 20 sessions, which the fund did not deliver in 1,444 sessions.
How does the momentum breakout rank on IEF?
It ranks 4th of 12 templates on IEF at 0%, tied with the dip buyer. The RSI(2) snapback ranks first at 1.84% and the monthly cycle last at -2.69%.
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.