Learn › Strategies › SMA-200 Trend + 15% Trailing Stop › AGG

SMA-200 Trend + 15% 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: trend + trailing stop on AGG turned $10,000 into $9,384 (−6.2% total, −1.1% CAGR): it trailed buy-and-hold by 0.3% per year, with a maximum drawdown of 18.8% (buy-and-hold: 17.6%).

Pairing a 200-day entry with a 15% trailing stop on AGG, the iShares Core U.S. Aggregate Bond ETF, took $10,000 on 2021-01-04 to $9,384.47 on 2026-10-02. The CAGR was -1.1%, the total return -6.16% and the maximum drawdown 18.83%. The Sharpe ratio was -0.19. The rule bought only once the fund closed above its 200-day average, and it sold only if price fell 15% from the position's high-water mark.

Holding AGG from the first open, 98% invested, returned -0.78% a year and ended at $9,558.95, with a 17.57% maximum drawdown and a Sharpe ratio of -0.11. The rule finished $174.48 behind and its drawdown was 1.26 points deeper. This is a fund where neither approach made money, and the rule did slightly worse than doing nothing.

The record is short. The stop fired one time. The first position, bought on 2021-10-28, was sold on 2022-09-26 for a loss of 14.3%, and the second, bought on 2023-01-10, was still open at the end with a gain of 9.27%. Exposure was 80.6% of sessions.

Of the 12 templates on AGG, this one ranks twelfth by CAGR. The RSI(2) snapback leads at 1.57% and the monthly cycle is next to last at -0.91%. The rule ranks AGG forty-first of 59 funds. The median CAGR for the rule across all funds is 2.61%, and the median for bond funds is -1.08%, so AGG sits close to its category and below the library.

The test is one 5.74-year window with no fees in the headline run and daily decisions. The numbers are hypothetical.

−1.1%CAGR
−0.8%buy & hold CAGR
−18.8%max drawdown
-0.19Sharpe ratio
1round trips
0%win rate
■ trend + trailing stop   ■ buy & hold, $10,000 invested 2021-01-04

Year by year

Yeartrend + trailing stopbuy & hold
2021−0.2%−1.6%
2022−13.8%−12.7%
20233.3%5.5%
20241.3%1.3%
20257.0%7.0%
2026−2.7%−2.7%

Year by year

2021 returned -0.2% for the rule and -1.6% for holding, a lead of 1.4 points that is the rule's only winning year. From January through September the account had no position, so those months read 0.0%. The 200-day filter kept it out because the fund had not yet closed above the average, and it entered on 2021-10-28 at an adjusted $97.27. October returned -0.1%, November 0.27% and December -0.34%.

2022 returned -13.8% against -12.7%, so the rule trailed by 1.1 points. It held the position through the whole bond decline, with losses of 1.96% in January, 1.09% in February, 2.71% in March, 3.72% in April, 1.53% in June, 2.94% in August and 3.78% in September, which was the rule's worst month. The stop fired on 2022-09-26 at $83.3595, after a loss of 14.3% over 333 days. The only gains were 0.75% in May and 2.47% in July. After the exit the account was flat through October, November and December.

The fund's own low came on 2022-10-20, and the best day of the whole test, +2.14% on 2022-11-10, fell in the cash months. The rule exited before the low and was in cash for the first part of the bounce.

2023 returned 3.3% against 5.5%, trailing by 2.2 points, which is the largest shortfall of the six years. The account re-entered on 2023-01-10 at $86.25, and the month returned 1.26%. The rest of the year was uneven: -2.69% in February, 2.55% in March, -2.49% in September, -1.54% in October, then 4.47% in November and 3.55% in December. November was the rule's best month. The stop did not fire again.

2024 returned 1.3%, 2025 returned 7.0% and 2026 returned -2.7%, and each matches holding exactly. The rule held the fund through all three years and the stop was never touched, so the gap to holding was set earlier, in 2022 and 2023.

The yearly gaps, as the table shows, are 1.4 in 2021, -1.1 in 2022, -2.2 in 2023 and 0.0 in 2024, 2025 and 2026. The shortfall of $174.48 comes from the 2022 exit and the 2023 re-entry, since the three later years match holding.

Month by month

YearJanFebMarAprMayJunJulAugSepOctNovDec
20210.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%−0.1%0.3%−0.3%
2022−2.0%−1.1%−2.7%−3.7%0.8%−1.5%2.5%−2.9%−3.8%0.0%0.0%0.0%
20231.3%−2.7%2.5%0.6%−1.1%−0.3%−0.1%−0.6%−2.5%−1.5%4.5%3.5%
2024−0.1%−1.4%0.9%−2.4%1.6%0.9%2.3%1.4%1.3%−2.5%1.1%−1.6%
20250.5%2.2%0.0%0.4%−0.6%1.4%−0.3%1.2%1.1%0.6%0.6%−0.3%
20260.2%1.6%−1.7%0.2%0.3%0.2%−1.2%0.4%−2.5%0.1%––

Monthly returns

The best month was 2023-11 at 4.47%, against 4.48% for holding. The worst was 2022-09 at -3.78%, against -4.07% for holding. The two series are almost equal in both extreme months, which matches a rule that was fully invested in the fund for most of the window.

Thirteen months read exactly 0.0%: January to September 2021, October to December 2022 and March 2025. The first group is the filter waiting for a close above the 200-day average. The second is the stop, working after its exit. March 2025 also reads 0.0%, a month in which the account value did not change.

The rule's 2022 record has seven losing months out of nine invested months. The table shows no month of that year that gained more than 2.47%. That is what a long bond decline looks like under a rule that does not step aside until the stop is touched.

From 2023-01 to the end the rule has a mix of small gains and small losses. The monthly table has 2024-10 at -2.45% and 2024-12 at -1.63%, 2026-03 at -1.72% and 2026-09 at -2.55%, set against 1.56% in February 2026 and 2.17% in February 2025. For a fund with 5.82% volatility these are typical sizes. The fund's month-of-year averages show November at 2.08% and September at -1.31%, from 5 or 6 observations each. The rule's own Novembers and Septembers fit: 4.47% in November 2023 and -3.78%, -2.49% and -2.55% in the Septembers of 2022, 2023 and 2026.

Every trade

trend + trailing stop on AGG made 1 closed round trip and one position still open at the end of the test, an average hold of 333 days, an average loser of −14.30%, a longest losing streak of 1. It held a position at the close on 80.6% of trading days.

EntryEntry priceExitExit priceReturnDays held
2021-10-28$97.272022-09-26$83.36−14.3%333
2023-01-10$86.25open–9.3%–

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.

Two trades

The trade list has two entries. One closed, and one is open. The closed trade was a loss: the entry on 2021-10-28 at $97.27 and the stop-out on 2022-09-26 at $83.3595, a return of -14.3% over 333 days. That makes the win rate 0%, the profit factor 0, the average loss -14.3%, and the best and worst trade the same figure. The open position was bought on 2023-01-10 at $86.25 and carried a gain of 9.27% at the last close.

Statistics built on one closed trade say little. The table's best trade and worst trade are the same trade, the median holding period of 333 days is that trade's hold, and a streak of one loss is the longest streak. The rule was in the market for 80.6% of sessions, so the whole result comes down to two decisions: buy in late 2021, and buy again in early 2023.

The first position was the costly one: it was bought at $97.27 and sold 14.3% lower. The second, bought at $86.25, stood 9.27% higher at the last close, which has not made up the first loss.

The exit at $83.3595 is the only trade of the test that used the stop. It came on 2022-09-26, a day when the fund fell 1.3%, and the fund's low followed on 2022-10-20. The exit therefore preceded the low, and it locked in the 14.3% loss.

The re-entry came on 2023-01-10 at $86.25, above the $83.3595 exit price, so the account sold low and bought back higher. That round trip is the whole difference between the rule and holding.

Largest drawdowns

PeakLow pointDepthDays to lowRecoveredDays to recover
2021-11-092023-10-19−18.8%709not yet–
2021-11-052021-11-08−0.2%32021-11-091
2021-11-022021-11-03−0.2%12021-11-041

Buy-and-hold's deepest drawdown ran from 2021-01-04 to 2022-10-20 and reached −17.6%.

One drawdown dominates

The rule's maximum drawdown was 18.83%, from a peak on 2021-11-09 to a low on 2023-10-19, 709 days later. The account had not recovered by 2026-10-02. Two tiny episodes of 0.2% and 0.18% in early November 2021 recovered within a day or two of the trough.

Holding AGG had a single drawdown, 17.57%, from 2021-01-04 to 2022-10-20, also unrecovered at the end. The fund's own record shows 17.98% and 1,443 sessions under water, nearly the whole window of 1,444 sessions.

The rule's drawdown was 1.26 points deeper than holding and reached its trough almost a year later than the fund's, on 2023-10-19 against 2022-10-20. The account entered on 2021-10-28, so its peak was on 2021-11-09, later than the fund's. Losses in 2023, with -2.69% in February, -2.49% in September and -1.54% in October, then took the account to its low on 2023-10-19.

The stop did not protect the account here, since a 15% stop on a fund whose worst drawdown was 17.98% can only fire near the end of the fall. The fund had no 10% fall from a 20-day high at all, with zero events in 20-day windows, which fits a fund that moves in a slow grind rather than in sharp gaps.

Other bond funds under the same rule: BND returned -1.08% with an 18.68% drawdown and IEF returned -2.13% with a 21.47% drawdown. TLT lost 7.11% a year with a 38.76% drawdown and 3 round trips. IGIB made 0.06% and IEI 1.43%, and SGOV 3.22% with a 0.02% drawdown and no round trips.

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)−1.1%−18.8%$9,384-0.19
5 basis points−1.1%−18.9%$9,371-0.20
10 basis points−1.1%−19.0%$9,358-0.20

Costs

The rule made 3 fills: the buy in 2021, the sell in 2022 and the buy in 2023. At 5 basis points per fill the CAGR was -1.12% and the account ended at $9,371.25, with an 18.92% drawdown and a Sharpe ratio of -0.195. At 10 basis points the CAGR was -1.15%, the drawdown 19.02%, the Sharpe ratio -0.199 and the ending equity $9,358.04. The headline run ended at $9,384.47.

With three fills, costs barely register. AGG's average daily dollar volume was $647,965,164, and the flat charge does not model wider spreads on stressed days.

Changing the parameters

VersionCAGRMax drawdownRound tripsWin rateFinal value
Published rules−1.1%−18.8%10%$9,384
10% trailing stop−0.1%−14.2%10%$9,923
20% trailing stop−0.5%−16.8%0–$9,698
25% trailing stop−0.5%−16.8%0–$9,698

Different stop widths

Three variants changed the trailing stop on the same fund and window.

A 10% stop returned -0.13% a year with a 14.23% drawdown and ended at $9,922.78, with a Sharpe ratio of -0.005. It made one trade and the trade did not win. This was the best of the variants and the only one with a CAGR close to zero. A tighter stop took the account out of the decline sooner than the 15% stop did.

A 20% stop returned -0.53% with a 16.84% drawdown and ended at $9,697.50, with a Sharpe ratio of -0.07. It made no closed trades: the position never fell 20% from its high, so the first position stayed open to the end. The 25% stop gave the identical result for the same reason.

The 20% and 25% rows are the most informative lines in the table. With no stop ever triggered, the rule reduced to its 200-day entry and one buy-and-hold from the first entry, and it beat both the published 15% stop and buy-and-hold on return, at -0.53% against -1.1% and -0.78%. The 15% stop cost return here because it sold and re-bought at a higher price.

The ordering does not follow the stop width in a straight line: -0.13% at 10%, -1.1% at 15%, and -0.53% at 20% and 25%. No variant had a positive CAGR. Three variants with one stop-out between them describe what happened in 2022, when the fund fell 13.02%, and little else.

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 returned -4.53% over the window, a CAGR of -0.8%, with annualized volatility of 5.82%. The deepest drawdown was 17.98% from 2021-01-04 to 2022-10-20 and had not recovered. Calendar returns were -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 to date.

The fund closed up on 49.27% of days, with the average up day and the average down day both 0.28%. Its average intraday range was 0.35% and its average overnight gap 0.21%. The overnight part of the return was +6.82% in log terms and the intraday part -11.45%, so the fund's gains came from the gaps between sessions and the trading hours lost money. The shares of return, -147.39% overnight and 247.39% intraday, are large only because the total return is close to zero.

AGG's correlation to TLT was 0.92 and the beta was 0.35. Its correlation to SPY was 0.22 and to QQQ 0.21, with betas of 0.08 and 0.06. The most closely correlated funds are BND at 1, IEF at 0.97 and IGIB at 0.96. The least correlated were TBF at -0.91, KMLM at -0.44 and USDU at -0.39.

The 14-day RSI was under 30 on 59 sessions and over 70 on 51. After an RSI under 30 the median five-day return was -0.04% against -0.01% for all sessions, and the median 20-day return was -0.9% against 0.07%. Oversold readings on this fund were followed by weaker returns, which is a bad setting for a buy-the-dip rule and not a problem for a trend rule. November averaged 2.08% and September -1.31%, from 5 or 6 observations each.

The best days were 2022-11-10 at 2.14%, 2022-09-28 at 1.6% and 2023-12-13 at 1.26%. The worst were 2022-06-13 at -1.63%, 2022-09-26 at -1.3% and 2025-04-07 at -1.23%. The rule's stop fired on 2022-09-26.

Among the 12 templates, the EMA 12/26 trend returned 1.07% with a 4.88% drawdown, the SMA 10/50 trend 0.79% and the golden cross 0.78%. The 200-day regime filter made 0.31%. The dip buyer and momentum breakout show 0% with no drawdown. The RSI mean reversion rule lost 0.23%, the weekly 7% target lost 0.29%, and the 3-month momentum rule lost 0.74%. The AGG hub ranks all twelve, and the trend plus trailing stop hub lists the other funds.

The rules

Enter when price is above the 200-day average; exit only when a 15% trailing stop is hit.

  1. WHEN the market opens · IF not invested AND yesterday's close > SMA(200) · THEN buy with 98% of the sleeve
  2. WHILE invested · a managed trailing stop follows 15% below the position's high-water mark

A hybrid of the regime filter and the trailing stop. The 200-day average decides when to get in, and a 15% trail from the position's high-water mark decides when to get out. Winners can run well past the point where a crossover would have exited, and the position gives back 15% from every peak.

Good for: long trends with moderate pullbacks; the 15% trail is wide enough to survive normal corrections.
Watch out: every exit gives back 15% from the peak, and on choppy assets it re-enters above the 200-day repeatedly after each stop-out.

A 15% stop on a fund that rarely moves 15%

The rule enters when yesterday's close is above the 200-day average and the account is flat, using 98% of the sleeve at the open. From then on a managed stop sits 15% under the position's high-water mark and rises as the position makes new highs. There is no other exit. The template says it suits long trends with moderate pullbacks, and warns that every exit gives back 15% from the peak and that choppy assets re-enter repeatedly after stop-outs.

AGG is built to be calm. Its annualized volatility was 5.82%, an average up day was 0.28% and an average down day -0.28%, and its average daily range was 0.35%. A stop 15% under the peak is a very wide net for a fund that moves like that. The only way to reach it is a long, grinding decline, and 2022 provided one.

That changes what the rule is testing. On a volatile fund the trailing stop is a risk control that fires often. Here it fired once, 333 days after the entry. The fund's own drawdown ran 17.98% from 2021-01-04 to 2022-10-20, so a stop at 15% sits inside the fund's worst decline, and the trade it ended still lost 14.3%.

The entry filter shaped exposure. AGG closed above its 200-day average on 63.61% of sessions and crossed the line 50 times, and the account held no position from January through September 2021. The two parts work in opposite directions: the filter keeps the account out until the fund is above its average, and the stop keeps it in until the position has dropped 15%. The result is very few trades, and each one carries a large share of the outcome.

Run trend + trailing stop 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 trend + trailing stop beat buy-and-hold on AGG?

Over 2021-01-04 to 2026-10-02, trend + trailing stop on AGG returned −1.1% annualized vs −0.8% for buy-and-hold: it trailed buy-and-hold by 0.3% per year, with a maximum drawdown of 18.8% (buy-and-hold: 17.6%).

How many trades did it make?

1 completed round trips over 5.7 years (3 fills), with 0% of round trips closing profitably.

Why 15% rather than 10%?

A wider trail survives routine corrections and gives back more at the end. Both numbers are one-field edits in DeployQuant, so you can backtest both and compare.

How did the trend plus 15% trailing stop rule do on AGG?

From $10,000 on 2021-01-04 the account ended at $9,384.47 on 2026-10-02, a CAGR of -1.1% and a total return of -6.16%. The maximum drawdown was 18.83% and the Sharpe ratio -0.19. The rule made one closed trade, which lost 14.3%.

Did the rule beat buy-and-hold on AGG?

No. Holding returned -0.78% a year and ended at $9,558.95, which is $174.48 more than the rule. The rule won 2021, tied 2024, 2025 and 2026, and trailed in 2022 and 2023. Its drawdown was 18.83% against 17.57% for holding.

How many times did the trailing stop trigger?

Once. The position bought on 2021-10-28 at $97.27 was stopped out on 2022-09-26 at $83.3595, a loss of 14.3% over 333 days. The account re-entered on 2023-01-10 at $86.25 and the stop was not touched again.

Why did the account have no position for most of 2021?

The entry needs the previous close above the 200-day average, and AGG had not closed above it until October. The monthly returns read 0.0% from January to September 2021. The first entry came on 2021-10-28.

Would a tighter or wider stop have helped?

A 10% stop returned -0.13% a year with a 14.23% drawdown. A 20% stop and a 25% stop both returned -0.53% with a 16.84% drawdown, because neither was ever hit. The published 15% stop returned -1.1%. These are three variants on one fund and one stop-out.

How much did costs matter?

Very little, with 3 fills. At 5 basis points per fill the CAGR was -1.12% and the account ended at $9,371.25. At 10 basis points it was -1.15% and $9,358.04.

How did the rule rank on AGG?

Twelfth of 12 templates by CAGR, and 41st of 59 funds for this rule. The RSI(2) snapback led on AGG at 1.57%. The median for this rule across bond funds was -1.08%, and BND, the closest fund, returned -1.08%.

Related

SMA-200 Trend + 15% 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.