Wants vs Needs: I Backtested 27 Years of Consumer Stocks. The Boring Side Lost, Except When It Counted
Would you rather own companies selling what people want, or what people need?
Here's a simple way to split the economy. Some companies sell things people want: cars, vacations, restaurant meals, new clothes, online shopping. Others sell things people need: toothpaste, groceries, soap, soda, cigarettes. When times are good, people buy more of the first. When times are bad, they still buy the second.
Two sector funds hold exactly these two groups from the S&P 500. XLY is consumer discretionary, the wants. XLP is consumer staples, the needs. Both have daily data from December 1998, so I ran them head to head through October 23, 2026, dividends reinvested, with SPY as the referee.
Over the full 27 years, wants beat needs by about 2.5 points a year, and they beat the S&P 500 too. In money, the wants fund ended with almost twice as much. It also won most of the time: 21 of 29 calendar years (1998 from December 23, 2026 to date), 69.8% of the 215 rolling 10-year windows and 74.5% of the 275 rolling 5-year windows.
So the answer is wants, case closed? Not quite. The price of those extra 2.5 points was a much rougher ride. XLY swung about 22.6% a year against 15.3% for staples, and in 2008 it lost more than half its value. The staples fund's worst drop in 27 years was -35.9%.
The crash test
Staples are supposed to be the shelter. People don't stop brushing their teeth in a recession. So here is what each fund did in the four big sell-offs of the period.
| Sell-off | XLY (wants) | XLP (needs) | SPY (S&P 500) |
|---|---|---|---|
| Dot-com bust (Mar 24, 2000 – Oct 9, 2002) | -22.8% | -0.6% | -47.2% |
| Financial crisis (Oct 9, 2007 – Mar 9, 2009) | -56.5% | -28.1% | -54.8% |
| COVID crash (Feb 19 – Mar 23, 2020) | -33.2% | -24.2% | -33.4% |
| 2022 (calendar year) | -36.3% | -0.8% | -18.2% |
Staples did their job every time: they fell less than wants in all four, and in two of them (the dot-com bust and 2022) they finished almost flat while the market fell hard. The surprise is the dot-com row. Wants fell far less than the S&P 500 then, because that crash was centered on tech. In 2008, when the crisis hit jobs and credit, the wants fund fell even more than the market.
2022 is the one that matters for anyone investing today. From its November 2021 high to its December 2022 low, XLY lost 39.7%, and it didn't get back to that high until November 2024, three years later. Since the start of 2022, needs have beaten wants: 5.57% a year against 2.99%. In 2026 so far, staples are up 15.8% and discretionary is down 4.7%.
XLY isn't an even mix of shops, carmakers and restaurant chains. It leans heavily on a couple of giants, Amazon and Tesla above all, so a big part of its recent returns rides on two stocks. Before you treat these as clean bets on the consumer, look at what's actually inside.
When to own which: the regime test
The pattern above is about the environment, not the products. Wants win when money is easy and people feel confident; needs hold up when stress rises. So I tested both with a daily market regime signal: hold the fund on Risk ON and Neutral days, sit in cash on Risk OFF days. The signal's daily history starts in August 2018.
| Stress period | XLY, held | XLY, out in Risk OFF | XLP, held | XLP, out in Risk OFF |
|---|---|---|---|---|
| COVID crash (Feb 19 – Mar 23, 2020) | -33.2% | -10.3% | -24.2% | -3.7% |
| 2022 sell-off (Jan 3 – Oct 12, 2022) | -31.6% | +11.5% | -10.6% | +3.7% |
| Tariff shock (Feb 19 – Apr 8, 2025) | -21.9% | -20.0% | -5.1% | -3.6% |
Over these eight years, wants and needs held through everything finished almost level ($21,600 vs $20,000), and the wants fund took the much bigger worst drop. With the Risk OFF rule, XLY's 2022 nearly vanished (+0.3% for the year instead of -36.3%), and the wants fund came out far ahead. In other words, most of the reason to own staples instead of discretionary was protection, and in this backtest the signal provided much of that protection on its own.
Two honest caveats. First, the filter barely helped in the 2025 tariff shock: the drop came too fast. Second, the stricter version (staples only on Risk ON days) actually hurt: 6.56% a year against 8.86% for simply holding XLP. Staples already have a smaller drawdown, so sitting in cash most of the time mostly costs you their slow, steady gains.
What the filter costs you
- You miss some gains. In 2019 the filtered XLY made 24.0% against 28.4% held; filtered XLP lost 5.3% in 2025 while plain XLP made 1.5%.
- You trade. The signal moved into or out of Risk OFF about 7 times a year. In a taxable account those are short-term gains; in an IRA it doesn't matter.
- It is a backtest. The signal's history before March 2026 was generated by the model after the fact, so treat the exact figures as an upper bound, not a promise. Cash earned nothing here.
My take
Over 27 years, owning what people want made more money than owning what people need, about 2.5 points a year. You paid for it with crashes that were up to twice as deep. Staples are insurance: you give up return in good years to lose less in bad ones, and in the dot-com bust and 2022 that insurance paid out in full.
Most people don't own either fund on purpose. They own both, through an S&P 500 fund or a mix of funds, without knowing the split. If you want to know whether your portfolio leans toward wants or needs, and what that did in past crashes, check it before the next one.
Questions readers ask
Is consumer discretionary or consumer staples the better long-term investment?
From December 1998 to October 2026, XLY (discretionary) returned 9.39% a year and XLP (staples) 6.88%, dividends reinvested. Discretionary won 69.8% of rolling 10-year windows. Staples had much smaller drops: -35.9% at worst against -59.0%.
How did consumer staples do in market crashes?
XLP lost 0.6% in the dot-com bust (S&P 500: -47.2%), 28.1% in the 2008 crisis (S&P 500: -54.8%), 24.2% in the COVID crash and 0.8% in 2022 (S&P 500: -18.2%). It fell less than XLY in all four.
Why did XLY fall so much in 2022?
XLY lost 36.3% in 2022 and 39.7% from its November 2021 high to its December 2022 low, taking until November 2024 to recover. Discretionary stocks depend on confident consumers and easy money, and the fund leans heavily on a few large growth names.
Can market timing help with sector choice?
In a backtest from August 2018 to October 2026, holding XLY except on Risk OFF days of a daily macro regime forecast raised its return from 9.87% to 26.06% a year and cut the worst drop from -39.7% to -28.1%. For staples the gain was smaller, and holding XLP only on Risk ON days lowered its return. The results are hypothetical.
How much would $10,000 in XLY vs XLP be worth today?
About $121,600 in XLY (consumer discretionary) and $63,800 in XLP (consumer staples), invested December 23, 1998 and held to October 2026 with dividends reinvested. The S&P 500 (SPY) turned the same $10,000 into $101,900.
Are consumer staples a good recession hedge?
In this data, mostly yes. Staples fell less than discretionary in all four big sell-offs since 1998, and finished almost flat in the dot-com bust (-0.6%) and 2022 (-0.8%). They still fell 28.1% in the 2008 crisis and 24.2% in the COVID crash, so they cushion losses rather than prevent them.
Is XLP a good investment for retirement?
It trades return for a smoother ride. From December 1998 to October 2026, XLP returned 6.88% a year against 8.70% for SPY and 9.39% for XLY, but its worst drop was -35.9% and its yearly swings were 15.3% against 22.6% for XLY. Think of it as insurance: you give up return in good years to lose less in bad ones.
Why do consumer staples underperform?
Because they give up gains in good markets in exchange for falling less in bad ones. Over 27 years staples trailed discretionary by about 2.5 points a year, and XLY beat XLP in 21 of 29 calendar years. People keep buying groceries and soap in a recession, but they spend more on wants when times are good.
Are consumer staples or discretionary doing better in 2026?
Staples. In 2026 so far, XLP is up 15.8% and XLY is down 4.7%, and since the start of 2022 staples have returned 5.57% a year against 2.99%. Over the full period from December 1998, discretionary still leads, 9.39% a year against 6.88%.
Should you switch between consumer discretionary and staples based on the market?
In this backtest, a timing rule did much of the staples' job on its own. From August 2018 to October 2026, XLY held on every day except Risk OFF days of a daily macro regime forecast that scores market stress, liquidity, sentiment and the economic cycle made 26.06% a year, and its 2022 was +0.3% instead of -36.3%. Holding staples only on Risk ON days hurt, though: 6.56% a year against 8.86% for simply holding XLP. The results are hypothetical and backtested.
How I tested it
- Prices: daily closes adjusted for dividends and splits, XLY, XLP and SPY from December 23, 1998 to October 23, 2026.
- Crash windows use fixed dates for every fund: the S&P 500's dot-com and 2008 peak-to-trough dates, the COVID crash peak to bottom, and calendar 2022.
- Rolling windows: every 5- and 10-year window starting on the first trading day of each month; a window counts as a win if the fund ended with more money.
- Signal test: each day's exposure is set by the previous day's regime reading (no look-ahead). Risk ON and Neutral = 100% in the fund, Risk OFF = cash at 0%; the stricter version holds the fund only in Risk ON. No trading costs or taxes.
- The regime signal's history from August 2018 to March 2026 was generated by the model after the fact; readings since then were published live.
Backtested, hypothetical results: not actual trading, and they may not reflect taxes, fees or trading costs beyond those stated. Past performance, actual or hypothetical, does not guarantee future results. This is education, not personal investment advice.
Next strategy test: SCHD vs the S&P 500 →
All 20 strategies compared in one test: All 20 strategies, one test →