Did Holding XLK Beat the S&P 500 in This Backtest?
Long-Term Comparison • Did Holding XLK Beat the S&P 500 in This Backtest?
💡 Summary
Did holding US technology stocks through XLK outperform the broader market? Over the full backtest, XLK had a 9.76% annualized return versus 8.52% for SPY, but its maximum drawdown was much deeper: -82.05% versus -55.19%.
Key Metrics & Specifications
| Test Period | 1998-12-22 to 2026-11-18 |
| Strategy CAGR | 9.76% |
| Strategy Max Drawdown | -82.05% |
| Strategy Sharpe | 0.49 |
| SPY CAGR | 8.52% |
| SPY Max Drawdown | -55.19% |
| Execution & Costs | Signal on the close, fill at the next close; 0.1% per side; doubled-cost CAGR 9.75% |
| Rules | Buy US technology stocks (XLK) at the start and hold it with dividends reinvested. Compare with holding SPY over the same dates. Decisions use the close; trades fill at the next day's close. |
| Out-of-Sample CAGR | 21.29% vs SPY 14.15% from 2018-07 |
What the experiment recorded
| Run | CAGR | Max drawdown |
|---|---|---|
| Strategy | 9.76% | -82.05% |
| SPY | 8.52% | -55.19% |
Sampled historical portfolio values from the experiment export. The plotted observations can omit intervening peaks and troughs; use the reported maximum drawdown above.
1998-12-22 – 2026-11-18. Export dated 2026-11-20. Historical simulation; future results can differ. Read the underlying experiment.
⚡ Interactive Compound Growth Simulator
Adjust initial investment and holding duration to calculate compounded terminal wealth.
* Hypothetical illustration for educational purposes only. Past backtest results do not guarantee future returns.
Compare investment strategies
Explore the assumptions and results behind different historical strategies.
Historical results do not guarantee future returns.
The question behind the comparison
A reader may want to know whether a long-term investment in US technology stocks has delivered stronger returns than the broader market, and what risks came with those returns.
This historical backtest compares XLK with SPY over the same dates. It shows what happened under the stated rules, rather than what will happen in the future.
How the rules work
The strategy holds XLK from the start and reinvests dividends. The comparison holds SPY over the same period. Decisions use the close, and trades fill at the next day's close.
People use a buy-and-hold approach to maintain exposure to a market without repeatedly changing positions. Here, that exposure is concentrated in US technology stocks.
What the results show
From 1998-12-22 to 2026-11-18, the strategy returned 9.76% annualized, compared with 8.52% for SPY. Its Sharpe ratio was 0.49 versus 0.52 for SPY, indicating a lower risk-adjusted return by that measure.
In the out-of-sample period beginning 2018-07, the strategy returned 21.29% annualized versus 14.15% for SPY. In the in-sample period, it returned 5.16% versus 6.19% for SPY.
When the assumed trading cost was doubled, the strategy's annualized return was 9.75% and its maximum drawdown remained -82.05%. The backtest recorded 1 trade.
Where the approach struggles
The strategy's maximum drawdown of -82.05% was substantially deeper than SPY's -55.19%. In its worst year, 2000, the strategy returned -41.88% while SPY returned -9.74%.
The strategy was invested rather than in cash for 99.97% of days, leaving little time out of the market during declines. Its concentration in technology stocks also makes its results sensitive to that sector.
This is historical research, not a forecast. Past simulated results do not predict future returns.
⚠️ Risk Considerations
A historical backtest cannot establish future returns, and the strong out-of-sample result may not persist. Deep losses and concentration in technology stocks are central risks, while actual trading costs and execution may differ from the assumptions used here.
🎯 Target Audience
This page is for retail investors comparing long-term technology exposure with a broader US stock market benchmark.
Frequently Asked Questions (FAQ)
Q. Did XLK outperform SPY over the full backtest?
Yes. XLK's annualized return was 9.76%, compared with 8.52% for SPY, although XLK had a deeper maximum drawdown.
Q. How did XLK perform in the out-of-sample period?
From 2018-07, the strategy returned 21.29% annualized versus 14.15% for SPY. Its Sharpe ratio was 0.85 versus 0.79 for SPY.
Q. Did higher assumed trading costs change the result?
With doubled trading costs, the strategy's annualized return was 9.75%, compared with 9.76% in the main run. Its maximum drawdown remained -82.05%.
Compare investment strategies
Explore the assumptions and results behind different historical strategies.
Historical results do not guarantee future returns.