Learn › Strategies › 3-Month Momentum Switch › XLK

3-Month Momentum Switch 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: 3-month momentum on XLK turned $10,000 into $14,022 (40.2% total, 6.1% CAGR): it trailed buy-and-hold by 16.0% per year, with a maximum drawdown 2.1 points shallower than holding (30.9% vs 33.0%).

XLK, the Technology Select Sector SPDR Fund, gained 226.13% between 2021-01-04 and 2026-10-02, a CAGR of 22.86%. The 3-month momentum switch earned 6.06% a year on it. A $10,000 account ended at $14,022.02 under the rule and at $31,425.04 under buy-and-hold. The rule's drawdown was 30.88% and buy-and-hold's was 32.96%, so the rule gave up 16.01 points of CAGR to cut the worst loss by 2.08 points.

Among the 12 templates the 3-month momentum switch came last on XLK, and XLK placed 19th of 59 funds for the switch. It is meant to hold a rising fund and step aside from a falling one. XLK rose and fell in this window, but each turn came faster than a 63-day lookback could register. It entered after a +5% quarter, exited when the quarter turned negative, and made 18 round trips of which 6 won. Exposure was 59.2%.

Two conditions drive everything. While flat, a 63-day return above +5% triggers a buy of 98% of the sleeve at the following open. While long, a 63-day return under 0% sells the entire position. The 3-month momentum hub lists all 59 funds, with a median CAGR of 0%. Among sector funds XLK sat third, ahead of XLF at 2.74% and behind VOX at 8.92% and SOXX at 14.3%. The XLK fund page ranks every template on the fund.

Decisions are daily and fills use minute bars. The headline run has no margin, no fees and no slippage.

6.1%CAGR
22.1%buy & hold CAGR
−30.9%max drawdown
0.45Sharpe ratio
18round trips
33%win rate
■ 3-month momentum   ■ buy & hold, $10,000 invested 2021-01-04

Year by year

Year3-month momentumbuy & hold
202116.6%36.1%
2022−21.7%−27.2%
202341.7%54.6%
2024−16.8%21.3%
202512.9%24.3%
202615.4%38.9%

Six years against a fund that kept rising

Buy-and-hold won five of the six calendar years. The rule won only 2022.

2021 gave 16.6% against 36.1% for the fund. The first entry came on 2021-04-07, because the 63-day return needs a quarter of data and had to clear +5%. That trade lost 3.35% in 34 days. The next one, from 2021-05-27 to 2021-10-05, made 7.64% over 131 days, and the third, from 2021-10-18 to 2022-01-21, made 1.59%. The gap was -19.5 points.

2022 is the lead year: the rule lost 21.7% and the fund lost 27.2%, a gap of +5.5 points. The rule exited on 2022-01-21 at 75.81 and was out until 2022-08-10, which spared it most of the first-half decline. Then it re-entered twice into rallies that failed, losing 5.87% from 2022-08-10 to 2022-08-30 and 8.42% from 2022-09-13 to 2022-09-23. Those two trades took a good defensive year and cut it down.

2023 returned 41.7% against 54.6%. The one big winning trade of the window started on 2023-01-11 at 62.12 and ended on 2023-09-18 at 82.55 for +32.89%. Before it, a 2-day trade on 2023-01-03 lost 2.17%. The gap was -12.9 points.

2024 was the rule's weakest year. It lost 16.8% while the fund gained 21.3%, which is a gap of -38.1 points and the widest in the table. The fund rose to a high on 2024-07-10 and then fell 16.74% to 2024-08-07, and the rule lost on every one of its four trades that year except the early one: +10.66% from 2023-11-10 to 2024-04-22 closed in April, then -0.73%, -11.54% and -7.42%. The 2024 losses came from entries after rallies that reversed within weeks.

2025 gave 12.9% against 24.3%, a gap of -11.4 points. The rule took three small losses early in the year (-2.09% from 2024-10-23 to 2025-01-13, -1.33% and -4.58% in February) and then caught a long trade from 2025-06-03 to 2026-01-09 for +24.09%. 2026 so far shows 15.4% against 38.9%, a gap of -23.5. The fund recovered fast from the March 2026 low, and the rule re-entered on 2026-04-17 at 153.64, well above the low.

The average of those gaps hides the pattern. The rule loses most in years when the fund reverses sharply and recovers, which is the V-shape the strategy page lists as its caveat.

Month by month

YearJanFebMarAprMayJunJulAugSepOctNovDec
20210.0%0.0%0.0%1.6%−4.9%6.7%3.8%3.5%−5.7%3.8%4.3%3.2%
2022−9.5%0.0%0.0%0.0%0.0%0.0%0.0%−5.7%−8.2%0.0%0.0%0.0%
20234.3%0.4%10.7%−0.1%8.8%6.0%2.5%−1.5%−3.9%0.0%5.1%4.1%
20242.6%4.6%0.8%−6.8%−1.4%0.5%−3.2%−9.9%−5.4%−3.6%5.0%−0.3%
2025−2.9%−5.7%0.0%0.0%0.0%8.3%3.6%0.0%7.4%6.5%−4.7%0.7%
2026−2.5%0.0%0.0%3.4%19.3%−0.2%−7.8%3.7%−1.6%2.0%––

Months: one outsized month and a lot of zeros

The monthly table has long stretches of 0, which are cash months, including 2021-01 to 2021-03 before the first entry, 2022-02 to 2022-07, 2022-10 to 2022-12, 2025-03 to 2025-05 and 2026-02 and 2026-03. The rule was invested for 59.2% of sessions.

The best month was May 2026 at +19.33%. Buy-and-hold made +19.71% in April 2026, when the rule re-entered late and booked +3.42%. In May 2026 the rule held the fund through the rebound, and that gave it its largest monthly gain. March 2023 was next at +10.66%, followed by May 2023 at +8.75%, June 2025 at +8.33% and September 2025 at +7.4%.

August 2024 was the worst month at -9.86%. January 2022 lost 9.49%, September 2022 lost 8.24% and July 2026 lost 7.77%. April 2024 lost 6.78% and September 2021 lost 5.73%. XLK itself fell -11.65% in September 2022, its worst month, and the rule lost less that month.

Losing months cluster. From April to October 2024 the rule lost in six of seven months, with June at +0.53% the exception. A 5% entry hurdle means the gain has already happened when the buy goes in, so a rally that stalls the next month shows up as a loss before the 0% exit fires.

XLK's own seasonality has little to say here, since each calendar month has 5 or 6 observations. May averaged +7.38%, November +4.79% and October +4.19%, and September -1.48%. The rule's best month falling in May lines up with that average, and a single year does not make a pattern.

Every trade

3-month momentum on XLK made 18 closed round trips and one position still open at the end of the test, an average hold of 69 days, an average winner of 15.87%, an average loser of −4.30%, a profit factor of 1.67, a longest losing streak of 6. It held a position at the close on 59.2% of trading days.

EntryEntry priceExitExit priceReturnDays held
2021-04-07$66.022021-05-11$63.81−3.4%34
2021-05-27$66.582021-10-05$71.677.6%131
2021-10-18$74.622022-01-21$75.811.6%95
2022-08-10$71.552022-08-30$67.35−5.9%20
2022-09-13$65.832022-09-23$60.29−8.4%10
2023-01-03$61.192023-01-05$59.86−2.2%2
2023-01-11$62.122023-09-18$82.5532.9%250
2023-11-10$86.302024-04-22$95.5010.7%164
2024-05-21$105.112024-06-03$104.34−0.7%13
2024-06-13$111.832024-08-06$98.93−11.5%54
2024-08-20$110.842024-09-04$102.62−7.4%15
2024-10-23$114.112025-01-13$111.72−2.1%82
2025-02-07$116.822025-02-12$115.27−1.3%5
2025-02-21$119.492025-02-26$114.02−4.6%5
2025-06-03$115.872026-01-09$143.7824.1%220
2026-01-13$146.382026-01-21$142.32−2.8%8
2026-04-17$153.642026-08-25$181.7918.3%130
2026-09-11$187.042026-09-15$184.46−1.4%4
2026-09-23$196.14open–1.9%–

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 19 positions

The list holds 19 positions: 18 closed and one still open. The median trade lost 1.38% over 34 days. The longest hold was 250 days and the shortest 2. The win rate of 33% is low, and the average win of 15.87% is much larger than the average loss of 4.3%, which is why the profit factor is 1.67 despite twelve losing trades.

The best trade was 2023-01-11 to 2023-09-18, from 62.12 to 82.55, +32.89% over 250 days. The second was 2025-06-03 to 2026-01-09, 115.87 to 143.78, +24.09% over 220 days. Third was 2026-04-17 to 2026-08-25, 153.64 to 181.79, +18.32% over 130 days, and fourth was 2023-11-10 to 2024-04-22, 86.3 to 95.5, +10.66% over 164 days. Four trades made essentially the whole profit. The fifth, 2021-05-27 to 2021-10-05, made +7.64%.

The worst trade was 2024-06-13 to 2024-08-06, from 111.83 to 98.93, a loss of 11.54% over 54 days. Next were -8.42% in September 2022, -7.42% in August and September 2024 and -5.87% in August 2022. The worst loss is smaller than the worst drawdown by a wide margin, because the drawdown accumulates across several trades.

The shortest trades mostly lost. The 2-day trade of January 2023 gave back 2.17%, the two 5-day trades of February 2025 lost 1.33% and 4.58%, and the 4-day trade of September 2026 lost 1.38%. Each one met the +5% entry and then broke the 0% exit inside a week. Grouped by exit year, the record was 1 win from 2 in 2021, 1 from 3 in 2022, 1 from 2 in 2023, 1 from 4 in 2024, 0 from 3 in 2025 and 2 from 4 in 2026.

One trade is open at the end: bought on 2026-09-23 at 196.14 and up 1.89%. The prices shown are adjusted for splits and dividends, which makes them lower than the quotes printed on the day.

The six losses in a row

The longest losing streak was 6 trades, and the list shows when it ran. It started with the 2024-05-21 entry at $105.11, which lost 0.73%, and ran through the 2024-06-13 entry that lost 11.54%, the 2024-08-20 entry that lost 7.42% and the 2024-10-23 entry that lost 2.09%. It then took in the two February 2025 trades, 1.33% on 2025-02-07 and 4.58% on 2025-02-21. Over that stretch XLK itself reached a high on 2024-07-10 and made its two deep falls, 16.74% into 2024-08-07 and 25.29% into 2025-04-08.

Each of those entries followed a quarter above +5%, so the rule was buying after strength every time. The 2025-02-21 entry at $119.49 was sold at $114.02 five days later. The rule then sat in cash from late February to the 2025-06-03 entry at $115.87, which was below the February entry prices.

Largest drawdowns

PeakLow pointDepthDays to lowRecoveredDays to recover
2024-03-122025-02-25−30.9%3502026-05-26455
2021-12-272023-01-05−24.6%3742023-06-12158
2026-06-022026-07-29−15.5%57not yet–

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

Drawdowns: the rule's worst came after the fund's

The deepest drawdown of the rule was 30.88%, from a peak on 2024-03-12 to a trough on 2025-02-25, 350 days later. It recovered on 2026-05-26, 455 days after that. The rule was whipsawed through the second half of 2024 and early 2025 and did not catch the rebound until the 2025-06-03 entry. Buy-and-hold had no drawdown that long. Its deepest was 32.96% from 2021-12-27 to 2022-10-12 and it recovered on 2023-06-15.

The second drawdown of the rule, 24.56%, ran from 2021-12-27 to 2023-01-05 and recovered on 2023-06-12. Its peak date matches the fund's own 33.58% drawdown. The rule was invested through the December 2021 high, exited in January 2022 and came back at the wrong time in August and September. The third, at 15.54%, began on 2026-06-02, bottomed on 2026-07-29 and was still open on the last day.

XLK also had a 25.29% fall from 2025-02-18 to 2025-04-08 and a 16.74% fall from 2024-07-10 to 2024-08-07. The rule's deepest drawdown covers the first of those declines and starts shortly before the second.

The Sharpe ratio was 0.45 against 0.95 for buy-and-hold. On this fund the rule cut neither volatility nor drawdown by enough to offset the return it gave up.

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)6.1%−30.9%$14,0220.45
5 basis points5.7%−31.3%$13,7810.43
10 basis points5.4%−31.7%$13,5390.41

Costs on a rule that trades 37 times

With 37 fills the cost runs are small in return terms. At 5 basis points the CAGR was 5.74% against 6.06%, the drawdown 31.3% and the ending equity $13,780.86. At 10 basis points the CAGR was 5.42%, the drawdown 31.71% and the ending equity $13,539.13. The Sharpe ratio fell from 0.45 to 0.429 and then 0.41.

XLK trades about $1,324,049,811 a day on average, with a median minute volume of 20,984 shares, so it sits among the deepest books in the library. Basis-point cost runs suit a fund like this. The result does not turn on costs: the rule trails buy-and-hold by a wide margin before any costs and does so after them.

Changing the parameters

VersionCAGRMax drawdownRound tripsWin rateFinal value
Published rules6.1%−30.9%1833%$14,022
Enter above 0%7.6%−35.4%3642%$15,213
Enter above 10%7.5%−19.6%1060%$15,141
Enter above 15%3.1%−20.9%850%$11,889

Entry thresholds: 10% was the interesting one

Three variants moved the entry threshold and left the 0% exit alone. An entry above 0% returned 7.58% with a 35.44% drawdown, 36 trades and 15 wins, and ended at $15,212.99. Entering above 10% returned 7.49% with a 19.56% drawdown, 10 trades and 6 wins, and ended at $15,140.68. Entering above 15% returned 3.06% with a 20.94% drawdown, 8 trades and 4 wins, and ended at $11,889.25.

The base case at +5% returned 6.06% with a 30.88% drawdown and 18 round trips, and each of the first two variants was a little better on CAGR. The lower threshold made more trades and had the deeper drawdown. The 10% threshold cut the drawdown to 19.56% and the number of trades to 10, with a Sharpe ratio of 0.555, the best of the four. At 15% the rule waited too long and the return fell.

The picture is a trade-off between trade frequency and drawdown. A higher threshold filters the weak rallies that produce the whipsaws, and a threshold that is too high misses the strong rallies. None of the variants approached buy-and-hold at 22.07% a year, so changing the threshold did not close the gap. Since the variants were chosen after seeing the window, the 10% result is a description of this data and carries a risk of being a coincidence of it.

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

How XLK behaved

XLK holds the technology stocks of the S&P 500. Annualized volatility was 25.13%. The fund's worst fall was 33.58%, from 2021-12-27 to 2022-10-12, and it took until 2023-06-15 to recover, with the longest underwater stretch lasting 368 sessions. By calendar year it returned 36.99% in 2021, -27.73% in 2022, 56.01% in 2023, 21.64% in 2024, 24.61% in 2025 and 39.31% so far in 2026. Beta was 1.39 against SPY and 1.08 against QQQ, and the correlation with QQQ was 0.97.

On 76.47% of sessions XLK closed above its 200-day average, and it crossed that line 22 times. Holding works well on a fund that sits above its long average three quarters of the time, yet the 3-month rule was invested only 59.2% of the time. The gap in exposure is part of the gap in return.

Up days made up 55.23% of sessions, with an average gain of +1.15% against an average loss of -1.21% on down days. The typical intraday range was 1.77% and the typical overnight gap 0.69%. The best day was +13.37% on 2025-04-09 and the worst -6.76% on 2025-04-03. The rule sat in cash from March to May 2025 and so missed 2025-04-09 entirely.

RSI(14) dropped under 30 on 15 sessions, and the median 5-day forward return after those was 4.01% against a baseline of 0.5%, and a 20-day median of 4.4% against 1.9%. Oversold readings were followed by strong gains, which is the pattern a momentum rule is built to miss: it needs a positive quarter to enter, and an RSI under 30 follows a falling quarter. RSI(2) fell under 10 on 137 sessions, with a 5-day median of 0.6% and a 20-day median of 2.59%.

Overnight moves made 55.3% of the return and the session itself 44.7%. Open fills take the overnight gap into the price, so a sale at the open absorbs an overnight fall.

Which days the rule owned

The profile lists the fund's largest daily moves, and the trade dates show which ones the rule held. It was in cash for the two biggest up days of 2022, 2022-11-10 at 8.23% and 2022-11-30 at 5%, and for the worst two days of April 2025, -6.76% on 2025-04-03 and -6.57% on 2025-04-04, and for the best day of the window, 13.37% on 2025-04-09. It was long for 2026-07-30 at 5.52%, 2026-08-04 at 4.96% and 2026-06-05 at -6.67%, since the 2026-04-17 trade ran to 2026-08-25. On 2022-09-13 it bought at the open at $65.83, the same day the fund fell 5.3%, its fifth worst day, and the trade closed for -8.42% ten days later.

The fund had 30 drops of 10% or more from a 20-day high, spread over 96 sessions in total, out of 1,444. The rule exited on the 2022 and 2025 declines when the 63-day return turned negative, and its 2024 trades lost money through the July and August fall.

Weekday averages for the fund were small: Monday 0.21%, Tuesday 0.02%, Wednesday 0.16%, Thursday 0.05% and Friday 0.04%. Lag-1 autocorrelation of daily returns was -0.03. A fund with near-zero day-to-day persistence gives a quarterly momentum rule its edge only through multi-month moves, and the profile's 22 crossings of the 200-day average show how few clean multi-month moves there were. The fund's correlation to TLT was 0.07 and its beta to TLT 0.11, so a cash position in this rule carried no hedge from bonds in the test, because the sleeve held plain cash.

The rules

Hold while the trailing 3-month return is positive (above +5% to enter, below 0% to exit).

  1. WHEN the market opens · IF not invested AND the 63-day return > +5% · THEN buy with 98% of the sleeve
  2. WHEN the market opens · IF invested AND the 63-day return < 0% · THEN sell the whole position

Time-series momentum on a quarterly lookback, the horizon much of the academic momentum literature uses. The template enters after a +5% three-month run and exits when the same measure turns negative. The gap between entry (+5%) and exit (0%) is a buffer against flip-flopping around a single threshold.

Good for: assets with long, persistent cycles, such as index, sector and managed-futures ETFs.
Watch out: a three-month lookback is slow; V-shaped crashes and recoveries can see it exit near the bottom and re-enter well off the low.

Where momentum ranked among the templates on XLK

The 3-month momentum switch placed 12th of 12 on XLK with 6.06%. The monthly cycle was first at 20.86% with a 32.05% drawdown, followed by the weekly 7% target at 20.39% with a 20.67% drawdown. The 200-day regime filter made 16.81% with a 19.72% drawdown, and the golden cross 15.33% with 19.6%.

Next came trend plus trailing stop at 12.49% (32.53% drawdown) and the RSI(2) snapback at 12.11% (18.15% drawdown). The momentum breakout returned 11.62%. Below it were EMA 12/26 at 9.84%, SMA 10/50 at 9.47%, RSI mean reversion at 8.74% and the dip buyer at 7.85%.

The ranking follows time in the market. The monthly cycle and the 200-day filter held XLK longest and earned most, because the fund climbed. The momentum switch was caught by the 2024 and 2025 reversals. The faster crossovers, EMA 12/26 and SMA 10/50, beat momentum and trailed the filters built on the 200-day average, and those two filters kept drawdowns under 20%.

Across other sector funds the switch made 14.3% on SOXX with a 35.43% drawdown, 8.92% on VOX with 12.96%, 2.74% on XLF, -1.67% on XLP and -3.94% on XLY with a 34.61% drawdown. The rule did best on SOXX and VOX, and the result on XLK sits in the middle of the six.

This is one window of 5.74 years, and the fund gained 226.13% in it. A longer decline in technology would test a rule that exits on a negative quarter differently, and this window has only one such episode, in 2022.

Run 3-month momentum 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 3-month momentum beat buy-and-hold on XLK?

Over 2021-01-04 to 2026-10-02, 3-month momentum on XLK returned 6.1% annualized vs 22.1% for buy-and-hold: it trailed buy-and-hold by 16.0% per year, with a maximum drawdown 2.1 points shallower than holding (30.9% vs 33.0%).

How many trades did it make?

18 completed round trips over 5.7 years (37 fills), with 33% of round trips closing profitably.

Why 63 days?

63 trading days is about one quarter, a common momentum lookback. You can sweep it in DeployQuant to see how the horizon changes results.

How did the 3-month momentum switch do on XLK?

It returned 6.06% a year from 2021-01-04 to 2026-10-02 and turned $10,000 into $14,022.02. The maximum drawdown was 30.88% and the Sharpe ratio was 0.45. Buy-and-hold returned 22.07% a year and ended at $31,425.04.

Did the momentum rule avoid the 2022 drop?

Partly. It lost 21.7% in 2022 against 27.2% for the fund. It exited on 2022-01-21 and stayed out until August, then lost on two re-entries in August and September.

Why did the rule lose 16.8% in 2024 while XLK gained 21.3%?

The rule bought after rallies that reversed within weeks. Its trades that year lost 0.73%, 11.54% and 7.42% after one winner in April, and the fund fell 16.74% from 2024-07-10 to 2024-08-07.

Which entry threshold worked best on XLK?

Entering above 10% returned 7.49% with a 19.56% drawdown and 10 trades, the best Sharpe ratio of the four at 0.555. Entering above 0% returned 7.58% with a 35.44% drawdown. The base +5% returned 6.06%. These were tested on the same window.

How many trades did the rule make on XLK?

It made 18 round trips and 37 fills, with 6 winners, and one position was open at the end, bought on 2026-09-23 at 196.14. The median trade lost 1.38% and the best made 32.89%.

Do trading costs change the result?

Slightly. At 5 basis points the CAGR was 5.74% and at 10 basis points 5.42%, against 6.06% with no costs. XLK is very liquid, so these runs are a reasonable test.

Which template did best on XLK?

The monthly cycle made 20.86% a year, then the weekly 7% target at 20.39% and the 200-day regime filter at 16.81%. The 3-month momentum rule ranked 12th of 12.

Related

3-Month Momentum Switch 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.