First-to-Last Day of Month on XLY
Consumer Discretionary Select Sector SPDR Fund: consumer discretionary stocks, a cyclical read on the US consumer. Backtest 2021-01-04 to 2026-10-02, $10,000 starting capital, computed by the same engine that runs live DeployQuant strategies.
Consumer Discretionary Select Sector SPDR Fund (XLY) holds US consumer cyclical stocks. The monthly cycle template enters at the open of each month's first session and exits at the open of its last session, which means roughly 28 days in the fund and a gap around every month boundary. Between 2021-01-04 and 2026-10-02, $10,000 grew to $12,300.15 under the rule: 3.67% a year, 23% in total. Holding XLY for the same stretch finished at $14,177.03, or 6.27% a year.
The rule trailed holding by 2.6 points of CAGR and by $1,876.88 of end equity. It also had the deeper drawdown, 43.81% against 39.06%, so the template gave up return and took more risk in the same window. The Sharpe ratio was 0.28 for the rule and 0.39 for holding. The rule beat holding in one calendar year, 2025, and trailed in the other five.
The template has no indicators. It tests what the turn of the month adds on this fund, and on XLY the skipped boundary days cost it return. It made 69 closed round trips and 36 of them won, a win rate of 52%. The average winner returned 4.85% and the average loser lost 4.31%, giving a profit factor of 1.15. It was invested on 95.2% of days, so it behaves like a slightly lagged copy of the fund.
All figures are hypothetical and cover a single 5.74 year window. Headline numbers carry no fees or slippage, and 139 fills make the rule sensitive to both, as the cost runs show. By CAGR the monthly cycle is 6th of the 12 templates on XLY, and XLY is 33rd of 59 funds for the rule.
Year by year
| Year | monthly cycle | buy & hold |
|---|---|---|
| 2021 | 22.2% | 28.5% |
| 2022 | −41.1% | −35.7% |
| 2023 | 33.7% | 38.7% |
| 2024 | 25.2% | 26.0% |
| 2025 | 12.1% | 7.3% |
| 2026 | −7.7% | −7.2% |
Calendar years against holding
The two equity curves moved together because the rule held the fund for about 95% of sessions. The yearly table shows the same direction in every year, with small differences that add up to the gap in the headline.
2021: the rule returned 22.2% and holding 28.5%, with the rule behind by 6.3 points. The window opens at the start of January and the rule made 2.15% on its first trade, which ran from 2021-01-04 at $77.16 to 2021-01-29 at $78.82. Eight of the 12 round trips closed that year were wins. The best was October at 9.32% in the monthly table, and the rule's weak months were May (-3.19%) and December (-0.98%).
2022: the rule lost 41.1% and holding lost 35.7%, with the rule behind by 5.4 points. This is the year that explains most of the drawdown difference. Only 3 of the 12 round trips that closed in 2022 were wins. January was -13.78% in the monthly table, April -9.81%, June -11.18% and December -11.98%, and only March (5.86%) and July (15.44%) were strongly positive among the first seven months. The monthly cycle holds through the whole month, so if the fund's losses come mostly inside the month the rule takes them in full, and in 2022 it did.
2023: the rule returned 33.7% and holding 38.7%, behind by 5 points. January 2023 made 12.34% and June 11.1%, and both are among the best trades of the test. November added 10.06% and December 6.98%. The rule still trailed, since seven of 12 round trips won and the losses in September (-5.39%) and October (-5.35%) were large.
2024: the rule made 25.2% against 26% for holding, a gap of 0.8 points, one of the three closest years. 2025 is the year the rule won: it made 12.1% and holding 7.3%, ahead by 4.8 points. The rule's February was -6.55% and March -10.55%, and April lost only 1.75%. Its May (7.69%), July (4.16%), August (7.83%) and September (5.22%) were strong. 2026 to date shows -7.7% for the rule and -7.2% for holding, a gap of 0.5 points, with only 3 of 9 closed trades winning.
The pattern across years is that the rule gave up a small amount in most years and gained in one. A difference of a few points per year on a template that skips about 5% of days is the price of the boundary days in this window.
Month by month
| Year | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2021 | 3.5% | −0.9% | 2.5% | 5.0% | −3.2% | 2.8% | 0.6% | 1.0% | −0.7% | 9.3% | 1.9% | −1.0% |
| 2022 | −13.8% | −5.2% | 5.9% | −9.8% | −5.1% | −11.2% | 15.4% | −3.4% | −6.8% | 1.1% | −3.2% | −12.0% |
| 2023 | 12.3% | −1.6% | 1.3% | −0.8% | 3.2% | 11.1% | 1.0% | −1.4% | −5.4% | −5.3% | 10.1% | 7.0% |
| 2024 | −2.8% | 6.7% | 0.1% | −3.0% | −0.5% | 4.2% | 1.9% | −1.3% | 7.2% | −0.2% | 9.5% | 1.7% |
| 2025 | 3.9% | −6.5% | −10.6% | −1.8% | 7.7% | 2.9% | 4.2% | 7.8% | 5.2% | 0.4% | −2.5% | 2.4% |
| 2026 | 1.1% | −3.8% | −5.3% | 7.5% | 2.3% | −1.9% | −2.0% | −1.3% | −4.8% | 0.8% | – | – |
The months that made and lost the money
The best month for the rule was July 2022 at 15.44%, while holding had 17.99% in the same month. The worst was January 2022 at -13.78%. Holding's worst month was April 2022 at -11.72%, a month in which the rule lost 9.81%. The rule's second and third worst months were December 2022 (-11.98%) and June 2022 (-11.18%), so three of its four worst months fell in 2022, and the fourth was March 2025 at -10.55%.
The fund's own month-of-year averages are in the facts, with 5 or 6 observations each. November averaged 5.12% and July 4.24%, while September averaged -1.9% and February -1.56%. The rule holds through every month, so the seasonal pattern is the same for the fund and the rule. With so few observations per month these are descriptions of one window.
Overnight movement made up 89.7% of the fund's log return and intraday movement 10.3%. The monthly cycle buys and sells at the open, which means it earns overnight gaps between the buy and the sell and misses the gap into the first open and the gap out of the last close. The fund's average overnight gap was 0.63% and its average intraday range 1.68%. With so much of the return arriving overnight, the open-to-open holding period still captures most of it, and the skipped days are where the rest went.
Every trade
monthly cycle on XLY 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 4.85%, an average loser of −4.31%, a profit factor of 1.15, a longest losing streak of 4. It held a position at the close on 95.2% of trading days.
Best 10 round trips
| Entry | Entry price | Exit | Exit price | Return | Days held |
|---|---|---|---|---|---|
| 2022-07-01 | $66.68 | 2022-07-29 | $77.24 | 15.8% | 28 |
| 2023-01-03 | $62.81 | 2023-01-31 | $70.78 | 12.7% | 28 |
| 2023-06-01 | $73.77 | 2023-06-30 | $82.14 | 11.3% | 29 |
| 2023-11-01 | $74.58 | 2023-11-30 | $82.31 | 10.4% | 29 |
| 2024-11-01 | $98.76 | 2024-11-29 | $108.44 | 9.8% | 28 |
| 2021-10-01 | $86.65 | 2021-10-29 | $94.93 | 9.6% | 28 |
| 2025-08-01 | $107.30 | 2025-08-29 | $115.95 | 8.1% | 28 |
| 2025-05-01 | $98.02 | 2025-05-30 | $105.74 | 7.9% | 29 |
| 2026-04-01 | $109.14 | 2026-04-30 | $117.53 | 7.7% | 29 |
| 2024-09-03 | $91.69 | 2024-09-30 | $98.46 | 7.4% | 27 |
Worst 10 round trips
| Entry | Entry price | Exit | Exit price | Return | Days held |
|---|---|---|---|---|---|
| 2022-01-03 | $100.00 | 2022-01-31 | $85.92 | −14.1% | 28 |
| 2022-12-01 | $70.86 | 2022-12-30 | $62.15 | −12.3% | 29 |
| 2022-06-01 | $74.98 | 2022-06-30 | $66.37 | −11.5% | 29 |
| 2025-03-03 | $107.05 | 2025-03-31 | $95.45 | −10.8% | 28 |
| 2022-04-01 | $89.59 | 2022-04-29 | $80.61 | −10.0% | 28 |
| 2022-09-01 | $74.51 | 2022-09-30 | $69.32 | −7.0% | 29 |
| 2025-02-03 | $112.08 | 2025-02-28 | $104.59 | −6.7% | 25 |
| 2023-09-01 | $83.70 | 2023-09-29 | $79.08 | −5.5% | 28 |
| 2023-10-02 | $77.95 | 2023-10-31 | $73.69 | −5.5% | 29 |
| 2026-03-02 | $113.19 | 2026-03-31 | $107.03 | −5.4% | 29 |
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.
Seventy trades in a regular pattern
The trade list has 70 rows: 69 closed and one still open, bought on 2026-10-01 at $109.13 and showing 0.84% at the last close. The calendar fixes the dates, so holds range only from 25 to 30 days, with a median of 29 and an average of 28.4. The median trade returned 0.45%, which shows how thin the edge was. The longest winning streak was 6 trades and the longest losing streak 4.
The best trade was bought on 2022-07-01 at $66.68 and sold on 2022-07-29 at $77.24 for 15.84%. Next came 12.69% from 2023-01-03 to 2023-01-31, 11.35% in June 2023, 10.36% in November 2023 and 9.8% in November 2024. Four of the five best trades came in 2023 and 2024.
The worst trade was bought on 2022-01-03 at $100.00 and sold on 2022-01-31 at $85.92, a loss of 14.08%. Then came 12.29% in December 2022, 11.48% in June 2022, 10.84% in March 2025 and 10.02% in April 2022. Four of the five worst trades closed in 2022. The average winner of 4.85% and the average loser of 4.31% are close in size, so the profit factor of 1.15 depends on 36 wins from 69 trades.
The per-year record is worth reading. In 2021 eight of 12 trades won, in 2022 three, in 2023 seven, in 2024 seven and in 2025 eight. In 2026 to date three of 9 won. Years in which the fund trended up produced the best hit rates, and the one down year produced the worst.
Largest drawdowns
| Peak | Low point | Depth | Days to low | Recovered | Days to recover |
|---|---|---|---|---|---|
| 2021-11-19 | 2022-12-28 | −43.8% | 404 | 2024-12-17 | 720 |
| 2025-02-04 | 2025-04-08 | −26.2% | 63 | 2025-08-26 | 140 |
| 2026-01-12 | 2026-03-30 | −12.5% | 77 | not yet | – |
Buy-and-hold's deepest drawdown ran from 2021-11-19 to 2022-12-28 and reached −39.1%.
The 2022 drawdown and the two that followed
The rule's deepest drawdown was 43.81%, from a peak on 2021-11-19 to a low on 2022-12-28, which took 404 days. It recovered on 2024-12-17, 720 days after the low. Holding XLY had a 39.06% drawdown over the same dates, with the low on 2022-12-28, and recovered on 2024-11-06 after 679 days. The rule had the deeper fall and the later recovery, since its monthly losses compounded with the full month in the market and it made less on the rebounds.
A second fall of 26.23% began on 2025-02-04 and bottomed on 2025-04-08, 63 days later, with recovery on 2025-08-26 after 140 more. Holding's version of that episode was 25.64%, measured from 2024-12-17, and healed on 2025-09-12. A third drawdown of 12.53% started 2026-01-12 and bottomed 2026-03-30, still open at the end. Holding's own 2026 drawdown was 14.79%, also unrecovered.
The rule's drawdown being deeper than the fund's is the opposite of what a part-time strategy usually shows, and it is the main finding on this page. The monthly cycle does not step aside in downtrends, so it takes market risk without a filter. The 2022 bear market ran across 12 consecutive monthly holds. The fund's worst days (-6.54% on 2022-05-18, -5.97% on 2025-04-03 and -5.49% on 2022-05-05) were inside holding periods.
With trading costs
The headline run fills at the bar price. These runs charge slippage on every fill.
| Slippage per fill | CAGR | Max drawdown | Final value | Sharpe |
|---|---|---|---|---|
| None (headline) | 3.7% | −43.8% | $12,300 | 0.28 |
| 5 basis points | 2.5% | −44.5% | $11,514 | 0.23 |
| 10 basis points | 1.3% | −45.2% | $10,772 | 0.18 |
Execution costs with 139 fills
Each closed trade has a buy and a sell, and the open position adds a buy, which makes 139 fills. Charging 5 basis points on every fill pulled CAGR from 3.67% down to 2.49% and end equity from $12,300.15 to $11,513.86. At 10 basis points CAGR was 1.3% and end equity $10,771.66. Maximum drawdown went from 43.81% to 44.53% and then 45.18%, while the Sharpe ratio dropped from 0.28 to 0.233 and 0.181.
Small per-trade gains explain the sensitivity. The median trade returned 0.45%, so a charge of 5 basis points at both ends takes a visible slice of it. With 10 basis points the account finished not far above its starting cash. Liquidity is not the issue here: XLY trades an average of $892,144,651 a day and a median of 15,102 shares a minute, so a $10,000 order is tiny against that. The test applies one flat charge and has no spread model, so the 3.67% headline stands for free execution.
Changing the parameters
| Version | CAGR | Max drawdown | Round trips | Win rate | Final value |
|---|---|---|---|---|---|
| Published rules | 3.7% | −43.8% | 69 | 52% | $12,300 |
| Only after a positive month | −1.5% | −37.5% | 43 | 51% | $9,153 |
| Only above the 200-day SMA | 2.0% | −20.3% | 40 | 53% | $11,186 |
| With a 5% profit target | 3.8% | −37.0% | 69 | 58% | $12,388 |
Three variants of the monthly rule
Three variants were run, each adding a condition or an exit:
- Only after a positive month: CAGR -1.53%, maximum drawdown 37.45%, final value $9,152.88, Sharpe -0.023, 43 trades and 22 wins.
- Only above the 200-day SMA: CAGR 1.97%, maximum drawdown 20.31%, final value $11,185.75, Sharpe 0.209, 40 trades and 21 wins.
- With a 5% profit target: CAGR 3.8%, maximum drawdown 36.98%, final value $12,388.24, Sharpe 0.298, 69 trades and 40 wins.
The momentum gate was the worst result, a negative CAGR from a rule that skips months after a loss. On XLY a down month was not a reliable sign that the next month would also fall, and the filter removed good rebounds, such as July 2022 and January 2023, which followed losing months. The trend gate cut the maximum drawdown to 20.31% by staying out when the fund was below its 200-day average, which is the shallowest of the group, but the CAGR of 1.97% was lower than the published rule's. The fund crossed its 200-day average 59 times, and that many crossings means the trend gate switched on and off often.
The 5% profit target gave the highest CAGR, 3.8%, and the highest Sharpe, 0.298, with 40 wins from 69 trades. Its drawdown of 36.98% was shallower than the published 43.81%. Taking profit early removed some of the late-month exposure that carried the 2022 losses. The gain is small, and it is one variant tested on one fund in one window, so it should be read as a direction of change.
How XLY behaved
| Measure | XLY |
|---|---|
| Data in this test | 2021-01-04 to 2026-10-02 (1444 sessions) |
| Total return, buy and hold | 44.7% |
| Annualized volatility | 23.3% |
| Deepest drawdown | −39.7% (2021-11-19 to 2022-12-28) |
| Up days | 53.0% |
| Average daily range | 1.68% |
| Average overnight gap | 0.63% |
| Correlation to SPY | 0.87 |
| Correlation to QQQ | 0.86 |
| Correlation to TLT | 0.11 |
| Sessions above the 200-day average | 65.1% |
| Crossings of the 200-day average | 59 |
| Falls of 10% or more from a 20-day high | 24 |
How XLY behaved
On the fund's own price series XLY gained 44.67%, or 6.64% a year, with volatility of 23.32%. The worst fall, 39.67%, ran from the 2021-11-19 peak to the 2022-12-28 low, and the longest time under water was 743 sessions, ending with the 2024-11-06 recovery. Calendar returns went 29.05%, -36.28%, 39.68%, 26.51%, 7.36% and -7.26% (2026 to date) from 2021 on. The fund handed back its 2021 gain in 2022 and rebuilt it across 2023 and 2024.
Against SPY the fund had a beta of 1.24 and a correlation of 0.87, and against QQQ a beta of 0.89 and a correlation of 0.86, with only 0.11 to TLT. Up days made up 53.01% of sessions, averaging 1.06%, while down days averaged -1.13%. Lag-one autocorrelation of -0.02 means yesterday told you nothing about today. Price sat above its 200-day average for 65.06% of sessions and crossed it 59 times in 1,444 sessions, which is frequent switching and fits the poor showing of trend rules here. The 200-day regime filter returned -2.16% a year and the trend plus trailing stop -4.4%, the two lowest of the 12 templates.
Its largest single-day gains were 10.79% on 2025-04-09, 7.27% on 2022-11-10 and 5.07% on 2025-05-12. A 10% drop from a 20-day high happened 24 times, covering 98 days. After RSI(14) closed under 30, which happened on 27 sessions, the median 5-day return was -0.17% against a baseline of 0.22%. RSI(2) under 10 occurred on 152 sessions and was followed by a median 5-day return of 0.74%.
The rules
Buy the first session of each month and sell the last, as a calendar-seasonality test.
- WHEN the first session of the month opens · IF not invested · THEN buy with 98% of the sleeve (once per month)
- 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.
Ranking among the templates and among sector funds
Sixth place on XLY puts the monthly cycle behind five templates: the weekly 7% target at 10.19% with a 24.73% drawdown, the RSI(2) snapback at 8.2% and 16.62%, the RSI mean reversion at 7% and 20.65%, the dip buyer at 4.01% and 32.73% and the momentum breakout at 3.83% and 18.35%. Behind it were the EMA 12/26 trend at 2.36%, the golden cross at 1.35%, the SMA 10/50 trend at 0.35%, the 200-day regime filter at -2.16%, the 3-month momentum at -3.94% and the trend plus trailing stop at -4.4%.
The monthly cycle had the deepest drawdown of the whole group at 43.81%. The two RSI rules and the momentum breakout made more with a drawdown between 16.62% and 20.65%. Mean-reversion rules suited a fund that crossed its 200-day average so often, and trend rules did not.
Across the 6 sector funds the template returned 29.17% on SOXX, 20.86% on XLK, 11.63% on XLF, 5.97% on VOX, 5.46% on XLP and 3.67% on XLY, the lowest of the six. The category median was 11.63% against 5.46% across all 59 funds. XLY's result sits below both medians, and its drawdown of 43.81% was third deepest, behind VOX at 46.22% and SOXX at 44.51%. All six funds made 69 round trips, since the calendar sets the trade count.
The test stops at one 5.74 year window with a single bear market and a sharp recovery, a headline run without costs, and three hand-picked variants. The monthly cycle page lists the template on all 59 funds, and the XLY page compares all 12 templates on this fund.
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 XLY?
Over 2021-01-04 to 2026-10-02, monthly cycle on XLY returned 3.7% annualized vs 6.3% for buy-and-hold: it trailed buy-and-hold by 2.6% per year, with a maximum drawdown of 43.8% (buy-and-hold: 39.1%).
How many trades did it make?
69 completed round trips over 5.7 years (139 fills), with 52% 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 buy and hold on XLY?
No. From 2021-01-04 to 2026-10-02 the rule made a CAGR of 3.67% against 6.27% for holding and ended at $12,300.15 against $14,177.03. It won only in 2025. Its maximum drawdown was 43.81% against 39.06%.
How many trades does the monthly cycle make on XLY?
It made 69 closed round trips and had one open at the end, with 139 fills. Each trade is held for 25 to 30 days. A total of 36 trades won, a win rate of 52%.
What is the turn-of-the-month effect in this test?
The template holds from the first session of each month to the last session and sits out the days between. It uses no indicators. On XLY it made less than holding, so the days it skipped did not hurt the fund's return.
How bad was the 2022 drawdown for the monthly cycle on XLY?
The rule fell 43.81% from 2021-11-19 to 2022-12-28 and took until 2024-12-17 to recover. Holding XLY fell 39.06% over the same dates. Only 3 of the 12 trades that closed in 2022 were wins.
Do trading costs matter for the monthly cycle on XLY?
Yes. With 5 basis points of slippage the CAGR fell from 3.67% to 2.49%, and with 10 basis points it was 1.3%. The rule made 139 fills and a median trade returned 0.45%.
Does a trend or momentum filter help the monthly cycle on XLY?
The 200-day SMA filter cut the drawdown to 20.31% but made 1.97% a year. Skipping months after a loss made -1.53% a year. A 5% profit target made 3.8%, a little more than the published 3.67%.
Related
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.