Learn › Strategies › 20-Day Momentum + Trailing Stop › AGG

20-Day Momentum + Trailing Stop 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.

Result: momentum breakout on AGG turned $10,000 into $10,000 (0.0% total, 0.0% CAGR): it beat buy-and-hold by 0.8% per year, with a maximum drawdown 17.6 points shallower than holding (0.0% vs 17.6%).

The momentum breakout template made no trades on iShares Core U.S. Aggregate Bond ETF (AGG) between 2021-01-04 and 2026-10-02. The account held $10,000 in cash for the whole 5.74 years. The CAGR is 0%, the max drawdown is 0%, exposure is 0% and fills are 0. The Sharpe ratio is shown as 0 because there is no return series to measure.

The rule buys when the 20-day return is above +10% and the account is flat, using 98% of the sleeve at the next open. After entry, a trailing stop sits 10% below the position's high-water mark. The template is built for assets in a burst of momentum, and its own description names semiconductor and leveraged tech funds as the good fit. AGG is a broad investment-grade bond fund with annualized volatility of 5.82%. In the window it never produced a 20-day gain that cleared the entry bar.

A blank result still carries information. Buy-and-hold AGG lost money over the same dates: a 0.78% annual loss, ending at $9,558.95, with a 17.57% drawdown. The rule sat out that drawdown by never entering, which is why its result sits 0.78% a year ahead of the fund and 17.57 points shallower on drawdown, a gap of $441.05 in end equity. The comparison is accurate and nearly empty: a rule that does nothing beats a fund that falls.

The wider results for the rule are on the momentum breakout strategy page, and the fund's own behaviour is on the AGG hub.

0.0%CAGR
−0.8%buy & hold CAGR
−0.0%max drawdown
0.00Sharpe ratio
0round trips
■ momentum breakout   ■ buy & hold, $10,000 invested 2021-01-04

Year by year

Yearmomentum breakoutbuy & hold
20210.0%−1.6%
20220.0%−12.7%
20230.0%5.5%
20240.0%1.3%
20250.0%7.0%
20260.0%−2.7%

What the fund did while the rule sat in cash

The yearly table shows 0.0% for the rule in every year from 2021 to 2026. Buy-and-hold AGG returned -1.6% in 2021, -12.7% in 2022, 5.5% in 2023, 1.3% in 2024, 7.0% in 2025 and -2.7% so far in 2026. The rule was ahead in the three losing years, 2021, 2022 and 2026, and behind in the three winning years, 2023, 2024 and 2025. The gaps were 1.6 points, 12.7 points and 2.7 points in its favour, and 5.5, 1.3 and 7.0 points against it.

The fund's own series, which differs slightly from the buy-and-hold run because the benchmark puts 98% of the account in at the first open, shows the same shape: -1.64% in 2021, -13.02% in 2022, 5.62% in 2023, 1.35% in 2024, 7.19% in 2025 and -2.75% in 2026.

2022 is the year that dominates. AGG lost 12.7% in buy-and-hold terms, and the fund's peak-to-trough drawdown started on the very first day of the window, 2021-01-04, and reached its low on 2022-10-20, 654 days later. It had not recovered by 2026-10-02, so the whole window sits inside one unrecovered drawdown. A momentum entry on a fund in that position needs a sharp bounce to trigger, and none arrived that was large enough.

The best calendar year for the fund was 2025 at 7.19%. The rule needed 10% in 20 sessions, which is more than the fund's best full calendar year. The comparison with the best month is just as clear: the fund's best month in the buy-and-hold run was November 2023 at 4.48%, and the 20-session window is about one month long.

Month by month

YearJanFebMarAprMayJunJulAugSepOctNovDec
20210.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%
20220.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%
20230.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%
20240.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%
20250.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%
20260.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%––

Why the month table is empty

Every cell in the month table reads 0.0%, from January 2021 to October 2026. The best month and the worst month of the rule are both listed as 2021-01 at 0, which is a placeholder for the lack of any variation.

The fund's own months show what the rule was watching. Buy-and-hold had its best month in November 2023 at 4.48% and its worst in September 2022 at -4.07%. Those two extremes are small against a 10% trigger. The average calendar month for the fund shows the same range: November averaged 2.08% across 5 observations, and September averaged -1.31% across 6. October averaged -0.95%, April -0.74% and July 0.73%. No month in the table approaches 10%.

Bond funds do move in seasons, and November has been the strongest month in this sample. A fund that averages 2.08% in its best month has a long way to go to reach the bar. The rule was designed for assets that gain 10% in four weeks. AGG's biggest daily moves in the window were 2.14% on 2022-11-10, 1.6% on 2022-09-28, 1.26% on 2023-12-13, 1.21% on 2023-11-14 and 1.19% on 2023-03-10. Its biggest down days were -1.63% on 2022-06-13, -1.3% on 2022-09-26, -1.23% on 2025-04-07 and 2022-03-02, and -1.18% on 2024-04-10. Strings of days like those would be needed back to back, with almost no pullback, to reach 10% in 20 sessions.

What no trades means

The trade list is empty. There is no first trade, no last trade, no median return and no hold time, and the win rate is not defined. The rule was never invested and never open at the end.

The trailing stop was therefore never used. It exists to exit a position after the entry, and with no entry there was nothing to trail. The caveat in the template description, that buying strength means buying high and a burst that reverses immediately exits about 10% below the entry, does not apply to this page because no burst happened.

It helps to separate two possible readings of a zero. One is that the rule is wrong for the fund, which is the case here. The other is that the test is broken. The data supports the first. The window has 1444 sessions on AGG, the fund's price series is complete, and the fund shows up in the profile with a full set of returns, volatility and correlations. The rule asked for a 10% jump over 20 sessions on a fund whose average up day was 0.28% and whose best day was 2.14%.

The zero is also consistent with the rule's median result across the full set of funds. The median CAGR for this strategy across all 59 funds was 0%, and across the bond ETFs it was 0%. Of the 7 bond funds in the category list, 6 made no trades at all: AGG, BND, IEF, IEI, IGIB and SGOV. The exception was TLT, a long-dated Treasury fund, which made 2 round trips and lost 1.2% a year with a 10.32% max drawdown. The TLT page for this rule shows those two trades. TLT is the one bond fund where the entry bar was reached.

Drawdown without a position

The rule has no drawdowns to list. The largest drawdowns table is empty because equity stayed at $10,000 every day. Buy-and-hold AGG had one drawdown in the window, 17.57%, with a peak on 2021-01-04 and a trough on 2022-10-20, 654 days later and with no recovery date.

The comparison shows the main thing a cash position does: it avoids loss from the fund. It also gives up the income and small gains that the fund paid in 2023, 2024 and 2025. The rule's equity stays flat at $10,000 in the result. The fund's total return over the window was -4.53% and its annualized volatility was 5.82%, so the return was small and the risk was modest against equity funds, and cash looks good only because the window is the worst stretch for bonds in the sample.

The fund's own maximum drawdown in the profile was 17.98% from 2021-01-04 to 2022-10-20, and its longest drawdown ran 1443 sessions. It had 0 drawdown events of 10% inside 20 days. That figure is the same fact as the zero trades from the other side: the fund did not make a 10% move in either direction within a 20-day span in this window.

With trading costs

The headline run fills at the bar price. These runs charge slippage on every fill.

Slippage per fillCAGRMax drawdownFinal valueSharpe
None (headline)0.0%−0.0%$10,0000.00
5 basis points0.0%−0.0%$10,0000.00
10 basis points0.0%−0.0%$10,0000.00

Costs on a rule that never trades

The cost runs at 5 and 10 basis points both return the headline numbers: a 0% CAGR, a 0% max drawdown, an end equity of $10,000 and a Sharpe of 0. Costs apply to fills, and there are none. The page keeps the rows so that every rule on every fund can be compared the same way.

AGG itself is easy to trade. Its average daily dollar volume in the window was $647,965,164 and its median minute volume was 8,686 shares. If the rule had traded, a $10,000 order would be small against that. Trading costs would have been small against that volume, and with no fills there is no cost to measure.

Changing the parameters

VersionCAGRMax drawdownRound tripsWin rateFinal value
Published rules0.0%−0.0%0–$10,000
5% trailing stop0.0%−0.0%0–$10,000
15% trailing stop0.0%−0.0%0–$10,000
20% return entry0.0%−0.0%0–$10,000

Variants that change nothing

Three variants were tested. A 5% trailing stop returned 0 trades, a 0% CAGR and $10,000. A 15% trailing stop returned the same. A 20% return entry returned the same.

The first two change the exit, and the exit is only reached after an entry. The third changes the entry in the harder direction: if a 10% gain over 20 sessions never happened, a 20% gain could not have either. None of the variants loosened the entry, so none could produce a trade.

The test that would change the result is a lower entry threshold, such as a 3% or 5% 20-day return. That is not in the grid on this page. Whether a lower bar would have produced useful trades on a bond fund is a separate test. A flat grid like this one is a sign the rule has no purchase on the fund, and the result is stable only because nothing happens.

How AGG behaved

MeasureAGG
Data in this test2021-01-04 to 2026-10-02 (1444 sessions)
Total return, buy and hold−4.5%
Annualized volatility5.8%
Deepest drawdown−18.0% (2021-01-04 to 2022-10-20)
Up days49.3%
Average daily range0.35%
Average overnight gap0.21%
Correlation to SPY0.22
Correlation to QQQ0.21
Correlation to TLT0.92
Sessions above the 200-day average63.6%
Crossings of the 200-day average50
Falls of 10% or more from a 20-day high0

How AGG behaved

AGG holds the broad US investment-grade bond market in one fund. Its calendar returns over the window were -1.64%, -13.02%, 5.62%, 1.35%, 7.19% and -2.75% for 2021 through 2026. Annualized volatility was 5.82%. The average up day was 0.28% and the average down day was -0.28%, and the average intraday range was 0.35%. The fund rose on 49.27% of days.

Its relationship with other funds explains why momentum is scarce. The correlation with TLT was 0.92 and with SPY 0.22, and the beta to SPY was 0.08. BND had a correlation of 1 with it, followed by IEF at 0.97, IGIB at 0.96, IEI at 0.94 and UST at 0.92. The least correlated funds were TBF at -0.91 and KMLM at -0.44.

The fund spent 63.61% of sessions above its 200-day average and crossed it 50 times, which is a lot of crossings for a fund with so little volatility. The price kept returning to its average line. RSI(14) fell below 30 on 59 sessions and rose above 70 on 51. After RSI(14) readings below 30, the median 5-day forward return was -0.04% and the 20-day was -0.9%, against baselines of -0.01% and 0.07%.

Compare AGG with the funds this template suits. A leveraged tech fund can gain 10% in a few sessions. AGG's best day of 2.14% sits far below a 10% bar, and its average up day was 0.28%.

The rules

Buy after a +10% four-week burst and let a 10% trailing stop manage the exit.

  1. WHEN the market opens · IF not invested AND the 20-day return > +10% · THEN buy with 98% of the sleeve
  2. 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.

How the 12 templates compared on AGG

On AGG the momentum breakout ranked 7th of 12 by CAGR, level with the dip buyer, which also made no trades. For this rule, AGG ranked 28th of 59 funds, sitting in the middle of a long run of zeros.

Five rules earned a positive return. The RSI(2) snapback earned 1.57% a year with a 10.61% drawdown. The EMA 12/26 trend earned 1.07% with a 4.88% drawdown, the shallowest of the active rules. The SMA 10/50 trend earned 0.79% with 6.46%, the golden cross 0.78% with 7.13%, and the 200-day regime filter 0.31% with 6.23%.

The losing rules were the RSI mean reversion at -0.23% with 11.57%, the weekly 7% target at -0.29% with 16%, the 3-month momentum at -0.74% with 5.72%, the monthly cycle at -0.91% with 18.88%, and the trend plus trailing stop at -1.1% with 18.83%. Rules that traded on AGG mostly lost or made under 2% a year, and the ones that lost took drawdowns near the fund's own 17.57%.

The entry and the exit of this template are tied together. The trailing stop ratchets up beneath the highest close and never moves down, and there is no profit target, so a winner runs until the trail is hit. That design assumes the entry catches the start of an extended move. A fund with a 0.35% average intraday range and a 5.82% annualized volatility does not produce moves that a 10% trail could follow. If the rule had entered on a rare spike, a 10% trail would sit far below the price relative to the fund's daily range, and the exit would depend on a slide as large as the fund's worst drawdown in the window.

Another way to see the mismatch is to compare the two thresholds with the fund's profile. The entry asks for a 10% gain in 20 sessions. The exit asks for a 10% fall from the high. The fund's maximum drawdown over the whole window, from 2021-01-04 to 2022-10-20, was 17.98%. Both thresholds are a large fraction of what the fund did over almost two years, and the template applies them to a few weeks.

Read as a ranking, the order says the best result on AGG came from a short-term dip rule, and the middle was occupied by two rules that never traded. A trend rule with a fast average made a small profit. Strategies built on large bursts of momentum have no foothold in a fund with this volatility.

The test stops at one window, 2021-01-04 to 2026-10-02, with $10,000 and no fees. That window includes an unrecovered 17.57% drawdown for the fund, and a different window would give different results.

Run momentum breakout on AGG yourself, free →

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 AGG?

Over 2021-01-04 to 2026-10-02, momentum breakout on AGG returned 0.0% annualized vs −0.8% for buy-and-hold: it beat buy-and-hold by 0.8% per year, with a maximum drawdown 17.6 points shallower than holding (0.0% vs 17.6%).

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.

Why did the momentum breakout rule make no trades on AGG?

The rule needs a 20-day return above 10%, and AGG never produced one in this window. The fund's best calendar year was 7.19%, its best month in the buy-and-hold run was 4.48%, and its best day was 2.14%. With no entry, the 10% trailing stop was never used.

Is a 0% result on AGG a bug?

The data points the other way. The fund has 1444 sessions with full price history, and its volatility is 5.82% a year. The rule asks for a gain that the fund did not deliver, and most bond funds in the set also had no trades.

How does the rule compare with buy-and-hold AGG?

Cash beat the fund by 0.78% a year because buy-and-hold lost money, ending at $9,558.95 with a 17.57% drawdown. The rule ended at $10,000. It was ahead in 2021, 2022 and 2026 and behind in 2023, 2024 and 2025.

Would a looser entry produce trades?

That is not tested here. The three variants were a 5% trailing stop, a 15% trailing stop and a 20% return entry. All made 0 trades, because none lowered the 10% entry bar.

Which bond ETFs did the rule trade?

Only TLT, with 2 round trips, a 1.2% annual loss and a 10.32% max drawdown. AGG, BND, IEF, IEI, IGIB and SGOV made no trades.

Which template did best on AGG?

The RSI(2) snapback earned 1.57% a year with a 10.61% drawdown, the highest CAGR of the 12. The EMA 12/26 trend earned 1.07% with a 4.88% drawdown. Every figure is hypothetical and has no fees or slippage.

Related

20-Day Momentum + Trailing Stop on all 59 ETFsfull results table All strategies on AGG12 templates compared RSI(14) Mean Reversion on AGGsame ETF, different rulesRSI(2) Dip Snapback on AGGsame ETF, different rules

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.