Does the XLV 200-day Moving Average Beat Holding?
Market Timing Research • Does the XLV 200-day Moving Average Beat Holding?
💡 Summary
Does holding XLV only when it is above its moving average beat holding XLV throughout? The strategy returned 0.59% annually, compared with 8.84% for XLV, and had a deeper maximum drawdown. Historical results are sensitive to trading costs and do not establish how the rules will perform in the future.
Key Metrics & Specifications
| Test Period | 1998-12-22 to 2026-11-20 |
| Strategy CAGR | 0.59% |
| Strategy Max Drawdown | -59.27% |
| Strategy Sharpe | 0.11 |
| XLV CAGR | 8.84% |
| XLV Max Drawdown | -39.17% |
| Execution & Costs | Signal on the close, fill at the next close; 0.1% per side; doubled-cost CAGR -1.61% |
| Rules | Compute the 200-day simple moving average of US health care stocks (XLV) from daily closes. Hold XLV while the close is above the average. Otherwise hold cash (Treasury bills). Decisions use the close; trades fill at the next day's close. |
| Out-of-Sample CAGR | 0.93% vs XLV 10.86% from 2018-07 |
What the experiment recorded
| Run | CAGR | Max drawdown |
|---|---|---|
| Strategy | 0.59% | -59.27% |
| XLV | 8.84% | -39.17% |
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-20. Export dated 2026-11-23. 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 investors are asking
A moving-average rule offers a way to reduce exposure when a market trend weakens. The question is whether that change improves returns or limits losses compared with holding XLV throughout the period.
How the rules work
The strategy calculates the 200-day simple moving average from XLV daily closing prices. It holds XLV when the close is above that average and otherwise 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 price trend while moving to cash when the trend weakens.
What the backtest shows
From 1998-12-22 to 2026-11-20, the strategy had a 0.59% annualized return, compared with 8.84% for XLV. Its maximum drawdown was -59.27%, compared with -39.17% for XLV, and its Sharpe ratio was 0.11 versus 0.56.
In the out-of-sample period starting in 2018-07, the strategy returned 0.93% annually, compared with 10.86% for XLV. When trading costs were doubled, the strategy's annualized return fell to -1.61% and its maximum drawdown was -68.22%.
Where the approach struggles
The strategy's 619 trades made its results sensitive to transaction costs. Frequent changes around the moving average can also produce trades without a lasting trend.
The strategy was invested outside cash on 69.77% of days. In 2000, it returned -29.04%, compared with -11.77% for XLV, showing that the cash rule did not prevent a substantial annual loss.
This is historical research, not a forecast. Past simulated results do not predict future returns.
⚠️ Risk Considerations
This historical backtest cannot establish future returns or guarantee protection from losses. Results depend on the stated execution and cost assumptions, and the doubled-cost run shows that costs can materially change the outcome.
🎯 Target Audience
This page is for readers comparing a trend-following rule for US health care stocks with holding XLV throughout the period.
Frequently Asked Questions (FAQ)
Q. Did the XLV moving-average strategy beat holding XLV?
No. The strategy returned 0.59% annually over the full period, compared with 8.84% for XLV.
Q. Did the strategy reduce the maximum drawdown?
No. Its maximum drawdown was -59.27%, compared with -39.17% for XLV.
Q. How did the strategy perform out of sample?
From 2018-07, its annualized return was 0.93%, compared with 10.86% for XLV.
Compare investment strategies
Explore the assumptions and results behind different historical strategies.
Historical results do not guarantee future returns.