Learn › Strategies › First-to-Last Day of Month › XLK

First-to-Last Day of Month 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: monthly cycle on XLK turned $10,000 into $29,671 (196.7% total, 20.9% CAGR): it trailed buy-and-hold by 1.2% per year, with a maximum drawdown 0.9 points shallower than holding (32.0% vs 33.0%).

The monthly cycle owns XLK, the Technology Select Sector SPDR Fund, for nearly all of every month. It enters at the first session's open with 98% of the sleeve and exits completely at the open of the month's final session. No indicator is involved. Between 2021-01-04 and 2026-10-02 that produced 69 closed round trips, 44 of them winners, and turned $10,000 into $29,671, a 20.86% CAGR. Buy-and-hold on the same fund ended at $31,425 with a CAGR of 22.07%.

That puts the calendar rule slightly behind simply owning the fund. Its max drawdown was 32.05% against 32.96% for buy-and-hold, and its Sharpe ratio was 0.93 against 0.95. Exposure was 95.2% of trading days, so the strategy behaved like a slightly thinner copy of the fund: same direction, a little less exposure, a little less return.

Among the 12 templates tested on XLK, this one posted the highest CAGR, ahead of the weekly 7% target at 20.39%. It also carried the second deepest drawdown of the group. The ranking says more about XLK than about the rule: the fund rose through most of the window, and any template that stayed invested most of the time collected that rise. The rule has no view on direction. It has a view on timing inside the month, and the numbers below show how little that view added or removed.

The evidence is one 5.74 year window on one fund, with daily decisions and no fees in the headline run.

20.9%CAGR
22.1%buy & hold CAGR
−32.0%max drawdown
0.93Sharpe ratio
69round trips
64%win rate
■ monthly cycle   ■ buy & hold, $10,000 invested 2021-01-04

Year by year

Yearmonthly cyclebuy & hold
202130.7%36.1%
2022−28.9%−27.2%
202349.3%54.6%
202426.5%21.3%
202526.9%24.3%
202635.7%38.9%

Where the rule gained and lost against the fund, year by year

Yearly results for the rule ran 30.7%, -28.9%, 49.3%, 26.5%, 26.9% and 35.7% for 2021 through 2026. Holding the fund outright gave 36.1%, -27.2%, 54.6%, 21.3%, 24.3% and 38.9% in those same years. The yearly gaps were -5.4, -1.7, -5.3, 5.2, 2.6 and -3.2 percentage points.

Only 2024 and 2025 went to the rule. The fund led in the other four. The two winning years do not show a calendar effect. XLK was strong in both. In 2024 the fund's own drawdown ran 16.74% from 2024-07-10 to 2024-08-07, and the strategy's drawdown over the same dates was 17.36%, so the rule did not dodge that fall.

In 2021, 2023 and 2026 the fund climbed hard and the strategy lagged by 5.4, 5.3 and 3.2 points. A calendar rule that sits out one session each month loses the most when the fund makes big one-day moves on those sessions. The fund's best day in the dataset, +13.37% on 2025-04-09, came when the strategy was holding a position, so it did not miss that one. Skipped sessions are random draws from the fund's return distribution, and in a year with a strong upward drift each draw costs a little.

2022 is the year that matters for risk. The strategy lost 28.9% and the fund lost 27.2%. Holding 95.2% of the days in a bear market gives almost the whole decline. The rule has no exit that reacts to price, so the only protection is the one session it skips each month.

Because 2026 is incomplete, its figures stop at the data end. The last position was opened on 2026-10-01 and was still running then.

Month by month

YearJanFebMarAprMayJunJulAugSepOctNovDec
20212.8%0.5%−0.7%4.3%−1.3%6.2%3.5%3.3%−4.7%6.3%4.8%2.7%
2022−9.1%−5.1%5.1%−8.1%−0.7%−9.9%11.9%−4.1%−9.3%7.1%0.0%−8.6%
20236.8%0.4%9.1%−0.4%8.9%5.6%2.5%−1.1%−6.3%−0.7%12.5%4.9%
20245.2%3.8%0.4%−4.0%7.4%7.1%−4.4%0.7%3.1%0.5%4.1%0.5%
20250.0%−2.0%−10.1%−0.4%7.5%9.5%5.6%2.4%9.2%8.0%−6.3%2.8%
20260.3%−3.9%−5.3%18.4%17.4%−2.8%−5.1%7.1%6.6%1.6%––

Month by month, and the months that carried the result

The monthly table shows the strategy's returns, and the fund's own month-of-year averages explain the pattern. XLK averaged 7.38% in May across six Mays, 4.79% in November, 4.19% in October and 3.52% in June. Its weakest calendar months were September at -1.48%, February at -0.7% and December at -0.06%. Each of those averages comes from only five or six calendar months, which makes them a description of this window.

April 2026 was the best month for the rule at 18.42%, with the fund itself at 19.71%. May 2026 was nearly as strong at 17.42%. Those two months make up the two best round trips: April 2026 entered at an adjusted $133.70 and exited at $158.88 for 18.83%, and May 2026 entered at $160.16 and exited at $188.75 for 17.85%. The strategy's worst month was 2025-03 at -10.06%, and buy-and-hold's worst was 2022-09 at -11.65%.

The table also shows how clustered the losses were. Nearly every red month in 2022 is there: January -9.09%, February -5.14%, April -8.06%, June -9.89%, August -4.1%, September -9.28% and December -8.61%. Only March, July, October and November of that year were positive or flat. March 2025 at -10.06% was followed by a flat April at -0.37% and then May at 7.52% and June at 9.52%.

A strategy that is invested nearly all the time cannot choose its months. What this table shows is the fund's month-to-month volatility passing straight through. Annualized volatility of the fund was 25.13%, and a typical month for a fund like that moves several percent in either direction.

Every trade

monthly cycle on XLK made 69 closed round trips and one position still open at the end of the test, an average hold of 28 days, an average winner of 5.47%, an average loser of −4.68%, a profit factor of 2.14, a longest losing streak of 3. It held a position at the close on 95.2% of trading days.

Best 10 round trips

EntryEntry priceExitExit priceReturnDays held
2026-04-01$133.702026-04-30$158.8818.8%29
2026-05-01$160.162026-05-29$188.7517.9%28
2023-11-01$80.762023-11-30$91.1212.8%29
2022-07-01$61.562022-07-29$69.0812.2%28
2025-06-02$114.562025-06-30$125.709.7%28
2025-09-02$127.552025-09-30$139.469.3%28
2023-03-01$66.472023-03-31$72.659.3%30
2023-05-01$73.752023-05-31$80.479.1%30
2025-10-01$139.462025-10-31$150.858.2%30
2025-05-01$106.522025-05-30$114.717.7%29

Worst 10 round trips

EntryEntry priceExitExit priceReturnDays held
2025-03-03$112.192025-03-31$100.63−10.3%28
2022-06-01$68.722022-06-30$61.77−10.1%29
2022-09-01$64.952022-09-30$58.76−9.5%29
2022-01-03$84.222022-01-31$76.40−9.3%28
2022-12-01$65.932022-12-30$60.13−8.8%29
2022-04-01$76.952022-04-29$70.58−8.3%28
2025-11-03$151.192025-11-28$141.41−6.5%25
2023-09-01$86.542023-09-29$80.96−6.5%28
2026-03-02$136.442026-03-31$129.00−5.5%29
2022-02-01$78.042022-02-28$73.94−5.3%27

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 trades: sixty-nine round trips of the same shape

Holding periods were set by the calendar alone: 25 days at the shortest, 30 at the longest, 29 at the median and 28.4 on average. Trade one opened on 2021-01-04 at an adjusted $62.51 and closed on 2021-01-29 at $63.02, a gain of 0.82%. The median return across all trades was also 0.82%, which fits a strategy whose typical month is small and whose result comes from the large months at both ends.

The average winner made 5.47% and the average loser lost 4.68%. Profit factor was 2.14, and the win rate was 64%. Six wins in a row was the longest streak, and three losses in a row the longest bad run. The best trade was 18.83% (April 2026) and the worst was -10.3%, entered 2025-03-03 at $112.19 and exited 2025-03-31 at $100.63.

Five of the six worst trades fell in 2022: January at -9.29%, June at -10.11%, September at -9.53%, December at -8.8% and one more in April. Counting wins by the year the trade closed: nine of 12 in 2021, four of 12 in 2022, eight in 2023, ten in 2024, eight in 2025 and five of nine in 2026. Ten of 12 in 2024 is the best year, and it came in the one year where the strategy outran the fund.

The best list is similarly clustered. Seven of the ten best trades happened in 2023 and 2025, with November 2023 at 12.83% and July 2022 at 12.22% as the outliers from weaker years. July 2022 is a useful example: the fund was in a bear market and this one-month hold from $61.56 to $69.08 earned 12.22%. A strategy that holds each month regardless picks up those rebounds as well as the declines around them.

An open position remained at the data end, bought 2026-10-01 at $196.58 and marked at 1.66%. The 69 closed trips exclude it.

Largest drawdowns

PeakLow pointDepthDays to lowRecoveredDays to recover
2021-12-272023-01-05−32.0%3742023-11-30329
2025-02-182025-04-08−27.7%492025-07-25108
2024-07-102024-08-07−17.4%282024-11-0792

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

Drawdowns: the rule gave no protection

The deepest strategy drawdown was 32.05%, from a peak on 2021-12-27 to a low on 2023-01-05, 374 days later. Recovery came on 2023-11-30, 329 days after the low. Buy-and-hold had its deepest drawdown over the same peak: 32.96%, with the low on 2022-10-12 and recovery on 2023-06-15.

The strategy's low came about three months after the fund's. The equity curve took a further hit in December 2022 (-8.61%) after the fund's October low. The strategy needed 329 days to recover from its low, against 246 for the fund from its own.

The second drawdown was 27.72% from 2025-02-18 to 2025-04-08, which took 49 days to fall and 108 days to recover. The fund's version was 25.29% over the same peak and low, recovering in 65 days. The strategy was deeper and slower here. The March 2025 trade lost 10.3%, the worst of the whole test.

The third drawdown, 17.36% from 2024-07-10 to 2024-08-07, matches the fund's 16.74% with an identical recovery date of 2024-11-07. In all three episodes the rule's drawdown looks like the fund's, sometimes a little deeper and sometimes shallower.

Max drawdown of 32.05% against the fund's 32.96% is a 0.91 point gap in the strategy's favour on that single measure. That is a thin result for a rule that spends 95.2% of days invested. Sharpe was 0.93 against 0.95, which says the return per unit of volatility was a bit lower. The drawdown record shows a rule that follows its fund down and sometimes lags it coming back.

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)20.9%−32.0%$29,6710.93
5 basis points19.4%−32.9%$27,7340.88
10 basis points18.1%−33.7%$25,9430.83

What 5 and 10 basis points did to the result

This rule trades once a month, so costs hit it more than they hit the slow trend templates. The test has 139 fills. Without any charge the account ended at $29,671. Adding 5 basis points per fill pulled the CAGR to 19.44%, the max drawdown 32.89%, the Sharpe ratio 0.877 and the final value $27,734. At 10 basis points the CAGR was 18.06%, the max drawdown 33.72%, the Sharpe ratio 0.828 and the final value $25,943.

Each step of 5 basis points took more than a point off the CAGR. Compare that with a slow rule like the golden cross that trades a few times in the whole window: its cost runs barely move. Here the fills are frequent, and the position is large, 98% of the sleeve at each entry.

The 10 basis point run shows what a realistic cost does to the comparison with buy-and-hold. With 10 basis points the CAGR of 18.06% sits well below the fund's 22.07%. Buy-and-hold in this test has one fill, so it pays almost nothing for trading. A calendar rule with 12 round trips a year has to earn the cost back from timing, and the headline results show it did not earn that back.

Liquidity is deep. Daily dollar volume averaged $1,324,049,811, and a typical minute traded 20,984 shares. A $10,000 position is a trivial order against that, so size is not a constraint here. The charges are a flat assumption on every fill. Real spreads at those two opens are outside the model.

Changing the parameters

VersionCAGRMax drawdownRound tripsWin rateFinal value
Published rules20.9%−32.0%6964%$29,671
Only after a positive month13.1%−26.7%4269%$20,279
Only above the 200-day SMA15.4%−24.8%4567%$22,808
With a 5% profit target16.7%−27.4%6971%$24,311

Three variants, all weaker

Three variants of the monthly rule were tested, each changing one thing, and each finished below the published rules on CAGR.

Every variant shortened the time in the market or the size of the winners. The momentum gate skipped months after a down month and cut the trade count from 69 to 42. It lost the rebounds that follow weak months, such as July 2022, and it finished with the lowest CAGR of the three at 13.1%. The win rate rose to 69% because the filter removed some losing trades, but the winners that remained were not enough to replace the lost months.

The trend gate required the fund to sit above its 200-day average. XLK was above the line on 76.47% of sessions and crossed it 22 times. The gate dropped the trade count to 45 and cut the max drawdown to 24.83%, the lowest of the variants. A drawdown that shallow with a CAGR of 15.44% is a more defensive profile than the published rules, and it still trails on return. The 200-day regime filter template on the same fund returned 16.81% with a 19.72% max drawdown, so the plain regime rule did better than the monthly rule with a trend gate attached.

The 5% profit target kept all 69 trades but raised the number of wins to 49 out of 69, because a trade that touched +5% was sold. That capped the big months. April and May 2026 returned 18.83% and 17.85% in the base run, and the target would have sold both early. The CAGR fell to 16.73%.

Higher win rate with lower return is what a rising fund tends to produce here. The variants buy a smoother ride, with drawdowns of 24.83% to 27.44% against 32.05%, and pay for it with CAGR. None of them beat the fund's 22.07%.

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

XLK: a trending fund that made a calendar rule look fine

On its own price series XLK gained 226.13% across 1,444 sessions. That is a 22.86% CAGR. Volatility ran 25.13% a year, and the worst fall was -33.58% between 2021-12-27 and 2022-10-12. Year by year the fund made 36.99%, -27.73%, 56.01%, 21.64%, 24.61% and, so far in 2026, 39.31%. See the XLK hub page for the full profile.

Up days made 55.23% of sessions. The average gain on an up day was 1.15% and the average loss on a down day was -1.21%. Beta measured 1.39 against SPY and 1.08 against QQQ, with correlations of 0.91 and 0.97, so XLK moved with the broad technology trade. Correlation to TLT was 0.07, close to none.

Most of the fund's return, 55.3%, came overnight, with 44.7% inside the session. The overnight gap averaged 0.69% and the daily range 1.77%. The rule trades at the open, so each month it captures the overnight gap at the start of its holding period and gives up the final session's move. With a majority of the return arriving overnight, a rule that holds across most nights keeps most of the return. That is why it tracks the fund so closely.

Lag-1 autocorrelation was -0.03, which means one day's return carried almost no information about the next. The day-of-week averages were small: Monday 0.21%, Tuesday 0.02%, Wednesday 0.16%, Thursday 0.05% and Friday 0.04%. Nothing in the daily statistics points to a strong calendar edge at the boundaries of the month, and the strategy's result agrees.

The fund also bounced after oversold readings. Fifteen sessions closed with RSI(14) under 30, and the median 5-day return afterwards was 4.01% where the baseline was 0.5%. The 20-day median was 4.4% against 1.9%. A reading of RSI(2) under 10 appeared on 137 sessions, followed by a median 5-day gain of 0.6%. Those readings are rare, and the calendar rule does not use them.

Falls of 10% or more from a 20-day high happened 30 times in XLK, covering 96 sessions. A fund with that many sharp dips will always produce a few bad months for any strategy that stays invested.

The rules

Buy the first session of each month and sell the last, as a calendar-seasonality test.

  1. WHEN the first session of the month opens · IF not invested · THEN buy with 98% of the sleeve (once per month)
  2. WHEN the last session of the month opens · IF invested · THEN sell the whole position

This template uses no indicators. It tests the turn-of-the-month effect by holding from each month's first open to its last. Whatever it earns or loses comes from calendar seasonality alone, so it is a useful comparison against buy-and-hold on the same page.

Good for: measuring how much of an asset's return accrues inside the month versus across month boundaries.
Watch out: this is a research template. It holds ~95% of all sessions, so results usually track buy-and-hold minus the boundary days.

How the monthly rule fits a technology sector fund

The two conditions, first session and last session, reduce the rule to a schedule. Contact with the fund's behaviour happens only between the last session's open and the next month's first open. The strategy is out for that stretch, which includes the whole of the last session and the overnight move into the first. Over six years that is a modest slice, and the exposure of 95.2% reflects it.

The fund's own seasonal profile suggests where a turn-of-the-month rule could matter. May, October and November were the strongest months, and September and February the weakest. A rule that sat out the last session of every month did not turn that profile into an edge, because the strongest and weakest months differ from year to year. September 2021 was -4.71% for the strategy, September 2022 was -9.28%, September 2023 was -6.31%, but September 2024 was 3.15% and September 2025 was 9.15%.

Across the sector ETF category the same rule gave very different results by fund. SOXX returned 29.17% with a 44.51% max drawdown, XLK 20.86% with 32.05%, XLF 11.63% with 23.47%, VOX 5.97% with 46.22%, XLP 5.46% with 13.42% and XLY 3.67% with 43.81%. The rule held 69 round trips on each fund. The spread in results is therefore due to the funds, not the rule. SOXX and XLK gained from their long uptrends, while XLY and VOX did not. Median CAGR for this rule over all 59 funds was 5.46%, and 11.63% within the sector category. XLK sat at rank 6 of 59 for this strategy.

On XLK the rule ranked first of 12 on CAGR, but the other templates gave a different risk profile. The weekly 7% target made 20.39% with a 20.67% drawdown, the 200-day regime filter made 16.81% with 19.72%, and the golden cross made 15.33% with 19.6%. Those three had shallower drawdowns than the monthly cycle. The trend plus trailing stop template had a 32.53% drawdown, deeper than the monthly cycle's, on a CAGR of 12.49%. The dip buyer made 7.85% and the 3-month momentum template 6.06%. See the trend plus trailing stop and RSI(2) snapback pages for the other styles on the same fund.

The conclusion from the data is narrow. A first-to-last schedule on XLK earned about what the fund earned, minus the sessions it skipped, with a similar drawdown. The test does not show a seasonal edge, and it does not show a cost-free path to the fund's return.

Run monthly cycle 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 monthly cycle beat buy-and-hold on XLK?

Over 2021-01-04 to 2026-10-02, monthly cycle on XLK returned 20.9% annualized vs 22.1% for buy-and-hold: it trailed buy-and-hold by 1.2% per year, with a maximum drawdown 0.9 points shallower than holding (32.0% vs 33.0%).

How many trades did it make?

69 completed round trips over 5.7 years (139 fills), with 64% of round trips closing profitably.

Is the turn-of-the-month effect real?

It has appeared in long historical studies, but it depends on the market regime and is small. These pages show the recent five and a half years per ETF.

Did the monthly cycle beat buying and holding XLK?

No. The rule compounded at 20.86% a year to the fund's 22.07%, ending with $29,671 against $31,425. Only two calendar years favoured the rule, 2024 and 2025.

How many trades did the monthly cycle make?

The count was 69 closed round trips across 139 fills, and one position was open when the data ended. Winners numbered 44, a 64% win rate. No trip was shorter than 25 days or longer than 30.

What was the worst drawdown of the monthly cycle on XLK?

The deepest was 32.05%, from 2021-12-27 to 2023-01-05, with recovery on 2023-11-30. Buy-and-hold on XLK had a 32.96% drawdown from the same peak. The rule gave almost no protection in the 2022 decline.

How much do trading costs matter here?

They matter more than for slow rules because the rule trades every month. A 5 basis point charge left 19.44% a year and 10 basis points left 18.06%, from 20.86% with no charge.

Do the variants of the monthly cycle improve on XLK?

None improved the CAGR. Trading only after a positive month gave 13.1%, trading only above the 200-day average gave 15.44% and adding a 5% profit target gave 16.73%. The trend gate had the shallowest drawdown at 24.83%.

Which template did best on XLK?

On CAGR the monthly cycle came first among 12 templates at 20.86%, with the weekly 7% target second at 20.39%. The weekly target had the shallower drawdown of the two. All of this is hypothetical and covers one window and one fund.

Related

First-to-Last Day of Month 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.