Learn › Strategies › 200-Day SMA Regime Filter › IGIB

200-Day SMA Regime Filter on IGIB

iShares 5-10 Year Investment Grade Corporate Bond ETF: investment-grade corporate credit. Backtest 2021-01-04 to 2026-10-02, $10,000 starting capital, computed by the same engine that runs live DeployQuant strategies.

Result: 200-day regime filter on IGIB turned $10,000 into $10,808 (8.1% total, 1.4% CAGR): it beat buy-and-hold by 1.2% per year, with a maximum drawdown 14.7 points shallower than holding (5.4% vs 20.1%).

The 200-day regime filter on IGIB ended at $10,808 from $10,000, a CAGR of 1.36%. Holding the fund ended at $10,121, a CAGR of 0.21%. The rule owned the fund when yesterday's close was above its 200-day average and held cash when it was below. It made 26 round trips from 2021-01-04 to 2026-10-02, won 10 of them, a win rate of 38%, and had a profit factor of 2.12. The maximum drawdown was 5.44% against 20.13% for buy-and-hold, and the Sharpe ratio was 0.36 against 0.07. The headline run has no fees or slippage.

IGIB is the iShares 5-10 Year Investment Grade Corporate Bond ETF, investment-grade corporate credit. Its annualized volatility is 6.29%, which is low next to equity funds, but it lost 20.62% from its high in August 2021 to October 2022 when rates rose. That decline is what the filter was built to sidestep, and it did: the rule's drawdown was a quarter of the size.

The win rate of 38% looks poor, and the profit factor of 2.12 shows why that figure misleads. The average winner was 1.59% and the average loser was -0.46%. A few long trades made nearly all of the profit, and many short trades lost small amounts. The rule held a position on 57.1% of days.

On this fund the template ranks 4th of the 12 in the library, and IGIB ranks 31st of 59 funds for this rule. The median CAGR for the rule across all 59 funds is 1.84%, and across the 7 bond funds it is 0.37%, so IGIB is above the bond median. The 200-day regime filter page has the full table, and the IGIB fund page ranks the 12 templates on this fund.

1.4%CAGR
0.2%buy & hold CAGR
−5.4%max drawdown
0.35Sharpe ratio
26round trips
38%win rate
■ 200-day regime filter   ■ buy & hold, $10,000 invested 2021-01-04

Year by year

Year200-day regime filterbuy & hold
2021−1.6%−1.6%
2022−1.7%−13.6%
20233.6%8.9%
20243.4%3.4%
20256.0%9.3%
2026−1.6%−3.3%

How each year went

IGIB lost 1.6% in 2021 on a buy-and-hold basis, lost 13.6% in 2022, made 8.9% in 2023, 3.4% in 2024, 9.3% in 2025 and lost 3.3% in 2026, which is a partial year. The rule made -1.6%, -1.7%, 3.6%, 3.4%, 6% and -1.6%. It matched holding in 2021 and 2024, beat it in 2022 by 11.9 points and in 2026 by 1.7 points, and trailed in 2023 and 2025.

2021 was a tie at -1.6%. The rule held cash from January to October and then began a series of short trades. The first was a 1-day trade from 2021-10-28 at $48.79 that lost 0.35%. Seven round trips closed in 2021 and 1 won. Each was between 1 and 14 days long. Six lost up to 0.43% and one made 0.02%. The fund moved sideways just above and below its 200-day line, which is the clustering of buy-sell pairs the strategy's caveat describes.

2022 is the year that matters. The fund lost 13.6%, the rule lost 1.7%. It closed 2 round trips, both losers, and was in cash for almost all of the year. The monthly table shows zeros from February to November. The January loss was 0.4% and the December loss 1.3%. The January loss came from the position carried over from 2021-12-31, which was sold on 2022-01-03 at a loss of 0.59%. The December loss came from a 6-day trade from 2022-12-14 at $42.86 to 2022-12-20 at $42.29, which lost 1.33% and was the worst trade of the run. Between the two, the rule was in cash while the fund fell to its low on 2022-10-20. This is the benefit of the filter in this window, and it accounts for most of the gap to holding.

2023 made 3.6% against 8.9%. The year started with a run of whipsaws. January made 2.08%, February lost 2.75%, March made 1.4%, April 0.74%, May lost 1.2%, August lost 1.86% and September lost 0.9%. The strongest part came at the end. A 1-day trade on 2023-11-15 made 0.37%, and the rule bought again on 2023-11-17 at $43.33. That trade is the longest of the run and is covered below. November made 1.81% and December 4.02%, the best month of the run.

2024 made 3.4%, the same as holding, because the rule held the fund the entire year. 2025 made 6% against 9.3%. The trade bought on 2023-11-17 closed on 2025-01-13 at $46.81, and the rule re-entered three days later, closed on 2025-04-09, bought on 2025-04-10 and lost 1.13% in a day, and then bought again on 2025-04-15 at $47.93. That last trade ran for 346 days and made 6.55%. In 2026 the rule lost 1.6% against 3.3% for holding, with 7 round trips and 5 wins, all very small.

Month by month

YearJanFebMarAprMayJunJulAugSepOctNovDec
20210.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%−0.3%−0.4%−0.9%
2022−0.4%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%−1.3%
20232.1%−2.8%1.4%0.7%−1.2%0.0%0.4%−1.9%−0.9%0.0%1.8%4.0%
20240.0%−1.3%1.3%−2.2%2.0%0.7%2.5%1.6%1.6%−2.4%1.3%−1.5%
2025−0.1%1.9%0.0%−1.9%0.4%1.8%0.1%1.3%1.2%0.3%0.9%−0.1%
20260.2%1.3%−3.0%0.6%0.1%0.0%−0.9%0.1%0.0%0.0%––

Months in cash and months invested

Most of 2021 and 2022 show zero. The rule held no position from January to September 2021, from February to November 2022, in October 2023 and from September 2026. Exposure over the window was 57.1% of days.

The best month was December 2023 at 4.02%, then January 2023 at 2.08%, July 2024 at 2.53%, February 2025 at 1.92% and November 2023 at 1.81%. The worst were March 2026 at -2.95%, February 2023 at -2.75%, October 2024 at -2.37%, April 2024 at -2.22% and April 2025 at -1.92%. Holding's best month was November 2023 at 5.68% and its worst was September 2022 at -4.67%, a month the rule sat out.

The pattern in the table is that the rule's monthly losses are small and its gains are larger when it is in a long trade. Between the two long trades from 2023-11-17 to 2025-01-13 and from 2025-04-15 to 2026-03-27, the rule held the fund through monthly swings of up to 2.5% in either direction, and that is where most of its profit came from.

The fund's calendar-month averages come from 5 or 6 observations each. November averaged 2.58% and September -1.44%, October -0.96%. They describe this window only. They line up with the rule's own best month, in November and December 2023, and with the weak autumn of 2022 that the rule avoided.

Every trade

200-day regime filter on IGIB made 26 closed round trips, an average hold of 47 days, an average winner of 1.59%, an average loser of −0.46%, a profit factor of 2.12, a longest losing streak of 8. It held a position at the close on 57.1% of trading days.

EntryEntry priceExitExit priceReturnDays held
2021-10-28$48.792021-10-29$48.62−0.3%1
2021-11-03$48.812021-11-04$48.820.0%1
2021-11-05$48.992021-11-11$48.78−0.4%6
2021-12-06$48.832021-12-07$48.70−0.3%1
2021-12-08$48.682021-12-09$48.67−0.0%1
2021-12-14$48.732021-12-15$48.61−0.3%1
2021-12-16$48.822021-12-30$48.74−0.2%14
2021-12-31$48.822022-01-03$48.53−0.6%3
2022-12-14$42.862022-12-20$42.29−1.3%6
2023-01-09$42.812023-02-22$42.32−1.1%44
2023-02-24$42.202023-02-27$42.370.4%3
2023-03-06$42.492023-03-07$42.37−0.3%1
2023-03-13$42.922023-08-16$42.88−0.1%156
2023-08-24$42.982023-08-25$42.91−0.2%1
2023-08-30$43.362023-09-06$42.96−0.9%7
2023-11-15$43.022023-11-16$43.180.4%1
2023-11-17$43.332025-01-13$46.818.0%423
2025-01-16$47.212025-04-09$47.350.3%83
2025-04-10$47.952025-04-11$47.41−1.1%1
2025-04-15$47.932026-03-27$51.076.5%346
2026-03-31$51.602026-05-18$51.700.2%48
2026-05-22$51.862026-06-09$51.870.0%18
2026-06-10$51.922026-07-14$51.87−0.1%34
2026-07-16$51.972026-07-21$51.86−0.2%5
2026-08-05$51.972026-08-07$51.990.0%2
2026-08-26$51.952026-08-28$51.960.0%2

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 26 trades

The trades split into two groups. Two long trades made nearly all of the money, and 24 short ones netted close to zero.

The long trades were 2023-11-17 to 2025-01-13, bought at $43.33 and sold at $46.81 for 8.03% over 423 days, and 2025-04-15 to 2026-03-27, bought at $47.93 and sold at $51.07 for 6.55% over 346 days. A third long trade, from 2023-03-13 to 2023-08-16, held 156 days and lost 0.09%. A fourth, from 2025-01-16 to 2025-04-09, held 83 days and made 0.3%.

The short trades are the whipsaws. Seven in 2021 and seven in 2026 have a median hold of a few days. Nine of the 26 lasted a single day. The 2026 group is the most extreme: trades of +0.19% over 48 days, +0.02% over 18, -0.1% over 34, -0.21% over 5, +0.04% over 2 and +0.02% over 2. Five of the seven won, and they added up to almost nothing.

The best five trades were 8.03%, 6.55%, 0.4%, 0.37% and 0.3%. The worst five were -1.33%, -1.14%, -1.13%, -0.92% and -0.59%. The worst of them, -1.14%, was a 44-day trade from 2023-01-09 at $42.81 to 2023-02-22 at $42.32. The 1-day trade from 2025-04-10 at $47.95 to 2025-04-11 at $47.41 lost 1.13%, and it fell inside the sell-off in April 2025.

The median return was -0.1% and the median hold was 5 days. The average hold was 46.5 days, pulled up by the long trades. The longest losing streak was 8 and the longest winning streak was 3. The rule's profit comes from trade size, not from trade count. With 10 winners out of 26, the two big ones carried the whole result. A different window with no long trend in IGIB would have left only whipsaws.

There were 52 fills for 26 round trips, and no position was open at the end of the test.

Largest drawdowns

PeakLow pointDepthDays to lowRecoveredDays to recover
2021-10-272023-11-15−5.4%7492023-12-2742
2024-10-012025-04-21−4.9%2022025-08-04105
2026-02-272026-08-06−3.4%160not yet–

Buy-and-hold's deepest drawdown ran from 2021-08-03 to 2022-10-20 and reached −20.1%.

Drawdowns

The deepest drawdown was 5.44%, from a peak on 2021-10-27 to a low on 2023-11-15, 749 days later. It recovered on 2023-12-27, 42 days after the low. The peak is one day before the rule's first trade, so the drawdown covers the whole stretch of whipsaw losses in 2021, 2022 and 2023 added together, and it was recovered by the long trade that began on 2023-11-17. The second drawdown was 4.93%, from 2024-10-01 to 2025-04-21, recovered by 2025-08-04. The third was 3.41%, from 2026-02-27 to 2026-08-06, not recovered.

Buy-and-hold had a 20.13% drawdown from 2021-08-03 to 2022-10-20, 443 days to the low and 980 days to recover, on 2025-06-26. Its second was 4.78% from 2026-02-27 to 2026-09-30, not recovered, and its third was 4% in early 2021. The rule's maximum drawdown was 14.69 points shallower than holding, and the ending value was $687 higher.

The three drawdowns of the rule are all small and slow. They are the cumulative effect of small losses, not a single fall. A bond fund with 6.29% volatility does not hand a rule a sharp loss, and the filter did not need to stop one. Its work was in 2022, when it stayed out of the fund's one large decline.

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.4%−5.4%$10,8080.35
5 basis points0.9%−6.9%$10,5380.24
10 basis points0.5%−8.3%$10,2770.14

What slippage did

At 5 basis points of slippage per fill, the CAGR was 0.92%, the maximum drawdown 6.87% and the final value $10,538, with a Sharpe ratio of 0.245. At 10 basis points the CAGR was 0.48%, the maximum drawdown 8.27%, the final value $10,277 and the Sharpe ratio 0.137.

The rule made 52 fills, many of them on one-day trades that make or lose a few hundredths of a percent. Costs apply to each, and the result falls from 1.36% to 0.48% at the higher cost. It still ended above buy-and-hold's CAGR of 0.21% at both cost levels. IGIB's average daily dollar volume is $90,382,863 and its median minute volume is 1,684 shares, so it is far less liquid than a large equity fund, and its spread can be wider than on one.

The edge of the strategy on this fund is concentrated in 2 trades and one avoided decline. Costs reduce the small trades into losses and leave the large ones alone, which is why the result drops by a modest amount and does not turn negative.

Changing the parameters

VersionCAGRMax drawdownRound tripsWin rateFinal value
Published rules1.4%−5.4%2638%$10,808
100-day SMA1.4%−6.4%3941%$10,826
150-day SMA0.5%−8.0%3023%$10,278
250-day SMA2.3%−4.7%1217%$11,401

Other average lengths on IGIB

Three variants were tested. A 100-day average made 1.39% a year with a 6.39% drawdown, 39 trades and 16 wins, ending at $10,826. A 150-day average made 0.48% with a 7.98% drawdown, 30 trades and 7 wins, ending at $10,278. A 250-day average made 2.31% with a 4.65% drawdown, 12 trades and 2 wins, ending at $11,401, with the highest Sharpe ratio at 0.582.

The published 200-day rule made 1.36%. The 100-day variant matched it with more trades. The 150-day variant did worse, and the 250-day variant did better on both return and drawdown, with the fewest trades. The 250-day average traded less because a longer average is crossed less often, and with 12 trades it avoided most of the short whipsaws. Its two winning trades produced the whole result.

The spread is wider than the headline suggests. From 0.48% to 2.31% is a large range for changes in the average length, and the ordering is not smooth: 100 days, 150 days and 200 days are not monotonic. That non-monotonic pattern is typical of a small-sample result, where one crossing date moves a trade from a loss to a win. The variants show that the published number sits in a range of outcomes rather than at a peak, and they do not identify a better setting for another window.

How IGIB behaved

MeasureIGIB
Data in this test2021-01-04 to 2026-10-02 (1444 sessions)
Total return, buy and hold1.3%
Annualized volatility6.3%
Deepest drawdown−20.6% (2021-08-03 to 2022-10-20)
Up days50.0%
Average daily range0.37%
Average overnight gap0.21%
Correlation to SPY0.35
Correlation to QQQ0.34
Correlation to TLT0.84
Sessions above the 200-day average66.3%
Crossings of the 200-day average52
Falls of 10% or more from a 20-day high0

How IGIB behaved

IGIB made 1.26% in total over the window, a CAGR of 0.22%, with annualized volatility of 6.29%. Its maximum drawdown was 20.62% from 2021-08-03 to 2022-10-20, recovered on 2025-06-26, and its longest drawdown ran for 977 sessions. Its calendar-year returns were -1.62%, -13.97%, 9.21%, 3.52%, 9.56% and -3.4%.

It closed above its 200-day average on 66.27% of sessions and crossed it 52 times. A fund that is above the line two thirds of the time and crosses it 52 times has a line that price keeps visiting. The rule converted those crossings into 26 round trips, since a buy needs the prior close above the average and a sell needs it below. The crossings concentrated in 2021, early 2023 and 2026, when the fund was flat.

It rose on 49.97% of days. The average up day was 0.3% and the average down day was -0.31%. The average intraday range was 0.37% and the average overnight gap 0.21%. The overnight log return was 17.9% and the intraday log return was -16.67%, so the fund's gain came entirely overnight and its daytime moves net lost. A rule that buys at the open and sells at the open pays for the intraday part when it holds.

The best days were 2022-11-10 at 2.66%, 2022-09-28 at 1.7% and 2022-06-15 at 1.47%. The worst were 2022-06-13 at -1.76%, 2022-09-26 at -1.53% and 2021-02-25 at -1.48%. The fund had no falls of 10% or more from a 20-day high. Its decline was slow, which suits a filter that exits when price falls below a long average.

IGIB's correlation to SPY was 0.35 and to QQQ 0.34, and to TLT 0.84. It was most correlated with AGG and BND at 0.96 and IEF at 0.92, and least correlated with TBF at -0.84. RSI(14) fell below 30 on 66 sessions, and the median 20-day return after those was -1.91% against a baseline of 0.22%. Oversold readings in this fund were followed by further declines, which is consistent with a rate-driven trend and favours a trend filter over a mean-reversion rule.

The rules

Own the asset when price closes above its 200-day average; hold cash when it closes below.

  1. WHEN the market opens · IF not invested AND yesterday's close > SMA(200) · THEN buy with 98% of the sleeve
  2. WHEN the market opens · IF invested AND yesterday's close < SMA(200) · THEN sell the whole position

One rule and one number. Price above the 200-day moving average has historically coincided with better returns and lower volatility than price below it. This template uses no crossovers and no oscillators, only which side of the long-term average the price is on.

Good for: a first systematic strategy, simple enough to audit every trade.
Watch out: price whips around the 200-day line during volatile bottoms, generating clusters of buy-sell pairs. Some traders add a small buffer band to reduce churn.

How the rule compares with the other templates on IGIB

The 200-day filter ranked 4th of 12 on IGIB. EMA 12/26 ranked first at 2.35% with a 5.33% drawdown, golden cross second at 1.84% with 5.63%, and SMA 10/50 third at 1.73% with 6.63%. This rule made 1.36% with 5.44%, and RSI(2) snapback made 1.33% with 11.79%. 3-month momentum made 0.25%, trend + trailing stop 0.06%, and dip buyer and momentum breakout 0% with no trades. Weekly 7% target made -0.05%, monthly cycle -0.27% and RSI mean reversion -0.48%.

The top four were all trend rules, and they had drawdowns between 5.33% and 6.63%. The rules that held the fund most, the monthly cycle and weekly target, had drawdowns of 20.89% and 17.61%. On a fund with a one-way decline followed by a slow recovery, the rules that left during the decline came out ahead, and the faster crossovers did slightly better than the 200-day rule because they re-entered sooner.

Among the 7 bond funds, the 200-day rule made 3.22% on SGOV, 1.36% on IGIB, 1.03% on IEI, 0.37% on BND, 0.31% on AGG, -1.53% on IEF and -7.58% on TLT. Drawdowns widened with duration, from 0.02% on SGOV to 40.21% on TLT. IGIB's credit exposure sits in the middle of that range.

The test stops at one fund and one window of 5.74 years, with daily decisions and costs only in the separate runs. Most of the rule's edge came from one rate-driven decline in 2022 and two long trades afterwards. A window without a decline would not show it. The results are hypothetical and are not advice.

Run 200-day regime filter on IGIB 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 200-day regime filter beat buy-and-hold on IGIB?

Over 2021-01-04 to 2026-10-02, 200-day regime filter on IGIB returned 1.4% annualized vs 0.2% for buy-and-hold: it beat buy-and-hold by 1.2% per year, with a maximum drawdown 14.7 points shallower than holding (5.4% vs 20.1%).

How many trades did it make?

26 completed round trips over 5.7 years (52 fills), with 38% of round trips closing profitably.

Why the 200-day average specifically?

It approximates a year of trading days and has been studied across decades of data. It is not the best window for every asset. The per-ETF backtests here show where it helped and where it didn't.

Did the 200-day regime filter beat buy-and-hold on IGIB?

Yes. The rule made 1.36% a year and ended at $10,808, while buy-and-hold made 0.21% and ended at $10,121. The maximum drawdown was 5.44% against 20.13%. The rule beat holding in 2022 and 2026, matched it in 2021 and 2024, and trailed in 2023 and 2025.

Why is the win rate only 38%?

Most of the 26 trades were short whipsaws that lost a few hundredths of a percent. Two long trades made 8.03% and 6.55%. The average winner was 1.59% and the average loser was -0.46%, which gives a profit factor of 2.12.

How did the rule handle 2022?

It stayed in cash for almost the whole year. The fund lost 13.6% and the rule lost 1.7%, from two small losing trades in January and December. The monthly table shows zeros from February to November 2022.

What do trading costs do to the result?

At 5 basis points of slippage per fill the CAGR was 0.92% and the final value was $10,538. At 10 basis points it was 0.48% and $10,277. Both stayed above the 0.21% for buy-and-hold, because the profit came from two long trades.

Is a 200-day average the best length for IGIB?

Not in the three alternatives tested. A 250-day average made 2.31% with a 4.65% drawdown and only 12 trades, while 100 days made 1.39% and 150 days made 0.48%. The differences come from a few crossing dates.

Which strategy worked best on IGIB?

EMA 12/26 trend ranked first at 2.35% with a 5.33% drawdown, followed by golden cross at 1.84% and SMA 10/50 at 1.73%. The 200-day filter ranked 4th at 1.36%. Dip buyer and momentum breakout made no trades.

Related

200-Day SMA Regime Filter on all 59 ETFsfull results table All strategies on IGIB12 templates compared RSI(14) Mean Reversion on IGIBsame ETF, different rulesRSI(2) Dip Snapback on IGIBsame 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.