200-Day SMA Regime Filter on TLT
iShares 20+ Year Treasury Bond ETF: long-duration Treasuries, one of the most rate-sensitive bond ETFs. Backtest 2021-01-04 to 2026-10-02, $10,000 starting capital, computed by the same engine that runs live DeployQuant strategies.
The 200-day regime filter holds an asset while yesterday's close is above its 200-day simple average and holds cash when the close is below. It uses one number and nothing else. Applied to TLT, the iShares 20+ Year Treasury Bond ETF, from 2021-01-04 to 2026-10-02, it turned $10,000 into $6,360. That is a CAGR of 7.58% negative, a max drawdown of 40.21% and a Sharpe ratio of 1.04 negative. Buy-and-hold on TLT ended at $6,106, a CAGR of 8.23% negative, with a max drawdown of 42.77% and a Sharpe ratio of 0.52 negative.
The rule finished ahead of holding by 0.65 points of CAGR and by 2.56 points of drawdown, and it is still a large loss. It made 48 round trips and won 7 of them, a 15% win rate. The average win was 1.21% and the average loss was 1.33%, and the profit factor was 0.14. The longest losing streak was 12 trades. The rule was invested 30.3% of the time and held each position 13.5 days on average.
On TLT this template ranks 11th of the 12 tested, ahead of only the monthly cycle at 8.08% negative. Across the 59 funds the rule ranks TLT 51st, and its median CAGR over all 59 is 1.84%. The best rule on TLT is the RSI(2) snapback at 0.96%, which is the only template with a positive CAGR on this fund. The results are a backtest of one window with no fees in the headline run.
Year by year
| Year | 200-day regime filter | buy & hold |
|---|---|---|
| 2021 | 2.3% | −4.4% |
| 2022 | −4.2% | −30.2% |
| 2023 | −17.7% | 2.7% |
| 2024 | −12.3% | −7.7% |
| 2025 | −6.0% | 4.0% |
| 2026 | −4.4% | −7.7% |
The year-by-year record
The rule returned 2.3% in 2021, 4.2% negative in 2022, 17.7% negative in 2023, 12.3% negative in 2024, 6% negative in 2025 and 4.4% negative in 2026 to date. Holding returned 4.4% negative in 2021, 30.2% negative in 2022, 2.7% in 2023, 7.7% negative in 2024, 4% in 2025 and 7.7% negative in 2026.
The rule beat holding in 2021, 2022 and 2026. The 2022 gap is the largest in its favour. Holding lost 30.2% as long rates rose, and the rule lost 4.2%, a difference of 26 points. That is the job the filter is designed to do, and it did it. The rule made only 2 round trips in 2022, and the monthly table shows 0 for every month from 2022-02 to 2023-01, so the strategy sat in cash through most of the decline. The rule lost 4.23% in 2022-01, the month before it went to cash.
In 2023 the picture reversed. Holding returned 2.7% and the rule lost 17.7%, the largest gap against it at 20.4 points. The rule made 16 round trips in 2023 and won 2 of them. It lost every month from 2023-02 to 2023-07, with a worst month of 6.97% negative in 2023-05, and then sat in cash from 2023-08 to 2023-11. The fund fell and rebounded around the average often enough that the rule bought near the top of each short bounce and sold after the next drop.
In 2024 the rule lost 12.3% against 7.7% for holding, with 13 round trips and 2 wins. In 2025 it lost 6% against a 4% gain for holding, with 7 round trips and no wins. In 2026 it lost 4.4% against 7.7% and won 2 of 9 trades. In each of 2023, 2024 and 2025 it won two trades or fewer. A strategy that loses through repeated small stops is working as designed in a trending decline and fails in a choppy one, and TLT after 2022 was choppy.
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% | 1.7% | 2.7% | −2.0% |
| 2022 | −4.2% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% | 0.0% |
| 2023 | 0.0% | −2.8% | −2.3% | −2.1% | −7.0% | −2.0% | −4.0% | 0.0% | 0.0% | 0.0% | 0.0% | 1.2% |
| 2024 | −3.8% | −3.0% | 0.5% | −3.3% | −3.1% | −0.4% | 3.1% | 2.1% | 1.9% | −5.8% | 2.1% | −2.9% |
| 2025 | 0.0% | 1.1% | −2.9% | −3.2% | 0.0% | 0.0% | 0.0% | −1.9% | 1.9% | 1.4% | 0.2% | −2.6% |
| 2026 | −0.0% | 4.5% | −5.9% | −0.4% | 0.0% | −1.5% | −0.8% | 0.0% | 0.0% | 0.0% | – | – |
Months in cash and months in the fund
The monthly table shows 0 for every month from 2021-01 to 2021-09, so the rule did not enter until 2021-10. TLT's close sat below its 200-day average for the first nine months of the window, and the rule waited. Its first trade started on 2021-10-19. Its first two months of exposure, 2021-10 at 1.7% and 2021-11 at 2.69%, were positive, and 2021-12 lost 2.02%.
The worst month of the window was 2023-05 at 6.97% negative, and the worst months after it were 2026-03 at 5.94% negative, 2024-10 at 5.76% negative and 2023-07 at 4.01% negative. The best month was 2026-02 at 4.45%, followed by 2024-07 at 3.07% and 2021-11 at 2.69%. Holding's best month was 2023-11 at 9.49%, a month in which the rule was flat, and its worst was 2022-04 at 9.19% negative, a month in which the rule was also flat.
The pattern of zeros is informative. The rule was flat for all of 2022 after January, for 2023-08 to 2023-11, for 2025-05 to 2025-07 and for most of 2026-05, 2026-08 and 2026-09. It avoided the worst month of the fund and also the best. Flat months are where the filter earns its drawdown advantage, and the loss comes from the months in between when it entered and was stopped out.
Every trade
200-day regime filter on TLT made 48 closed round trips, an average hold of 14 days, an average winner of 1.21%, an average loser of −1.33%, a profit factor of 0.14, a longest losing streak of 12. It held a position at the close on 30.3% of trading days.
Best 10 round trips
| Entry | Entry price | Exit | Exit price | Return | Days held |
|---|---|---|---|---|---|
| 2024-07-03 | $82.58 | 2024-10-22 | $84.79 | 2.7% | 111 |
| 2025-09-04 | $82.86 | 2026-03-16 | $84.83 | 2.4% | 193 |
| 2023-03-14 | $90.80 | 2023-03-15 | $91.95 | 1.3% | 1 |
| 2024-11-06 | $82.38 | 2024-11-07 | $83.27 | 1.1% | 1 |
| 2021-10-25 | $120.18 | 2022-01-05 | $120.89 | 0.6% | 72 |
| 2026-04-14 | $84.68 | 2026-04-17 | $85.06 | 0.5% | 3 |
| 2023-07-19 | $89.00 | 2023-07-21 | $89.02 | 0.0% | 2 |
| 2026-04-06 | $84.53 | 2026-04-13 | $84.45 | −0.1% | 7 |
| 2026-04-20 | $85.12 | 2026-04-22 | $85.00 | −0.1% | 2 |
| 2026-06-22 | $84.98 | 2026-06-23 | $84.80 | −0.2% | 1 |
Worst 10 round trips
| Entry | Entry price | Exit | Exit price | Return | Days held |
|---|---|---|---|---|---|
| 2025-04-02 | $86.31 | 2025-04-08 | $83.50 | −3.3% | 6 |
| 2024-05-16 | $83.14 | 2024-05-29 | $80.47 | −3.2% | 13 |
| 2023-12-14 | $86.83 | 2024-01-17 | $84.09 | −3.2% | 34 |
| 2023-02-02 | $93.79 | 2023-02-06 | $91.07 | −2.9% | 4 |
| 2023-05-11 | $91.45 | 2023-05-16 | $88.86 | −2.8% | 5 |
| 2023-07-03 | $89.73 | 2023-07-06 | $87.42 | −2.6% | 3 |
| 2023-05-03 | $92.05 | 2023-05-09 | $89.83 | −2.4% | 6 |
| 2026-06-25 | $86.25 | 2026-07-02 | $84.40 | −2.1% | 7 |
| 2023-03-20 | $92.10 | 2023-03-22 | $90.27 | −2.0% | 2 |
| 2023-04-25 | $92.01 | 2023-05-02 | $90.19 | −2.0% | 7 |
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.
Winners, losers and the long holds
Only 7 of the 48 trades won, and the winners were small. The best trade gained 2.68% from 2024-07-03 to 2024-10-22, a hold of 111 days. The second best gained 2.38% from 2025-09-04 to 2026-03-16 over 193 days, the longest hold of the backtest. The third gained 1.27% from 2023-03-14 to 2023-03-15, a single day. The fourth gained 1.08% from 2024-11-06 to 2024-11-07, and the fifth gained 0.59% from 2021-10-25 to 2022-01-05 over 72 days. Prices in the trade list are adjusted for splits and dividends.
The worst trade lost 3.26% from 2025-04-02 to 2025-04-08, entering at 86.31 and exiting at 83.5 over 6 days. The next worst lost 3.21% from 2024-05-16 to 2024-05-29 and 3.16% from 2023-12-14 to 2024-01-17. Two more losses of 2.9% and 2.83% fell in February and May 2023. The largest single loss was 3.26%, and the largest gain 2.68%. A rule with trade results this narrow, and a win rate of 15%, can only lose.
The first trade of the window lost 0.99% from 2021-10-19 to 2021-10-21 over 2 days. The last trade closed on 2026-07-02 with a loss of 2.14% after entering on 2026-06-25 at 86.25. No position was open at the end of the window.
The yearly record of wins is thin. The rule won 0 of 1 trades in 2021, 1 of 2 in 2022, 2 of 16 in 2023, 2 of 13 in 2024, 0 of 7 in 2025 and 2 of 9 in 2026. Almost every winning trade was either a long hold in a stretch when TLT trended up, such as the 111 and 193 day holds, or a short bounce of a day or two. The rule has no way to tell the two apart at entry. Since it enters on a close above the average and exits on a close below, a bounce of a few days and the start of a longer trend look the same on the day of the buy.
Largest drawdowns
| Peak | Low point | Depth | Days to low | Recovered | Days to recover |
|---|---|---|---|---|---|
| 2021-12-03 | 2026-07-02 | −40.2% | 1672 | not yet | – |
| 2021-11-09 | 2021-11-23 | −4.1% | 14 | 2021-11-30 | 7 |
| 2021-10-29 | 2021-11-03 | −1.3% | 5 | 2021-11-05 | 2 |
Buy-and-hold's deepest drawdown ran from 2021-01-04 to 2023-10-19 and reached −42.8%.
A drawdown that lasted the whole window
The rule's largest drawdown was 40.21%, from a peak on 2021-12-03 to a trough on 2026-07-02, with no recovery by the end of the window. That is 1,672 days from peak to trough. Holding had one drawdown, 42.77% from 2021-01-04 to 2023-10-19, and it also had not recovered. The TLT price series itself fell 44.06% from the same first day to the same October 2023 low, and its longest drawdown lasted 1,443 sessions.
The filter's drawdown is only slightly shallower than holding's, and it started later because the rule was in cash for the first nine months. The reason is the one the monthly table shows. The rule avoided the 2022 loss, and then it lost back similar amounts in 2023 to 2026 through repeated small losses. The two smaller drawdowns in the data, 4.13% from 2021-11-09 to 2021-11-23 and 1.3% from 2021-10-29 to 2021-11-03, are both from the first weeks of trading. After 2021-12-03 the equity curve never made a new high.
The lesson for a risk reader is that a filter can reduce the depth of a single decline and still end the window deep underwater. The rule saved 26 points in 2022 and lost most of it back in the next four years.
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) | −7.6% | −40.2% | $6,360 | -1.04 |
| 5 basis points | −8.4% | −43.0% | $6,058 | -1.15 |
| 10 basis points | −9.1% | −45.5% | $5,784 | -1.26 |
What 5 and 10 basis points did
With 96 fills, the cost runs hurt. At 5 basis points the CAGR was 8.36% negative with a max drawdown of 42.96% and a Sharpe ratio of 1.153 negative. At 10 basis points the CAGR was 9.1% negative, the drawdown was 45.47% and the Sharpe ratio was 1.262 negative. The end value fell from $6,360 to $6,058 and then $5,784.
With costs, the rule's small lead over holding disappears. Holding's CAGR was 8.23% negative, and the rule at 5 basis points was 8.36% negative, slightly behind. At 10 basis points it was further behind. The rule's edge over holding on TLT was 0.65 points of CAGR before costs, and the average trade of a loss of about 1.3% leaves nothing to absorb a cost of a few basis points on every fill. TLT trades about $2,159,787,473 a day on average with a median minute volume of 35,636 shares, so the cost assumptions are reasonable for the fund, and the point is that the rule makes many small trades.
Changing the parameters
| Version | CAGR | Max drawdown | Round trips | Win rate | Final value |
|---|---|---|---|---|---|
| Published rules | −7.6% | −40.2% | 48 | 15% | $6,360 |
| 100-day SMA | −5.6% | −33.3% | 48 | 23% | $7,195 |
| 150-day SMA | −6.0% | −31.7% | 39 | 28% | $6,999 |
| 250-day SMA | −5.5% | −28.4% | 34 | 15% | $7,209 |
Longer and shorter averages
Three variants changed the length of the average and left the rule alone.
A 100-day average gave a CAGR of 5.57% negative with a max drawdown of 33.31% and a Sharpe ratio of 0.613 negative, on 48 trades with 11 winners. A 150-day average gave 6.03% negative with a drawdown of 31.67% on 39 trades with 11 winners. A 250-day average gave 5.54% negative with a drawdown of 28.35% on 34 trades with 5 winners. All three had a better CAGR and a shallower drawdown than the 200-day base of 7.58% negative and 40.21%, and all three still lost money.
The 250-day version made the fewest trades and had the shallowest drawdown, and it won only 5 of 34. The 100-day version made the same 48 trades as the base but won 11. The differences between the three are small and none comes near a positive return. The 200-day setting did not choose the best of the four on this fund, but the ordering among lengths is not smooth: the 100-day and 250-day results sit within half a point of each other, and the 150-day result is a little worse than either. That points to noise in a short window and not to a better length. The variants were run one at a time, and a window of 5.7 years that contains one long decline does not say which length would work in another.
How TLT behaved
| Measure | TLT |
|---|---|
| Data in this test | 2021-01-04 to 2026-10-02 (1444 sessions) |
| Total return, buy and hold | −40.5% |
| Annualized volatility | 15.3% |
| Deepest drawdown | −44.1% (2021-01-04 to 2023-10-19) |
| Up days | 49.0% |
| Average daily range | 0.94% |
| Average overnight gap | 0.54% |
| Correlation to SPY | 0.08 |
| Correlation to QQQ | 0.09 |
| Sessions above the 200-day average | 35.2% |
| Crossings of the 200-day average | 95 |
| Falls of 10% or more from a 20-day high | 3 |
How TLT behaved and how the other rules and bond funds did
TLT held long-duration Treasuries through a rate-sensitive stretch. The fund lost 40.49% in total over the window, a CAGR of 8.64% negative, with annualized volatility of 15.33%. Calendar-year returns were 4.53% negative in 2021, 31.21% negative in 2022, 2.79% in 2023, 8.07% negative in 2024, 4.23% in 2025 and 8.01% negative in 2026 to date. It rose on 49% of sessions. The average up day was 0.74% and the average down day was 0.77% negative. It had 3 separate cases of a 10% fall within 20 days, covering 5 trading days, since its declines were slow and steady.
TLT's correlation to SPY was 0.08 and to QQQ was 0.09, so it moved separately from equities in this window. Its closest relatives were TMF at 1.00, BND at 0.92, AGG at 0.92 and IEF at 0.91. The overnight log return was 70.11% negative and the intraday log return was 18.78%, so the losses came between the close and the next open. A rule that holds only intraday would have avoided the overnight loss in this data, but the 200-day rule holds overnight whenever it is invested.
On oversold readings, RSI(14) fell below 30 on 61 sessions and the median forward 20-day return was 1.63% negative, against a baseline of 0.6% negative. RSI(2) below 10 occurred on 203 sessions with a median forward 5-day return of 0.03% against a baseline of 0.14% negative. Neither reading marked a reliable bottom, which fits the weak results of the dip rules on this fund. The dip buyer returned 4.32% negative and the RSI mean reversion returned 5.4% negative.
Against the other templates on TLT, the RSI(2) snapback returned 0.96% with a 22.81% drawdown, the EMA 12/26 0.67% negative with a 15.92% drawdown, the SMA 10/50 0.85% negative with 14.24% and the momentum breakout 1.2% negative with a 10.32% drawdown. The golden cross returned 2.46% negative and the 3-month momentum 2.28% negative. The shorter-average trend rules came out ahead of the 200-day filter, and the monthly cycle came last. The weekly 7% target returned 3.78% negative. The momentum breakout and trend plus trailing stop templates are backtest-only for now.
Among the bond funds, this rule's CAGR was 3.22% on SGOV, 1.36% on IGIB, 1.03% on IEI, 0.37% on BND, 0.31% on AGG and 1.53% negative on IEF. The category median is 0.37%, and TLT, a long-duration fund, sits well below it at 7.58% negative. The rule's results were better on all six other bond funds in the category. The strategy overview and the TLT page have the full rankings.
The rules
Own the asset when price closes above its 200-day average; hold cash when it closes below.
- WHEN the market opens · IF not invested AND yesterday's close > SMA(200) · THEN buy with 98% of the sleeve
- 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.
Why a trend filter had little to work with on TLT
The rule buys at the open after a close above the 200-day average and sells at the open after a close below it. It has no buffer band, which the template notes as a common addition because price whips around the line near turning points. TLT gave the rule a lot of line to whip around. The fund was above its 200-day average on only 35.18% of sessions and crossed it 95 times in 1,444 sessions. Each crossing is a possible buy or sell.
The rule did not trade at every crossing, since it acts only on the next open and only when its state changes. It still made 96 fills. Most of its trades were short. The median hold was 4 days and the median trade lost 0.87%. The longest hold was 193 days and the shortest was 1 day. A rule that trades at the pace of the average's noise pays for each signal with a small loss, and the 15% win rate shows how often the signal was wrong.
The template's description says a price above the 200-day average has historically coincided with better returns and lower volatility. On TLT that did not hold in this window. The fund spent most of the five years below the average and in a downtrend. A filter that works by keeping the investor out of declines can do nothing when the decline is the whole record, and what it can do is avoid some of it. The rule's exposure of 30.3% is the measure of how often it judged the fund worth holding, and in those periods the fund tended to fall back through the average within days.
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 TLT?
Over 2021-01-04 to 2026-10-02, 200-day regime filter on TLT returned −7.6% annualized vs −8.2% for buy-and-hold: it beat buy-and-hold by 0.7% per year, with a maximum drawdown 2.6 points shallower than holding (40.2% vs 42.8%).
How many trades did it make?
48 completed round trips over 5.7 years (96 fills), with 15% 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.
How did the 200-day regime filter do on TLT?
It returned a CAGR of 7.58% negative over 2021-01-04 to 2026-10-02, ending at $6,360 from $10,000, with a max drawdown of 40.21%. Buy-and-hold on TLT returned 8.23% negative with a 42.77% drawdown. The rule ranks 11th of 12 templates on TLT.
Why did a trend filter lose money on TLT?
TLT crossed its 200-day average 95 times and was above it on only 35.18% of sessions. The rule made 48 round trips and won 7, a 15% win rate, with a profit factor of 0.14. Frequent small stops added up.
Did the filter help in 2022?
Yes. It lost 4.2% in 2022 against 30.2% for holding. It made 2 round trips that year and was in cash from February 2022 to January 2023. It then lost 17.7% in 2023 against a 2.7% gain for holding.
What happens with a 100, 150 or 250 day average?
The CAGRs were 5.57% negative, 6.03% negative and 5.54% negative, with drawdowns of 33.31%, 31.67% and 28.35%. All three beat the 200-day base of 7.58% negative and all three lost money.
Do trading costs matter here?
They do. At 5 basis points the CAGR was 8.36% negative and at 10 basis points it was 9.1% negative. With 96 fills and an average loss of 1.33% per losing trade, the rule's small lead over holding disappeared.
Which strategy worked on TLT?
Only the RSI(2) snapback had a positive CAGR, at 0.96% with a 22.81% drawdown. The EMA 12/26 at 0.67% negative and the SMA 10/50 at 0.85% negative lost least among the rest.
What does this test leave out?
It covers one window of 5.7 years that includes one long bond decline, with daily-decision rules and no fees in the headline run. The results are hypothetical and are not a forecast.
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.