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

200-Day SMA Regime Filter on XLK

Technology Select Sector SPDR Fund: S&P 500 technology stocks, the sector behind most recent bull runs. 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 XLK turned $10,000 into $24,405 (144.1% total, 16.8% CAGR): it trailed buy-and-hold by 5.3% per year, with a maximum drawdown 13.2 points shallower than holding (19.7% vs 33.0%).
16.8%CAGR
22.1%buy & hold CAGR
−19.7%max drawdown
0.98Sharpe ratio
11round trips
36%win rate
■ 200-day regime filter   ■ buy & hold, $10,000 invested 2021-01-04

Year by year

Year200-day regime filterbuy & hold
202110.4%36.1%
2022−18.5%−27.2%
202344.4%54.6%
202417.4%21.3%
202519.9%24.3%
202633.4%38.9%

Month by month

YearJanFebMarAprMayJunJulAugSepOctNovDec
20210.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%0.0%2.5%4.3%3.2%
2022−8.0%−6.2%0.4%−3.1%0.0%0.0%0.0%−2.8%0.0%0.0%0.0%0.0%
20231.9%0.4%10.6%−0.1%8.7%6.0%2.5%−1.5%−6.3%0.1%12.6%4.1%
20242.6%4.6%0.8%−5.7%7.0%7.6%−3.3%−1.4%1.4%−1.5%5.0%−0.3%
2025−0.7%−4.1%0.0%0.0%1.0%9.6%3.6%0.0%7.4%6.5%−4.7%0.7%
2026−0.1%−3.5%−1.5%12.2%19.4%−0.2%−7.8%6.2%5.0%2.1%––

Every trade

200-day regime filter on XLK made 11 closed round trips and one position still open at the end of the test, an average hold of 110 days, an average winner of 20.31%, an average loser of −1.74%, a profit factor of 6.87, a longest losing streak of 6. It held a position at the close on 65.9% of trading days.

EntryEntry priceExitExit priceReturnDays held
2021-10-19$75.902022-01-26$75.34−0.7%99
2022-01-31$76.402022-02-14$74.74−2.2%14
2022-02-16$76.142022-02-18$74.64−2.0%2
2022-03-25$76.582022-04-07$74.37−2.9%13
2022-08-16$73.142022-08-18$72.80−0.5%2
2022-08-19$72.542022-08-22$70.78−2.4%3
2023-01-24$65.052024-08-06$98.9352.1%560
2024-08-09$100.972024-09-09$101.820.8%31
2024-09-10$103.052025-02-28$109.526.3%171
2025-05-13$113.282026-03-16$138.2322.0%307
2026-03-17$138.912026-03-23$136.82−1.5%6
2026-04-09$141.37open–41.4%–

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
2021-12-272022-08-22−19.7%2382023-06-02284
2024-07-102024-08-05−16.4%262025-06-30329
2026-06-022026-07-29−15.6%572026-10-0164

Buy-and-hold's deepest drawdown ran from 2021-12-27 to 2022-10-12 and reached −33.0%.

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)16.8%−19.7%$24,4050.98
5 basis points16.6%−20.1%$24,1520.96
10 basis points16.3%−20.6%$23,8380.95

Changing the parameters

VersionCAGRMax drawdownRound tripsWin rateFinal value
Published rules16.8%−19.7%1136%$24,405
100-day SMA14.0%−29.4%3037%$21,180
150-day SMA8.7%−36.7%2025%$16,126
250-day SMA14.0%−22.4%922%$21,204

How XLK behaved

MeasureXLK
Data in this test2021-01-04 to 2026-10-02 (1444 sessions)
Total return, buy and hold226.1%
Annualized volatility25.1%
Deepest drawdown−33.6% (2021-12-27 to 2022-10-12)
Up days55.2%
Average daily range1.77%
Average overnight gap0.69%
Correlation to SPY0.91
Correlation to QQQ0.97
Correlation to TLT0.07
Sessions above the 200-day average76.5%
Crossings of the 200-day average22
Falls of 10% or more from a 20-day high30

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 XLK 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 XLK?

Over 2021-01-04 to 2026-10-02, 200-day regime filter on XLK returned 16.8% annualized vs 22.1% for buy-and-hold: it trailed buy-and-hold by 5.3% per year, with a maximum drawdown 13.2 points shallower than holding (19.7% vs 33.0%).

How many trades did it make?

11 completed round trips over 5.7 years (23 fills), with 36% 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 XLK12 templates compared RSI(14) Mean Reversion on XLKsame ETF, different rulesRSI(2) Dip Snapback on XLKsame 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.