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

200-Day SMA Regime Filter on XLF

Financial Select Sector SPDR Fund: S&P 500 banks, insurers and asset managers. 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 XLF turned $10,000 into $11,243 (12.4% total, 2.1% CAGR): it trailed buy-and-hold by 10.5% per year, with a maximum drawdown 3.4 points shallower than holding (22.0% vs 25.5%).
2.1%CAGR
12.6%buy & hold CAGR
−22.0%max drawdown
0.23Sharpe ratio
19round trips
21%win rate
■ 200-day regime filter   ■ buy & hold, $10,000 invested 2021-01-04

Year by year

Year200-day regime filterbuy & hold
2021−1.1%35.8%
2022−9.6%−10.4%
20232.8%11.9%
202429.9%29.9%
2025−1.0%14.7%
2026−4.9%−1.1%

Month by month

YearJanFebMarAprMayJunJulAugSepOctNovDec
20210.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%1.4%−5.7%3.4%
20220.0%−1.6%−1.7%−1.0%0.0%0.0%0.0%0.0%0.0%0.0%1.5%−7.0%
20236.7%−2.3%−7.4%0.0%0.0%−1.2%4.7%−3.7%−2.6%−1.4%5.6%5.4%
20242.9%4.0%4.8%−4.0%3.1%−0.9%6.3%4.4%−0.5%2.6%10.2%−5.4%
20256.4%1.4%−4.1%−15.5%4.3%3.1%0.0%3.1%0.1%−2.7%1.8%3.0%
2026−2.4%−3.9%0.0%−0.1%0.0%1.3%6.1%1.3%−7.0%0.2%––

Every trade

200-day regime filter on XLF made 19 closed round trips and one position still open at the end of the test, an average hold of 62 days, an average winner of 9.42%, an average loser of −1.55%, a profit factor of 1.49, a longest losing streak of 7. It held a position at the close on 61.3% of trading days.

EntryEntry priceExitExit priceReturnDays held
2021-10-19$36.422022-02-25$35.21−3.3%129
2022-02-28$35.302022-03-02$34.57−2.1%2
2022-03-17$35.122022-04-05$35.10−0.1%19
2022-11-11$33.462022-12-16$31.48−5.9%35
2022-12-22$31.882022-12-23$31.76−0.4%1
2022-12-27$32.022023-03-10$31.06−3.0%73
2023-06-16$31.902023-06-21$31.46−1.4%5
2023-06-30$31.982023-08-23$32.030.2%54
2023-08-24$32.312023-08-25$32.320.0%1
2023-08-28$32.422023-09-27$31.81−1.9%30
2023-10-18$32.052023-10-19$31.61−1.4%1
2023-11-06$32.372025-04-07$41.8229.2%518
2025-04-10$45.532025-04-11$44.81−1.6%1
2025-04-15$46.412025-04-17$45.72−1.5%2
2025-04-23$47.042026-02-13$50.948.3%296
2026-02-19$51.552026-02-20$51.32−0.5%1
2026-04-20$52.142026-04-22$52.09−0.1%2
2026-06-08$51.872026-06-09$51.81−0.1%1
2026-06-10$51.982026-06-11$51.92−0.1%1
2026-06-12$52.58open–1.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.

Largest drawdowns

PeakLow pointDepthDays to lowRecoveredDays to recover
2022-01-122023-11-09−22.0%6662024-07-15249
2025-02-182025-04-23−20.6%64not yet–
2021-10-222021-12-01−7.4%402022-01-0434

Buy-and-hold's deepest drawdown ran from 2022-01-12 to 2022-10-12 and reached −25.5%.

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)2.1%−22.0%$11,2430.23
5 basis points1.7%−22.9%$11,0290.20
10 basis points1.4%−23.7%$10,8150.17

Changing the parameters

VersionCAGRMax drawdownRound tripsWin rateFinal value
Published rules2.1%−22.0%1921%$11,243
100-day SMA2.0%−18.4%3534%$11,204
150-day SMA4.6%−21.8%2330%$12,945
250-day SMA0.4%−26.9%2114%$10,248

How XLF behaved

MeasureXLF
Data in this test2021-01-04 to 2026-10-02 (1444 sessions)
Total return, buy and hold102.9%
Annualized volatility18.4%
Deepest drawdown−25.9% (2022-01-12 to 2022-10-12)
Up days52.9%
Average daily range1.40%
Average overnight gap0.49%
Correlation to SPY0.77
Correlation to QQQ0.59
Correlation to TLT-0.05
Sessions above the 200-day average71.2%
Crossings of the 200-day average38
Falls of 10% or more from a 20-day high10

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.

Run 200-day regime filter on XLF 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 XLF?

Over 2021-01-04 to 2026-10-02, 200-day regime filter on XLF returned 2.1% annualized vs 12.6% for buy-and-hold: it trailed buy-and-hold by 10.5% per year, with a maximum drawdown 3.4 points shallower than holding (22.0% vs 25.5%).

How many trades did it make?

19 completed round trips over 5.7 years (39 fills), with 21% 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.

Related

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