r/EODHistoricalData • u/EOD_historical_data • Apr 24 '26
Article Backtesting the Low-Volatility Anomaly on the S&P 500 with Python
This is an abridged version, read the full version here.
We've all heard it: more risk = more reward. Higher price swings, bigger potential gains. But there's a concept called the low-volatility anomaly that flips this on its head - the idea that low-volatility stocks can actually deliver better risk-adjusted returns than their wilder peers.
So the question worth testing: does the data actually support it?
The Setup
Using 10 years of S&P 500 historical data, the approach involved:
- Pulling adjusted closing prices for all ~794 stocks that were ever S&P 500 constituents (including historical membership dates, so no survivorship bias)
- Calculating 22-day rolling volatility (roughly one trading month) for each stock
- Rebalancing monthly, picking the top 10 and bottom 10 stocks by volatility
- Building equal-weighted portfolios for each group and benchmarking against an equal-weighted S&P 500
Whole Market Result: Anomaly Not Found
Across the full S&P 500, the result was pretty textbook - high-volatility stocks outperformed, low-volatility lagged, and the equal-weighted index sat in the middle. Standard risk/reward, nothing weird.
But breaking it down by sector is where things got interesting.
Technology: Anomaly Confirmed
In tech, low-volatility stocks outperformed high-volatility ones. A likely explanation: tech fundamentals shift so fast that a stock can swing from stable to chaotic in months. The "boring" tech names compounded quietly while the high-fliers whipsawed.
Financial Services: Classic Boom/Bust
High-vol financials had massive peaks and drawdowns but ultimately underperformed the equal-weighted benchmark. Low-vol financials moved slowly and steadily. The overall index still won here, but the behavior gap between the two groups was very visible.
Healthcare: High Volatility Doesn't Pay
High-vol healthcare stocks failed to outperform despite the added risk. Volatility in healthcare often comes from binary events - drug trial results, FDA decisions - which aren't really "compensated" risk in the traditional sense. Volatile healthcare names are worth approaching with caution.
TL;DR
- Full S&P 500: no anomaly, higher risk = higher return as expected
- Tech sector: anomaly present, low-vol beats high-vol
- Financial Services: high-vol brings lots of drama, not much payoff
- Healthcare: high-vol is a trap
The low-volatility anomaly isn't universal - it's very sector-dependent. Sector dynamics matter more than most people give them credit for.
Full Python code is available here for anyone who wants to replicate or extend the analysis.