XLP Golden Cross Backtest: Does It Beat Holding XLP?
Market Timing Research • XLP Golden Cross Backtest: Does It Beat Holding XLP?
💡 Summary
Does the XLP golden cross beat holding XLP? Over the full backtest, the strategy returned 5.00% annually versus 7.04% for XLP, while its maximum drawdown was shallower. The historical result does not establish how the approach will perform in the future.
Key Metrics & Specifications
| Test Period | 1998-12-22 to 2026-11-25 |
| Strategy CAGR | 5.00% |
| Strategy Max Drawdown | -26.78% |
| Strategy Sharpe | 0.47 |
| XLP CAGR | 7.04% |
| XLP Max Drawdown | -35.89% |
| Execution & Costs | Signal on the close, fill at the next close; 0.1% per side; doubled-cost CAGR 4.72% |
| Rules | Compute the 50-day and 200-day simple moving averages of US consumer staples stocks (XLP). Hold XLP while the 50-day average is above the 200-day average. Otherwise hold cash (Treasury bills). Decisions use the close; trades fill at the next day's close. |
| Out-of-Sample CAGR | 5.19% vs XLP 9.80% from 2018-07 |
What the experiment recorded
| Run | CAGR | Max drawdown |
|---|---|---|
| Strategy | 5.00% | -26.78% |
| XLP | 7.04% | -35.89% |
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-25. Export dated 2026-11-27. 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.
What question does this backtest answer?
The backtest asks whether using a moving-average signal to switch between XLP and cash improved on holding XLP throughout the period. It compares returns and risk measures over a historical period, rather than testing a guaranteed outcome.
How do the rules work?
The strategy holds XLP while its 50-day simple moving average is above its 200-day simple moving average. Otherwise, it holds cash in Treasury bills. Decisions use the close, and trades fill at the next day's close.
People use this type of rule to follow a longer-term trend and move to cash when the signal turns unfavorable. That can reduce exposure during some declines, but it can also miss gains or trigger trades around a changing signal.
What do the results show?
From 1998-12-22 to 2026-11-25, the strategy had a 5.00% annualized return and a -26.78% maximum drawdown. XLP returned 7.04% annually with a -35.89% maximum drawdown. The strategy's Sharpe ratio was 0.47 versus 0.52 for XLP.
In the out-of-sample period starting 2018-07, the strategy returned 5.19% annually versus 9.80% for XLP. With trading costs doubled from 0.1% per leg, the strategy returned 4.72% annually and had a -27.37% maximum drawdown.
Where does the approach struggle?
The strategy lagged XLP on annualized return and Sharpe ratio over the full period and out of sample. Its shallower full-period drawdown did not prevent a larger loss in 2008, when it returned -22.75% versus -15.02% for XLP.
Moving averages react to past prices, so the signal can change after a decline or after a recovery has begun. Trading costs also affect results, as the doubled-cost run shows.
This is historical research, not a forecast. Past simulated results do not predict future returns.
⚠️ Risk Considerations
Historical backtests cannot establish future returns, and the signal may behave differently in other market conditions. Actual results can also differ because of trading costs and execution.
🎯 Target Audience
This page is for retail investors comparing a trend-following rule with holding XLP over the same historical period.
Frequently Asked Questions (FAQ)
Q. Did the XLP golden cross beat holding XLP?
No. The strategy returned 5.00% annually over the full period, compared with 7.04% for XLP.
Q. Did the strategy reduce the maximum drawdown?
The strategy's maximum drawdown was -26.78%, compared with -35.89% for XLP over the full period.
Q. How did the strategy perform out of sample?
From 2018-07, the strategy returned 5.19% annually, compared with 9.80% for XLP.
Compare investment strategies
Explore the assumptions and results behind different historical strategies.
Historical results do not guarantee future returns.