The 200-Day SMA: Guardrail or Edge?
Reading time: ~8 minutes | Python backtest code included
The 200-day moving average is one of the most cited rules in all of investing. You’ve probably heard some version of it: stay invested above the 200-day, move to cash below it. Financial media trots it out constantly. Professional fund managers reference it in market commentary. Even central bank officials have been known to mention it.
But does it actually work?
That’s not a rhetorical question. In this article we’re going to test it properly — with real data, a transparent methodology, and honest results. We’ll look at what the 200-day MA actually does for returns, what it does for risk, and whether 200 is special or just an arbitrary number that became popular.
The Setup
We’re testing the simplest possible version of the rule on SPY (the S&P 500 ETF), running from January 2000 to present — a period that includes the dot-com crash, the GFC, the COVID crash, and two full bull markets. That’s a reasonable stress test.
The strategy:
- Invested when SPY’s closing price is above its 200-day moving average
- Cash (0% return) when SPY’s closing price is at or below its 200-day MA
- Rebalanced daily on close — no transaction costs (eToro charges zero commission, so this is realistic)
- Starting capital: $10,000
The benchmark is simple buy-and-hold SPY over the same period.
Here’s the Python code used to generate these results:
import yfinance as yf
import pandas as pd
import numpy as np
# Download SPY data
spy = yf.download("SPY", start="2000-01-01", auto_adjust=True)["Close"].squeeze()
# 200-day moving average filter
ma200 = spy.rolling(200).mean()
in_market = spy > ma200
# Daily returns
daily_ret = spy.pct_change()
# Strategy: only invested when above MA
strat_ret = daily_ret * in_market.shift(1)
# Equity curves
strat_equity = (1 + strat_ret).cumprod() * 10_000
bah_equity = (1 + daily_ret).cumprod() * 10_000Clean and simple. No curve-fitting, no lookback bias, no parameter tuning — yet.
The Results
Here’s how the numbers stack up from 2000 to present:
ETF Strategy Analysis
Portfolio Value — $10,000 starting capital
Drawdown from Peak (%)
MA Window Sensitivity — CAGR & Max Drawdown
The stats tell an interesting story.
The 200-day MA strategy produces a lower raw CAGR than buy-and-hold over this period — that’s not surprising, and it’s important to be upfront about it. When equities trend strongly upward (as they have for most of the past decade), sitting in cash occasionally costs you compounding.
But look at the drawdown chart. This is where the 200-day MA earns its reputation. The strategy avoided the worst of both the 2000–2002 crash and the 2008–2009 GFC. Maximum drawdown is substantially lower — and for many investors, that difference isn’t just academic. A 50% drawdown requires a 100% gain just to get back to even. A 20% drawdown only requires 25%. The mathematics of loss recovery are brutal.
The Sharpe ratio — which measures return per unit of risk — tends to favour the MA strategy. That’s the meaningful comparison for systematic investors who care about risk-adjusted returns.
Is 200 Special?
This is where it gets interesting. The 200-day MA didn’t emerge from rigorous optimisation — it became popular partly because it’s round, and partly because enough people use it that it occasionally becomes self-fulfilling. But is there something mathematically special about 200?
Use the slider above to explore MA windows from 50 to 300 days.
A few things to notice:
Shorter windows (50–100 days) tend to whipsaw — you get in and out of the market more frequently, accumulating more “missed days” from false signals, often without meaningfully reducing the big drawdowns.
The 150–250 range is where most of the defensible results cluster. The relationship between CAGR and max drawdown is reasonably consistent across this zone — which actually builds confidence that the 200-day isn’t a cherry-picked parameter. It’s in the middle of a stable region, not a sharp spike.
Longer windows (250–300 days) respond too slowly. They sometimes leave you invested well into a bear market before triggering, reducing the drawdown benefit that justifies using the rule at all.
The Honest Conclusion
The 200-day MA is not a reliable return enhancer in bull markets. If you’re comparing it to buy-and-hold on raw CAGR over the last two decades, you’ll often find buy-and-hold wins.
But that’s not what the 200-day MA is for.
It’s a drawdown limiter and behavioural guardrail. Its real job is to reduce the probability of a catastrophic loss that forces you out of the market at the worst possible time — not because the algorithm says so, but because you emotionally capitulate after watching your portfolio fall 40%.
For systematic momentum investors — the audience for this blog — it serves a second role: as a regime filter. When the market is trending below its 200-day MA, conditions that favour momentum strategies deteriorate. Correlations rise, factor premiums compress, and the environment is hostile to the kind of cross-sectional momentum that drives multi-ETF rotation systems.
So: guardrail or edge?
Guardrail first. Edge second. But don’t dismiss it just because the CAGR comparison looks unflattering.
Disclaimer: Past performance is not indicative of future results. All backtested results are hypothetical. This article is for educational purposes and does not constitute financial advice.