AGG trading strategies, backtested
iShares Core U.S. Aggregate Bond ETF: the broad US investment-grade bond market in one fund. Every DeployQuant template run on AGG over 5.7 years of minute data, same engine, same window, sorted by return.
AGG is the iShares Core U.S. Aggregate Bond ETF, the broad US investment-grade bond market in one fund. Holding it from 2021-01-04 to 2026-10-02 returned negative 0.8% a year, a total of negative 4.4%, and $10,000 ended at $9,559. The fund peaked on the first day of the test, fell 17.6% to its low on 2022-10-20, and had not recovered by 2026-10-02. The Sharpe ratio was negative 0.11.
Ten of them finished ahead of holding on return and ten had a shallower drawdown. Only five made money. The best was the RSI(2) snapback at 1.6% a year, followed by the EMA 12/26 trend at 1.1%. Two of the templates, the momentum breakout and the dip buyer, never traded at all, so their flat line at $10,000 is a result of cash and not a signal.
Bond funds move in a narrow band. AGG's annualized volatility was 5.8%, its average daily range was 0.35% and its average up and down days were both 0.28%. The best day in the window was 2.14% and the worst was negative 1.63%. Tiny moves make costs and exits matter. A 7% profit target almost never fires on a fund like this, and a 15% trailing stop is wider than most of its drawdowns. The headline runs carry no fees or slippage. For comparison with a stock fund of similar breadth, see VOOV, and for a longer-maturity bond fund see TLT.
| Strategy | CAGR | max DD | Sharpe | trades | win rate | final value |
|---|---|---|---|---|---|---|
| RSI(2) Dip Snapback | 1.6% | −10.6% | 0.42 | 174 | 59% | $10,936 |
| EMA 12/26 Trend | 1.1% | −4.9% | 0.30 | 22 | 36% | $10,632 |
| SMA 10/50 Trend | 0.8% | −6.5% | 0.23 | 18 | 44% | $10,464 |
| Golden Cross (SMA 50/200) | 0.8% | −7.1% | 0.22 | 5 | 40% | $10,453 |
| 200-Day SMA Regime Filter | 0.3% | −6.2% | 0.10 | 25 | 32% | $10,178 |
| 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 |
| RSI(14) Mean Reversion | −0.2% | −11.6% | -0.03 | 15 | 67% (+1 open) | $9,869 |
| Weekly Entry + 7% Target | −0.3% | −16.0% | -0.03 | 60 | 7% (+1 open) | $9,836 |
| 3-Month Momentum Switch | −0.7% | −5.7% | -0.40 | 3 | 0% | $9,582 |
| First-to-Last Day of Month | −0.9% | −18.9% | -0.14 | 69 | 54% (+1 open) | $9,489 |
| SMA-200 Trend + 15% Trailing Stop | −1.1% | −18.8% | -0.19 | 1 | 0% (+1 open) | $9,384 |
| Buy & hold AGG | −0.8% | −17.6% | -0.11 | – | – | $9,559 |
How the 12 templates ranked on AGG
The RSI(2) snapback made 1.6% a year with a 10.6% drawdown and 174 round trips. It ended at $10,936, which is $1,377 above holding. It was invested 43.6% of the time and held for 5.1 days on average. Its win rate was 59%, and each trade was tiny: the average win was 0.43% and the average loss was 0.49%, which gives a profit factor of 1.28. It lost 6.7% in 2022 against 12.7% for the fund, gained 7.5% in 2023 and 6.1% in 2025, and beat holding in five of the six years.
The EMA 12/26 trend made 1.1% with a 4.9% drawdown, the shallowest of any rule that traded, over 22 round trips. It won 36% of them, with an average win of 2.08% and an average loss of 0.72%. It made 0.6% in 2022 while the fund lost 12.7%, which is the main source of its lead. The SMA 10/50 trend made 0.8% with a 6.5% drawdown, and the golden cross made 0.8% on 5 trades with a 7.1% drawdown. The 200-day regime filter made 0.3% with a 32% win rate over 25 trades.
The momentum breakout and the dip buyer show 0% and zero trades. Neither rule found an entry on this fund in the 5.74 years. In both cases the equity curve is flat at $10,000. They finished ahead of holding because holding lost money, and they carry no risk, but they are also not evidence that either rule works on bond funds. The dip buyer page shows the empty trade table.
The RSI(14) mean reversion lost 0.2% with 15 trades and a 67% win rate. Its average win was 1.77% and its average loss was 3.14%, and its worst trade lost 7.4% over 143 days from 2022-01-04. The weekly 7% target lost 0.3% with 60 round trips, a win rate of 7% and a losing streak of 25 trades. Its average win was 7.11% and its average loss was only 0.52%, but the target was reached on only four trades in the window. The 3-month momentum switch lost 0.7% on 3 trades, all losers, and the monthly cycle lost 0.9% with a drawdown of 18.9%.
The trend with a trailing stop lost 1.1% with one closed trade, a loss of 14.3% over 333 days from 2021-10-28 to 2022-09-26. The rule entered on 2023-01-10 and was still holding at the end of the test with a gain of 9.3% on that position. A single trade of this kind decides the rule's whole result on a bond fund.
Year by year and drawdown by template
The year-by-year table is short on drama except for 2022. Holding lost 12.7% that year and gained 5.5% in 2023, 1.3% in 2024 and 7.0% in 2025. It lost 1.6% in 2021 and 2.7% in 2026.
In 2023 and 2025 the fund did well and nearly every rule trailed it. The golden cross lost 2.4% in 2023 while the fund gained 5.5%, because its signal was still pointed away from the fund after the 2022 decline. The 200-day regime filter lost 1.0% in 2023. The EMA 12/26 trend caught 5.9% that year, the best of the trend rules. In 2025 the golden cross made 6.9% against 7.0% for holding, close to level, and the RSI(2) snapback made 6.1%.
The drawdowns tell the same story. Holding had one drawdown of 17.6% that lasted the whole window. The RSI(2) snapback's was 10.6% from 2021-12-22 to 2022-10-19 and recovered on 2023-12-27, more than a year later. The monthly cycle had 18.9% and had not recovered by the end. The weekly 7% target had 16.0% from 2021-08-04 to 2023-10-19 and recovered on 2025-09-15, nearly two years after the trough. A rule that sat in the fund through 2022 carried the loss for years.
The EMA 12/26 trend, by contrast, had three drawdowns between 4.3% and 4.9%, in 2023, 2024 and 2025, and recovered from each within a few months. The SMA 10/50 trend had 6.5% and 5.4%, and the golden cross 7.1% and 4.7%. These are small numbers in dollars, since the fund moves little, but they show that on a bond fund the trend rules were exposed to a series of whipsaws, each costing a few percent, in exchange for avoiding the one large loss in 2022.
Best and worst months, and one trade that ended a day before a rally
The best month for a rule on AGG was almost always November or December 2023. The EMA 12/26 trend made 3.57% in 2023-12 and the SMA 10/50 trend made 3.56%. The 200-day filter also made 3.56% in that month. The trailing stop rule made 4.47% in 2023-11, the weekly 7% target 4.48% and the monthly cycle 4.36%. The fund's own best days in that stretch were 2023-11-14 at 1.21% and 2023-12-13 at 1.26%. Rules that were invested in those weeks collected the rally and rules that were in cash did not.
The worst months cluster in 2022. The RSI mean reversion rule lost 4.06% in 2022-09 and the RSI(2) snapback lost 3.88% in the same month. The trailing stop rule lost 3.78% in 2022-09. The weekly 7% target and the monthly cycle had their worst month in 2022-04, at 3.00% and 3.19%. The fund's worst day, 2022-06-13, was a fall of 1.63%, and 2022-09-26 fell 1.30%.
The RSI(2) snapback shows how thin the margins were. Its worst trade went from 2022-08-30 at 87.20 to 2022-09-29 at 83.29, a loss of 4.48% over 30 days, far longer than the 5.1 days a trade usually lasted. The rule exited on the open of 2022-09-29. The day before, 2022-09-28, was the fund's second best day in the window at 1.60%. The rule did not hold through that rally because its exit trigger is a 2-day RSI above 70, and the rally came after the sale was already queued by the signal. Single days of 1% or more were rare on a fund with an average daily range of 0.35%, and they landed within the same few weeks of 2022 as the worst days.
Day of week shows no pattern worth trading. The average return was negative 0.07% on Mondays, 0.02% on Tuesdays and 0.05% on Wednesdays, with Thursday and Friday both at negative 0.01%.
How each strategy traded AGG
| Strategy | Time in market | Avg hold (days) | Best trade | Worst trade | Profit factor | With 10 bps slippage |
|---|---|---|---|---|---|---|
| RSI(2) snapback | 43.6% | 5 | 1.7% | −4.5% | 1.28 | −4.3% |
| EMA 12/26 trend | 52.7% | 50 | 5.1% | −1.9% | 1.62 | 0.3% |
| SMA 10/50 trend | 51.2% | 60 | 4.7% | −1.9% | 1.50 | 0.2% |
| golden cross | 57.3% | 242 | 4.5% | −2.5% | 2.14 | 0.6% |
| 200-day regime filter | 54.8% | 46 | 4.7% | −1.3% | 1.22 | −0.6% |
| dip buyer | 0.0% | – | – | – | – | 0.0% |
| momentum breakout | 0.0% | – | – | – | – | 0.0% |
| RSI mean reversion | 45.8% | 59 | 3.4% | −7.4% | 1.09 | −0.8% |
| weekly 7% target | 91.6% | 31 | 7.3% | −1.6% | 0.94 | −3.0% |
| 3-month momentum | 10.6% | 75 | −0.1% | −2.7% | – | −0.8% |
| monthly cycle | 95.2% | 28 | 4.5% | −3.3% | 0.87 | −3.2% |
| trend + trailing stop | 80.6% | 333 | −14.3% | −14.3% | – | −1.1% |
What trade counts, holds and costs show on a bond fund
The table of trading statistics splits the rules into two groups. The first group trades often and holds briefly: the RSI(2) snapback with 174 round trips and 5.1 days, the weekly 7% target with 60 round trips, and the monthly cycle with 69. The second group trades a handful of times and holds for months: the golden cross held for 241.8 days on average, with best trades lasting 508 and 418 days for gains of 4.5% and 4.3%.
The cost runs separate the two groups. At 5 basis points the RSI(2) snapback went from 1.6% a year to negative 1.4%, and at 10 basis points to negative 4.3% with a drawdown of 22.6%. For a fund where the average trade earns less than half a percent, a cost of 10 basis points on each side is a large share of the edge. The weekly 7% target went from negative 0.3% to negative 1.9% and then negative 3.0%. The monthly cycle went from negative 0.9% to negative 2.1% and negative 3.2%.
The slow rules held up. The EMA 12/26 trend went from 1.1% to 0.7% at 5 basis points and 0.3% at 10. The SMA 10/50 trend went from 0.8% to 0.5% and 0.2%. The golden cross went from 0.8% to 0.7% and 0.6%. After costs of 10 basis points, the golden cross and EMA trend are the only rules with a positive return of any size, and the RSI(2) snapback has the worst return of the group that traded often.
The cost assumption is a flat figure per trade. AGG trades about $647,965,164 a day, and the median minute bar has 8,686 shares, so a small account meets a deep book. The flat figure may be generous for AGG in the quiet part of the day and tight at the open. These are results for a $10,000 start and do not scale to a large order.
The single trades that decided the slow rules
Several rules on AGG made so few trades that one or two of them set the result. The trend with a trailing stop made a single closed trade, from 2021-10-28 to 2022-09-26, and it lost 14.3%. It sat through the 2022 decline for 333 days before the stop fired. It re-entered on 2023-01-10 and the open position showed a gain of 9.27% at the end of the test, but the closed trade left it at negative 1.1% a year with an 18.8% drawdown.
The golden cross made 5 trades. Its two best were 2024-01-04 to 2025-02-25 for 4.3% and 2025-03-06 to 2026-07-27 for 4.5%. Its worst ran from 2023-02-07 to 2023-08-22 and lost 2.5%. A fifth trade from 2026-08-06 to 2026-08-10 lost 0.12%. The profit factor of 2.14 is the highest of any rule on this page, but it rests on two winning trades, so it says little about how the rule would behave on a different path.
The RSI mean reversion rule won 67% of its 15 trades and still lost 0.2% a year. The average win was 1.77% and the average loss was 3.14%. The worst loss began on 2022-01-04 and ended on 2022-05-27 at negative 7.4%, and a second one from 2022-08-25 to 2022-11-11 lost 4.4%. The best trades, 3.4% from 2022-12-29 and 3.1% from 2022-06-14, were smaller than the two big losses. That is the usual shape of a mean reversion rule with no stop: many small wins and a few large losses taken in a falling market.
Three rules were still holding a position on 2026-10-02: the RSI mean reversion from 2026-07-21 at negative 2.7%, the weekly 7% target from 2026-09-28 at negative 0.14%, and the monthly cycle from 2026-10-01 at 0.29%. Those open results are marked to the last close and are not in the closed trade counts.
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 |
Calendar years
| Year | Return |
|---|---|
| 2021 | −1.6% |
| 2022 | −13.0% |
| 2023 | 5.6% |
| 2024 | 1.4% |
| 2025 | 7.2% |
| 2026 (part) | −2.8% |
Biggest single days
| Best day | Move |
|---|---|
| 2022-11-10 | 2.1% |
| 2022-09-28 | 1.6% |
| 2023-12-13 | 1.3% |
| 2023-11-14 | 1.2% |
| 2023-03-10 | 1.2% |
| Worst day | Move |
|---|---|
| 2022-06-13 | −1.6% |
| 2022-09-26 | −1.3% |
| 2025-04-07 | −1.2% |
| 2022-03-02 | −1.2% |
| 2024-04-10 | −1.2% |
Average return by calendar month
| Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0.4% | −0.5% | −0.4% | −0.7% | 0.2% | 0.3% | 0.7% | −0.1% | −1.3% | −0.9% | 2.1% | 0.1% |
Most and least correlated funds
| Most correlated | Least correlated | ||
|---|---|---|---|
| BND | 1.00 | TBF | -0.91 |
| IEF | 0.97 | KMLM | -0.44 |
| IGIB | 0.96 | USDU | -0.39 |
| IEI | 0.94 | CTA | -0.36 |
| UST | 0.92 | RINF | -0.35 |
Why a bond fund was hard for these rules
AGG rose on 49.3% of days, and the average up day and down day were both 0.28%. The lag-1 autocorrelation was negative 0.01. Over the full window the fund was above its 200-day average on 63.6% of sessions and crossed it 50 times. That is a lot of crossings for a fund with 5.8% volatility, and it explains why the 200-day regime filter made 25 trades and won only 32% of them. A slow average on a quiet fund produces false signals.
The fund lost 13.0% in the 2022 calendar year on daily closes, then gained 5.6% in 2023, 1.4% in 2024 and 7.2% in 2025. It lost 1.6% in 2021 and 2.8% in the partial year 2026. The drawdown from 2021-01-04 to 2022-10-20 was 18.0% on closes. The longest drawdown lasted 1,443 sessions, which is the whole window, so AGG finished the test still below its starting price.
That shape rewarded any rule that was out of the fund during 2022. The EMA 12/26 trend, the SMA 10/50 trend and the golden cross all had a small gain or a small loss in 2022 against a loss of 12.7% for holding. The RSI(2) snapback lost 6.7%. The rules that lost most in 2022 were the ones invested through it: the RSI(14) mean reversion at 8.7%, the monthly cycle at 13.8% and the trend with a trailing stop at 13.8%.
The mean reversion signals carried almost no edge. After RSI(2) closed below 10, on 167 sessions, the median 5-day return was 0.05% against a baseline of negative 0.01%, and the median 20-day return was 0.12% against 0.07%. After the 14-day RSI closed below 30, on 59 sessions, the median 5-day return was negative 0.04% and the 20-day return was negative 0.90%. A washout in a bond fund in this window was not followed by a bounce. The RSI(2) snapback's small edge came from being out of the fund for most days, not from the signal.
The return composition is unusual. The overnight log return was 6.82% and the intraday log return was negative 11.45%, so the fund's gains came between the close and the next open, and it lost ground during the session. This is why the RSI(2) rule, which fills at the open, did better than its signal quality suggests. The average overnight gap was 0.21%.
By calendar month, November averaged 2.08%, July 0.73% and September negative 1.31%, with October at negative 0.95%. Each month has 5 or 6 observations. The fund's correlation to TLT was 0.92, to SPY 0.22 and to QQQ 0.21, with beta to TLT of 0.35. It was most correlated with BND at 1.00, IEF at 0.97 and IGIB at 0.96, and inversely with TBF at negative 0.91.
How AGG compares with other bond funds
The RSI(2) snapback was also the best template on BND at 1.4% against negative 0.8% for holding, on TLT at 1.0% against negative 8.2%, and on IEF at 1.8% against negative 2.3%. On IEI the trend with a trailing stop was best at 1.4%, and on IGIB the EMA 12/26 trend made 2.4% against 0.2% for holding. On SGOV, a Treasury bill fund, the golden cross matched holding at 3.2%.
The pattern is consistent across the bond group. In a window where bond funds lost money, a rule that was in cash for most days beat holding by a small margin, and the most active rule gave the margin back when costs were added. None of the rules turned a flat bond fund into a high-return result. The window is 5.74 years, begins at the peak of the fund, and includes the 2022 rate shock, so the sample is one regime. None of the figures is a forecast.
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 AGG?
Of the 12 templates tested on AGG over 2021-01-04 to 2026-10-02, the strongest by CAGR was RSI(2) snapback at 1.6% (max drawdown 10.6%), versus −0.8% 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 AGG?
10 of 12 templates beat AGG buy-and-hold (−0.8% CAGR) on this window; 10 of 12 had a shallower maximum drawdown than holding (17.6%).
Did any strategy beat buy-and-hold on AGG?
Ten of the 12 did, but only five made money. Holding lost 0.8% a year from 2021-01-04 to 2026-10-02. The RSI(2) snapback made 1.6% and the EMA 12/26 trend made 1.1%.
What was AGG's maximum drawdown?
Holding fell 17.6% from the peak on 2021-01-04 to the low on 2022-10-20 and had not recovered by 2026-10-02. The EMA 12/26 trend had the shallowest drawdown of the rules that traded, at 4.9%.
Why did the momentum breakout and dip buyer not trade on AGG?
Neither rule produced an entry in the window, so both show zero trades and a flat $10,000. AGG's daily range of 0.35% is small, and the entries need larger moves.
Does RSI(2) mean reversion work on AGG?
It made 1.6% a year with 174 trades and a 59% win rate, but each trade averaged under half a percent. At 10 basis points of slippage the return fell to negative 4.3%.
How volatile is AGG?
Annualized volatility was 5.8% and the average daily range was 0.35%. The best day was 2.14% on 2022-11-10 and the worst was negative 1.63% on 2022-06-13.
How did AGG do in 2022?
The fund lost 13.0% on daily closes, and holding lost 12.7% on the equity curve. The trend rules lost between 0.6% and 1.6% or gained slightly, while the monthly cycle lost 13.8%.
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.