Learn › Strategies › SMA-200 Trend + 15% Trailing Stop › XLK

SMA-200 Trend + 15% Trailing Stop 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: trend + trailing stop on XLK turned $10,000 into $19,653 (96.5% total, 12.5% CAGR): it trailed buy-and-hold by 9.6% per year, with a maximum drawdown 0.4 points shallower than holding (32.5% vs 33.0%).
12.5%CAGR
22.1%buy & hold CAGR
−32.5%max drawdown
0.70Sharpe ratio
7round trips
57%win rate
■ trend + trailing stop   ■ buy & hold, $10,000 invested 2021-01-04

Year by year

Yeartrend + trailing stopbuy & hold
202110.4%36.1%
2022−31.5%−27.2%
202344.2%54.6%
202428.3%21.3%
202512.2%24.3%
202625.2%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−7.7%−4.8%3.3%−10.7%−1.5%0.0%0.0%−10.1%−4.5%0.0%0.0%0.0%
20231.9%0.4%10.6%−0.1%8.7%5.9%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.2%6.6%2.6%−1.5%5.0%−0.3%
2025−0.7%−2.2%−8.2%0.0%1.0%9.6%3.6%0.0%7.4%6.5%−4.7%0.7%
2026−0.1%−3.5%−6.3%12.2%19.4%−0.2%−9.0%6.2%5.0%2.1%––

Every trade

trend + trailing stop on XLK made 7 closed round trips and one position still open at the end of the test, an average hold of 204 days, an average winner of 23.91%, an average loser of −8.99%, a profit factor of 3.82, a longest losing streak of 3. It held a position at the close on 71.4% of trading days.

EntryEntry priceExitExit priceReturnDays held
2021-10-19$75.902022-01-24$72.65−4.3%97
2022-01-25$73.422022-05-06$67.35−8.3%101
2022-08-16$73.142022-09-15$62.59−14.4%30
2023-01-24$65.052024-08-02$99.8853.5%556
2024-08-05$94.162025-03-11$102.328.7%218
2025-05-13$113.282026-03-27$129.3914.2%318
2026-04-09$141.372026-07-28$168.5219.2%110
2026-07-29$170.72open–17.1%–

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-09-15−32.5%2622024-01-19491
2026-06-022026-07-29−16.6%57not yet–
2025-02-182025-05-23−15.0%942025-08-1281

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)12.5%−32.5%$19,6530.70
5 basis points12.4%−32.6%$19,5800.70
10 basis points12.3%−32.9%$19,4400.69

Changing the parameters

VersionCAGRMax drawdownRound tripsWin rateFinal value
Published rules12.5%−32.5%757%$19,653
10% trailing stop14.4%−28.0%1354%$21,667
20% trailing stop7.5%−45.8%425%$15,190
25% trailing stop7.2%−42.5%333%$14,868

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

Enter when price is above the 200-day average; exit only when a 15% trailing stop is hit.

  1. WHEN the market opens · IF not invested AND yesterday's close > SMA(200) · THEN buy with 98% of the sleeve
  2. WHILE invested · a managed trailing stop follows 15% below the position's high-water mark

A hybrid of the regime filter and the trailing stop. The 200-day average decides when to get in, and a 15% trail from the position's high-water mark decides when to get out. Winners can run well past the point where a crossover would have exited, and the position gives back 15% from every peak.

Good for: long trends with moderate pullbacks; the 15% trail is wide enough to survive normal corrections.
Watch out: every exit gives back 15% from the peak, and on choppy assets it re-enters above the 200-day repeatedly after each stop-out.

Run trend + trailing stop 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 trend + trailing stop beat buy-and-hold on XLK?

Over 2021-01-04 to 2026-10-02, trend + trailing stop on XLK returned 12.5% annualized vs 22.1% for buy-and-hold: it trailed buy-and-hold by 9.6% per year, with a maximum drawdown 0.4 points shallower than holding (32.5% vs 33.0%).

How many trades did it make?

7 completed round trips over 5.7 years (15 fills), with 57% of round trips closing profitably.

Why 15% rather than 10%?

A wider trail survives routine corrections and gives back more at the end. Both numbers are one-field edits in DeployQuant, so you can backtest both and compare.

Related

SMA-200 Trend + 15% Trailing Stop 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.