3-Month Momentum Switch on AGG
iShares Core U.S. Aggregate Bond ETF: the broad US investment-grade bond market in one fund. Backtest 2021-01-04 to 2026-10-02, $10,000 starting capital, computed by the same engine that runs live DeployQuant strategies.
Run on AGG, the iShares Core U.S. Aggregate Bond ETF, the 3-month momentum switch (buy after a 63-day gain above 5%, sell when that gain drops under 0%) ended with $9,582 from a $10,000 start between 2021-01-04 and 2026-10-02. The CAGR was -0.74%, the total return -4.18%, the Sharpe ratio -0.4 and the maximum drawdown 5.72%. The rule made 3 round trips and none of them won. The best trade lost 0.09%, the worst lost 2.66%, and the average loss was 1.44%. Exposure was 10.6%, so the sleeve sat in cash on about nine sessions out of ten.
Holding AGG from day one gave $9,559, a CAGR of -0.78% and a total return of -4.41%. The two lines ended almost on top of each other: the rule's CAGR was higher by 0.04 points and its ending equity by $23. The difference that matters is the path. Holding the fund meant a 17.57% drawdown that opened on day one and never closed, while the switch topped out at 5.72%, shallower by 11.85 points. Calendar years split evenly: ahead in 2021, 2022 and 2026, behind in 2023, 2024 and 2025.
The result is a bond fund that fell in a rising-rate period and a rule that mostly stayed away from it. AGG lost 13.02% in calendar 2022 and the rule held no position that year. It then bought three times in 2023 and 2024, and each of those positions lost money. The rule avoided the worst of the decline and missed the recovery from 2023 onward, which is a typical profile for a slow trend filter on a low-volatility asset.
Ten of the 12 templates beat it here by CAGR. The RSI(2) snapback tops the list at 1.57% and the EMA 12/26 trend follows at 1.07%. Across the 59 funds AGG sits 34th for this rule, and the median CAGR over all 59 is 0%. Many funds produced no trades at all, so a median of zero is not informative. Rule details sit on the 3-month momentum page and fund statistics on the AGG page.
Year by year
| Year | 3-month momentum | buy & hold |
|---|---|---|
| 2021 | 0.0% | −1.6% |
| 2022 | 0.0% | −12.7% |
| 2023 | −2.6% | 5.5% |
| 2024 | −1.7% | 1.3% |
| 2025 | 0.0% | 7.0% |
| 2026 | 0.0% | −2.7% |
Year by year
Equity did not move in 2021, 2022, 2025 or 2026 (a partial year). It fell 2.6% in 2023 and 1.7% in 2024. The fund itself did -1.6% in 2021, -12.7% in 2022, 5.5% in 2023, 1.3% in 2024, 7% in 2025 and -2.7% in 2026. Against the fund the gaps were 1.6 points in 2021, 12.7 in 2022, -8.1 in 2023, -3 in 2024, -7 in 2025 and 2.7 in 2026.
2021 was flat for the rule. AGG lost 1.64% in the calendar year, a small slide, and the 63-day return never rose above the 5% entry level, so the rule never bought. The same was true through 2022. Bond funds fell steadily that year, and a rule that needs a three-month gain of more than 5% has no reason to enter during a decline. 2022 is where the rule earned its 12.7 point lead.
The first entry came on 2023-01-12 at $86.98 adjusted. AGG had bounced from the late-2022 low, which pushed the 63-day return above the threshold. The position sold on 2023-02-28 at $84.67, a loss of 2.66% after 47 days. The monthly table shows January 2023 at 0.44% and February 2023 at -3.01%, the worst month of the test. The rise that triggered the entry had stalled by the time the rule saw it, and February reversed it. This is the whipsaw that the 5% entry and 0% exit were designed to limit, and it happened anyway.
The second trade bought on 2023-12-21 at $89.19 and sold on 2024-03-18 at $87.78 for -1.58% after 88 days. The fund's best month, November 2023 at 4.48%, had already passed when this entry came. December 2023 returned 0.02%, January 2024 -0.12% and February 2024 -1.45%. The third trade bought on 2024-08-01 at $90.94 and sold on 2024-10-31 at $90.86 for -0.09% after 91 days. August 2024 gained 1.21% and September 2024 gained 1.28%, the best month of the rule, and October 2024 gave back 2.54%.
2023 ended at -2.6% for the rule against 5.5% for the fund, and 2024 at -1.7% against 1.3%. In 2025 the fund returned 7% and the rule returned 0%, a shortfall of 7 points, because no 63-day window gave a signal that cleared the entry level. In 2026 the fund fell 2.7% and the rule stayed out again.
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.4% | −3.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% |
| 2024 | −0.1% | −1.4% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 1.2% | 1.3% | −2.5% | 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% | – | – |
Months in and out
Only 8 months on the table show a nonzero value. The rest are zero because the sleeve held cash. The nonzero months are January 2023 at 0.44%, February 2023 at -3.01%, December 2023 at 0.02%, January 2024 at -0.12%, February 2024 at -1.45%, August 2024 at 1.21%, September 2024 at 1.28% and October 2024 at -2.54%.
The best month was September 2024 at 1.28%, which compares with a best month for buy-and-hold of November 2023 at 4.48%. The rule was not invested in November 2023, and it bought on 2023-12-21, after the rally. The worst month for the rule, February 2023 at -3.01%, is also not the fund's worst month. Buy-and-hold's worst was September 2022 at -4.07%, while the rule held cash that month.
Each of the three trades gave back most of its early gain in the last month of the hold. January 2023 gained 0.44% and February lost 3.01%. September 2024 gained 1.28% and October lost 2.54%. An exit that waits for a negative 63-day return will always be late, and on a fund whose monthly moves are small, the delay costs a larger share of the trade than it would on an equity fund.
The fund's average monthly seasonality shows November at 2.08%, July at 0.73% and January at 0.41%, against September at -1.31% and October at -0.95%. With five or six observations per calendar month, those averages only describe this window. The rule contains no calendar logic.
Every trade
3-month momentum on AGG made 3 closed round trips, an average hold of 75 days, an average loser of −1.44%, a longest losing streak of 3. It held a position at the close on 10.6% of trading days.
| Entry | Entry price | Exit | Exit price | Return | Days held |
|---|---|---|---|---|---|
| 2023-01-12 | $86.98 | 2023-02-28 | $84.67 | −2.7% | 47 |
| 2023-12-21 | $89.19 | 2024-03-18 | $87.78 | −1.6% | 88 |
| 2024-08-01 | $90.94 | 2024-10-31 | $90.86 | −0.1% | 91 |
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 trade list
The three closed trades returned -2.66%, -1.58% and -0.09%. The median was -1.58%, the median hold was 88 days, and holds lasted from 47 to 91 days. Nothing was open on the final day. With zero winners the win rate is 0% and the profit factor is 0, and the loss streak is 3.
Hold times are close to one quarter, which fits the 63-day lookback. The signal turns on after a quarter of gains and turns off after a quarter of weakness, so each position lasts about the length of the window that triggered it. The entry prices rise across the trades, from $86.98 to $89.19 to $90.94, and the exit prices were $84.67, $87.78 and $90.86. The rule bought each time at a higher price than the previous entry and sold within a few percent of it.
Sizes on this fund are small. The largest loss of 2.66% on the first trade is smaller than a single bad day on a leveraged equity fund. For a bond fund that moves 0.28% on an average up day and -0.28% on an average down day, a trade that loses 2.66% is a large move against the position.
Three trades cannot say whether the rule loses on bonds in general. The per-year counts show one closed trade in 2023 and two in 2024, all losers. The sample tells how this window behaved. It is too small to estimate a win rate.
Largest drawdowns
| Peak | Low point | Depth | Days to low | Recovered | Days to recover |
|---|---|---|---|---|---|
| 2023-02-02 | 2024-02-13 | −5.7% | 376 | not yet | – |
| 2023-01-18 | 2023-01-30 | −0.9% | 12 | 2023-02-01 | 2 |
| 2023-01-12 | 2023-01-17 | −0.5% | 5 | 2023-01-18 | 1 |
Buy-and-hold's deepest drawdown ran from 2021-01-04 to 2022-10-20 and reached −17.6%.
Drawdowns
The sleeve's worst stretch started at a peak on 2023-02-02 and bottomed on 2024-02-13 at 5.72%, 376 days later, and equity never regained the peak. Two small dips came earlier in January 2023: 0.89% between 2023-01-18 and 2023-01-30, and 0.52% between 2023-01-12 and 2023-01-17.
The fund had a single drawdown that covered the whole window. It began on 2021-01-04, hit 17.57% on 2022-10-20 after 654 days, and was still open on 2026-10-02. The fund's own profile lists 17.98% and 1,443 underwater sessions out of 1,444. For a bond fund that is a long time underwater. The momentum switch avoided most of it, and that is the case for the rule: the drawdown was 5.72% against 17.57% and the ending equity was almost the same.
The Sharpe ratio, -0.4, is lower than the fund's -0.11. Both are negative. The rule has a smaller loss and a lower ratio because its return is also small and its volatility is low while it sits in cash, which makes the ratio sensitive to a few small losing trades. The ratio should be read with the 3-trade sample in mind.
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.7% | −5.7% | $9,582 | -0.40 |
| 5 basis points | −0.8% | −5.8% | $9,555 | -0.43 |
| 10 basis points | −0.8% | −5.9% | $9,527 | -0.46 |
Cost runs
Charging 5 basis points a trade takes the CAGR to -0.79%, with a 5.8% drawdown, $9,555 at the end and a Sharpe ratio of -0.426. At 10 basis points the figures are -0.84%, 5.89%, $9,527 and -0.455. Six fills are all there is to charge. AGG changes hands for about $647,965,164 a day, with 8,686 shares in the median minute, so a small sleeve fills without trouble. Market impact is outside the cost runs.
Changing the parameters
| Version | CAGR | Max drawdown | Round trips | Win rate | Final value |
|---|---|---|---|---|---|
| Published rules | −0.7% | −5.7% | 3 | 0% | $9,582 |
| Enter above 0% | −0.0% | −8.5% | 42 | 40% | $9,981 |
| Enter above 10% | 0.0% | −0.0% | 0 | – | $10,000 |
| Enter above 15% | 0.0% | −0.0% | 0 | – | $10,000 |
Parameter variants
Three variants moved only the entry level. An entry above 0% traded 42 times with 17 winners, for a CAGR of -0.03%, an 8.53% drawdown, $9,981 at the end and a Sharpe ratio of 0.009. An entry above 10% never fired, so equity stayed at $10,000. The 15% entry behaved the same way.
Only the 0% entry traded often, and it finished almost flat, ahead of the 5% headline entry. A zero buffer means the rule buys and sells around the same threshold, so it made 42 trades and won 17. That is a lower win rate than a coin flip, and the gains and losses roughly cancel. The 10% and 15% levels were never reached, because AGG's 63-day return stayed below 10% for the whole window. That fact says something about the fund: it is a low-volatility asset, with annualized volatility of 5.82%, and a quarter's gain above 10% did not occur in the test.
The 5% entry on the headline run sits near the top of what the fund produced. Only three signals cleared it. The spread of results across the variants comes down to how many trades occurred, and the data covers a single window, so it does not identify a better threshold.
How AGG behaved
| Measure | AGG |
|---|---|
| Data in this test | 2021-01-04 to 2026-10-02 (1444 sessions) |
| Total return, buy and hold | −4.5% |
| Annualized volatility | 5.8% |
| Deepest drawdown | −18.0% (2021-01-04 to 2022-10-20) |
| Up days | 49.3% |
| Average daily range | 0.35% |
| Average overnight gap | 0.21% |
| Correlation to SPY | 0.22 |
| Correlation to QQQ | 0.21 |
| Correlation to TLT | 0.92 |
| Sessions above the 200-day average | 63.6% |
| Crossings of the 200-day average | 50 |
| Falls of 10% or more from a 20-day high | 0 |
How AGG behaved
AGG holds the broad US investment-grade bond market. The window gave it a total return of -4.53%, a CAGR of -0.8% and volatility of 5.82% a year. By calendar year it did -1.64%, -13.02%, 5.62%, 1.35%, 7.19% and, so far in 2026, -2.75%. Up days made up 49.27% of sessions. The best single day was 2.14% on 2022-11-10 and the worst -1.63% on 2022-06-13.
The momentum rule needs a 5% gain over 63 sessions, and AGG rarely moved that far. Intraday range averaged 0.35% and the overnight gap 0.21%. Overnight log return summed to 6.82% and intraday to -11.45%, so the gains came between the close and the next open while the trading sessions lost money. The shares of the total return are -147.39% overnight and 247.39% intraday, which sum to the net result and mean little on a flat fund.
Mean reversion and momentum measures were near zero. After 59 sessions with RSI(14) under 30, the median 5-day return was -0.04% (baseline -0.01%) and the median 20-day return -0.9% (baseline 0.07%). RSI(2) below 10 appeared on 167 sessions with a 5-day median of 0.05% and a 20-day median of 0.12%. Neither extreme was a strong signal. Price finished above the 200-day average on 63.61% of sessions and crossed it 50 times, a high count for a fund that lost only 4.53%.
AGG's correlation to TLT was 0.92 and to SPY 0.22. BND correlates at 1, IEF at 0.97 and IGIB at 0.96. Among bond funds, the 3-month momentum rule returned 0.25% on IGIB, -0.59% on IEI, -0.74% on AGG, -0.98% on BND, -1.35% on IEF and -2.28% on TLT. SGOV produced no trades and a CAGR of 0%. The category median was -0.74%, the same as AGG. Longer-maturity funds fared worse, and TLT's drawdown reached 18.58%.
The rules
Hold while the trailing 3-month return is positive (above +5% to enter, below 0% to exit).
- WHEN the market opens · IF not invested AND the 63-day return > +5% · THEN buy with 98% of the sleeve
- WHEN the market opens · IF invested AND the 63-day return < 0% · THEN sell the whole position
Time-series momentum on a quarterly lookback, the horizon much of the academic momentum literature uses. The template enters after a +5% three-month run and exits when the same measure turns negative. The gap between entry (+5%) and exit (0%) is a buffer against flip-flopping around a single threshold.
Good for: assets with long, persistent cycles, such as index, sector and managed-futures ETFs.
Watch out: a three-month lookback is slow; V-shaped crashes and recoveries can see it exit near the bottom and re-enter well off the low.
How the rules interact with this fund
A +5% gain over 63 sessions is a high bar for a fund whose volatility is 5.82% a year. The rule only fires when AGG has rebounded sharply, and in this window that happened after the 2022 low, in late 2023 and in mid-2024. Each of those entries came late in a short rebound, and each exit came when the rebound faded. The result is a rule that spends 10.6% of sessions in the fund and loses a little each time.
The gap between the +5% entry and the 0% exit exists to stop flip-flopping. The 0% entry variant shows what the buffer does: without it the rule made 42 trades and ended near flat, and with it the rule made 3 trades and lost 4.18%. The buffer cut trading, and it cut the gains as well.
Other rules on the same fund did better, and several did nothing. The RSI(2) snapback made 1.57% at a 10.61% drawdown. The golden cross returned 0.78% and the SMA 10/50 0.79%, both with drawdowns near 7%. The dip buyer and the momentum breakout never traded and ended at 0%, because AGG never dropped 10% below a 20-day high. The monthly cycle lost 0.91% with a drawdown of 18.88%. The evidence is one 5.74-year window in which bonds fell. Fills are hypothetical minute-bar fills, and the main run charges nothing.
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 3-month momentum beat buy-and-hold on AGG?
Over 2021-01-04 to 2026-10-02, 3-month momentum on AGG returned −0.7% annualized vs −0.8% for buy-and-hold: it beat buy-and-hold by 0.0% per year, with a maximum drawdown 11.9 points shallower than holding (5.7% vs 17.6%).
How many trades did it make?
3 completed round trips over 5.7 years (6 fills), with 0% of round trips closing profitably.
Why 63 days?
63 trading days is about one quarter, a common momentum lookback. You can sweep it in DeployQuant to see how the horizon changes results.
What did 3-month momentum earn on AGG?
The start of $10,000 became $9,582 by 2026-10-02, a CAGR of -0.74%, with a maximum drawdown of 5.72%. It made 3 round trips and all three lost. Buy-and-hold ended at $9,559.
Did the rule protect against the 2022 bond decline?
In the test it did. AGG lost 13.02% in calendar 2022, and the rule held no position that year because the 63-day return never cleared +5%. The sleeve had a drawdown of 5.72% over the window against 17.57% for buy-and-hold.
Why did all three trades lose?
Each entry came after a short rebound and each exit came after the rebound faded. The trades returned -2.66%, -1.58% and -0.09%. A slow lookback on a low-volatility fund buys late and sells late, and the small price moves leave little room.
What happens if the entry threshold is lowered?
A 0% entry traded 42 times and won 17, ending at a CAGR of -0.03% with an 8.53% drawdown. Entering above 10% or 15% made no trades because AGG's 63-day return stayed below those levels.
Does the rule beat buy-and-hold on AGG?
CAGR was 0.04 points higher and ending equity $23 higher, a tie. Three calendar years went each way. The drawdown was shallower by 11.85 points.
Where does AGG sit among bond funds for this rule?
AGG ranks 34th of 59 funds. IGIB returned 0.25%, IEI returned -0.59%, BND -0.98%, IEF -1.35% and TLT -2.28%. Longer-duration funds lost more with this rule.
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.