AvalonQuant Research
Stories & guides
Home › Market Timing Research

Does the XLY 200-day moving average beat holding?

Source-referenced guide • Reviewed: • Source reference
Does the XLY 200-day moving average beat holding?
AVALONQUANT Editorial Guide

Market Timing Research • Does the XLY 200-day moving average beat holding?

📸 Historical experiment review EDITORIAL-REVIEW • 2026-10

💡 Summary

Can a moving average rule improve on holding XLY throughout the backtest? The strategy had a lower CAGR than XLY, at 4.29% versus 9.32%, but a shallower maximum drawdown. Its out-of-sample CAGR was weaker, and higher trading costs reduced its CAGR further.

Key Metrics & Specifications

Test Period 1998-12-22 to 2026-11-20
Strategy CAGR 4.29%
Strategy Max Drawdown -33.51%
Strategy Sharpe 0.37
XLY CAGR 9.32%
XLY Max Drawdown -59.05%
Execution & Costs Signal on the close, fill at the next close; 0.1% per side; doubled-cost CAGR 2.62%
Rules Compute the 200-day simple moving average of US consumer discretionary stocks (XLY) from daily closes. Hold XLY 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 2.37% vs XLY 9.90% from 2018-07

What the experiment recorded

RunCAGRMax drawdown
Strategy4.29%-33.51%
XLY9.32%-59.05%
Portfolio value (start = 100) 68 707 1346 1998-12-22 2026-11-20
● Strategy● XLY buy and hold

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-24. 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.

CAGR 4.29%
Initial Principal $10,000
$1,000 $100,000
Holding Horizon 10 Years
1 Year 20 Years
Estimated Wealth
$15,220
Compound Gain
+$5,220
Growth Factor
1.52x

* Hypothetical illustration for educational purposes only. Past backtest results do not guarantee future returns.

Research tool

Compare investment strategies

Explore the assumptions and results behind different historical strategies.

Historical results do not guarantee future returns.

The question

The question is whether stepping out of XLY when its price falls below a moving average can limit losses enough to make up for time spent in cash. This backtest compares that rule with holding XLY over the same historical period.

How the rule works

The strategy calculates the 200-day simple moving average from daily XLY closing prices. It holds XLY 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 moving averages to identify broad price trends and to reduce exposure when prices fall below a chosen threshold. The rule can also move into cash before a recovery or return to XLY shortly before another decline.

What the results show

Over the full period, the strategy's CAGR was 4.29%, compared with 9.32% for XLY. Its maximum drawdown was -33.51%, compared with -59.05% for XLY, while its Sharpe ratio was 0.37 versus 0.51.

In the out-of-sample period starting in 2018-07, the strategy's CAGR was 2.37%, compared with 9.90% for XLY. With trading costs doubled, the strategy's CAGR was 2.62% and its maximum drawdown was -39.85%.

Where the approach struggles

The strategy lagged XLY on CAGR in both the in-sample and out-of-sample periods. It also had a lower Sharpe ratio than XLY over the full period and out of sample.

Repeated moves across the moving average can generate trades and costs. The backtest recorded 451 trades, and the doubled-cost run shows that the reported return is sensitive to trading costs.

This is historical research, not a forecast. Past simulated results do not predict future returns.

⚠️ Risk Considerations

Historical backtest results do not establish how the rule will perform in the future. Returns can be affected by trading costs, execution timing, and changes in market conditions.

🎯 Target Audience

This page is for investors interested in how a trend-following rule for XLY compares with holding it through market declines and recoveries.

Frequently Asked Questions (FAQ)

Q. Did the moving average strategy beat holding XLY?

No. Its full-period CAGR was 4.29%, compared with 9.32% for XLY, although its maximum drawdown was shallower.

Q. What does the strategy hold when XLY is below its moving average?

It holds cash in Treasury bills when the closing price is not above the average.

Q. How did the strategy perform out of sample?

From 2018-07, its CAGR was 2.37%, compared with 9.90% for XLY, and its Sharpe ratio was 0.23 versus 0.52.

Research tool

Compare investment strategies

Explore the assumptions and results behind different historical strategies.

Historical results do not guarantee future returns.

Related Research & Comparative Analyses

View all →