Learn › Strategies › 3-Month Momentum Switch › XLP

3-Month Momentum Switch on XLP

Consumer Staples Select Sector SPDR Fund: defensive consumer staples, a common risk-off equity sector. 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 XLP turned $10,000 into $9,079 (−9.2% total, −1.7% CAGR): it trailed buy-and-hold by 7.5% per year, with a maximum drawdown of 23.6% (buy-and-hold: 16.0%).
−1.7%CAGR
5.8%buy & hold CAGR
−23.6%max drawdown
-0.16Sharpe ratio
13round trips
23%win rate
■ 3-month momentum   ■ buy & hold, $10,000 invested 2021-01-04

Year by year

Year3-month momentumbuy & hold
20213.5%18.1%
2022−16.0%−0.7%
2023−4.5%−0.9%
202413.2%12.0%
2025−2.3%1.5%
2026−1.0%5.6%

Month by month

YearJanFebMarAprMayJunJulAugSepOctNovDec
20210.0%0.0%0.0%−0.1%1.7%−0.5%2.1%1.1%−4.1%0.2%0.0%3.1%
2022−1.4%−1.3%−3.0%−2.7%−1.9%0.0%0.0%−3.3%−1.1%0.0%0.0%−2.4%
2023−1.1%−1.4%0.0%1.1%−6.0%2.7%−0.1%0.0%0.0%0.0%0.0%0.3%
20241.2%2.0%3.2%−1.0%2.3%−0.2%1.6%5.8%1.2%−3.4%0.0%0.0%
20250.0%−0.2%−1.3%1.7%−2.5%0.0%−0.1%0.0%0.0%0.0%0.0%0.0%
20262.6%7.6%−8.2%−0.6%0.0%−2.1%2.3%−0.1%−1.8%0.0%––

Every trade

3-month momentum on XLP made 13 closed round trips, an average hold of 76 days, an average winner of 5.00%, an average loser of −2.36%, a profit factor of 0.57, a longest losing streak of 6. It held a position at the close on 46.9% of trading days.

EntryEntry priceExitExit priceReturnDays held
2021-04-16$60.242021-10-01$60.440.3%168
2021-12-14$65.882022-03-11$64.10−2.7%87
2022-04-20$70.752022-05-12$67.43−4.7%22
2022-08-19$68.732022-08-30$66.38−3.4%11
2022-09-20$63.712022-09-23$62.97−1.2%3
2022-12-01$69.212023-02-17$65.81−4.9%78
2023-04-21$69.652023-07-07$67.89−2.5%77
2023-12-28$66.662024-11-18$75.9613.9%326
2025-02-26$79.462025-03-05$78.25−1.5%7
2025-04-14$77.182025-05-14$76.57−0.8%30
2025-07-11$78.122025-07-17$78.04−0.1%6
2026-01-14$79.802026-04-17$80.360.7%93
2026-06-29$84.322026-09-10$82.84−1.8%73

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-08-172023-05-30−23.6%651not yet–
2021-06-042021-06-18−3.7%142021-07-1628
2021-05-102021-05-12−2.1%22021-05-2412

Buy-and-hold's deepest drawdown ran from 2022-04-20 to 2022-10-07 and reached −16.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)−1.7%−23.6%$9,079-0.16
5 basis points−1.9%−24.1%$8,962-0.19
10 basis points−2.1%−24.5%$8,852-0.22

Changing the parameters

VersionCAGRMax drawdownRound tripsWin rateFinal value
Published rules−1.7%−23.6%1323%$9,079
Enter above 0%−3.0%−27.4%5038%$8,396
Enter above 10%−0.4%−14.5%520%$9,756
Enter above 15%−1.1%−9.4%10%$9,395

How XLP behaved

MeasureXLP
Data in this test2021-01-04 to 2026-10-02 (1444 sessions)
Total return, buy and hold40.3%
Annualized volatility13.3%
Deepest drawdown−16.3% (2022-04-20 to 2022-10-07)
Up days51.6%
Average daily range1.12%
Average overnight gap0.29%
Correlation to SPY0.47
Correlation to QQQ0.30
Correlation to TLT0.13
Sessions above the 200-day average75.1%
Crossings of the 200-day average73
Falls of 10% or more from a 20-day high1

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.

Run 3-month momentum on XLP 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 XLP?

Over 2021-01-04 to 2026-10-02, 3-month momentum on XLP returned −1.7% annualized vs 5.8% for buy-and-hold: it trailed buy-and-hold by 7.5% per year, with a maximum drawdown of 23.6% (buy-and-hold: 16.0%).

How many trades did it make?

13 completed round trips over 5.7 years (26 fills), with 23% 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.

Related

3-Month Momentum Switch on all 59 ETFsfull results table All strategies on XLP12 templates compared RSI(14) Mean Reversion on XLPsame ETF, different rulesRSI(2) Dip Snapback on XLPsame 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.