The 200-Day Moving Average, Backtested as a Filter
The 200-day moving average is the mean of a stock's last 200 daily closes, about ten months of trading, and traders use it to decide whether the long-term trend is up. As a filter it kept backtested dip-buying rules out of falling stocks, but none of the SPY rules built on it beat simply holding.
The 200-day moving average is the most widely watched long-term trend line in stock trading. It is a simple moving average of daily closes over a window long enough to ignore most short-term noise, which is exactly why it is slow.
How it works
Add up the last 200 daily closes and divide by 200. Tomorrow, drop the oldest close, add the newest, and divide again. Two hundred trading days is a little under ten months, since a US trading year has about 252 sessions.
Three ways traders read the line
Traders read it three ways. Price above the average means the long-term trend is treated as up. Price below means down. And the direction of the average itself, rising or falling, says the same thing more slowly. A golden cross is the 50-day average crossing above the 200-day; a death cross is the reverse.
In the backtests on this page it is used as a filter, not a signal. A rule is only allowed to buy while the close is above the 200-day average. It never says when to buy; it only says when buying is allowed. That is the most common way the line is used in short-term trading rules, and it is the use that can actually be measured here.
A worked example
The arithmetic of one day’s change. Say the 200 closes in the window add up to $20,000, so the average is $100.00. Tomorrow the oldest close, $95.00, drops out and the newest, $105.00, comes in. The sum rises by $10.00 to $20,010, and the average rises to $100.05.
A $10 difference between the two closes moved the average by five cents. That is the whole character of the line: one day almost never moves it, which is why it filters noise and also why it reacts to a real turn weeks or months late.
Now the filter in a rule. The RSI(2) rule tested on SPY buys when the two-day relative strength index drops below 10, but only if the close is above the 200-day simple average. If SPY closes at $495 and the average is $500, a reading of 5 does nothing. The rule stays in cash until the close is back above the line. It sells on the first close above the five-day average, and it has no stop.
The original data
SPY, January 29, 1993 to August 7, 2026, daily bars, run in TradingView’s Strategy Tester in August 2026. Five rules, each using the whole account per trade, 0.05% commission plus one tick of slippage, and no stops. Holding SPY over the same window made roughly +1,480%.
The RSI(2) rule with the 200-day filter: 227 trades, 65.64% of them closed higher, a profit factor of 1.897, and a net result of +141.80%. Its worst drawdown was 16.55%, the lowest of the five rules. It bought a much smoother ride and gave up most of the return to get it. Those figures are in the SPY results table.
The golden cross, the 50-day simple average crossing above the 200-day: 10 trades in 33 years. It made +290.75% with a profit factor of 9.417, and 70% of the ten trades closed higher. Ten trades is an anecdote, not a sample, and the result still trailed holding by more than a thousand percentage points.
No rule beat holding. TradingView’s own comparison, which measures holding from each rule’s first trade, put the golden cross 337 points behind and the other four between 1,343 and 1,528 points behind. Four of the five rules used a 200-day average in some form, and none of them closed the gap.
The filter on stocks that fell
Then the filter at work on a stock that fell. In a separate test from January 2015 to August 2026, three dip rules were run on five large caps that lagged the S&P 500: INTC, PYPL, DIS, NKE and WBA. Its history ends on 27 Aug 2025, the day before a private-equity buyer completed its purchase. Every one of those rules can only buy with the close above the 200-day average. On Walgreens they took 10, 5 and 1 trades. On the other four, each rule took between 32 and 91.
On the one stock that truly collapsed, the filter kept the rules out almost entirely. The test notes put it down to Walgreens spending most of the window below its 200-day average, so the signals and the filter rarely lined up. That is the filter doing its job. The trade counts are in the survivorship table.
What this data cannot say. No run tested the 200-day filter on its own, such as holding only while above the line. The tickers are few and were chosen by outcome, and every figure here is a simulated past result, not a forecast.
When it fails
It fails slowly, by design. The worked example shows a $10 gap between closes moving the line by five cents. In a fast decline, price can fall a long way before the close drops under the average, and a rule filtered by it keeps buying all the way down.
It fails when the stock goes nowhere above it. Disney spent enough of the window above its 200-day average for the five-day low rule to take 46 trades, and that rule lost 32.17% there. The filter allowed every one of those trades. A filter decides when buying is allowed; it cannot make a weak rule strong.
It fails near the line. A stock that hovers around its 200-day average crosses it repeatedly. For a filter that means signals switching on and off; for a crossover rule it means a string of small losses.
It fails on rarity. RSI(14) under 30 while above the 200-day average fired 2 to 6 times per stock in eleven years on the seven biggest winners of the decade, 24 trades in all. A filter can combine with a signal into something that almost never happens, which leaves nothing to measure.
And it fails as a return engine. Every SPY rule that used it trailed buy and hold, the RSI(2) rule by 1,413 percentage points on TradingView’s own comparison. What it bought was a smaller worst drawdown, which is a real thing to want, but it is a trade, not a free improvement.
Related
Simple moving average explains the calculation and why the line always sits behind price. The golden cross is the most famous signal built on the 200-day, and the SPY data here shows why its sample is too small to judge. And buy and hold is the benchmark every rule on this page was measured against.
Use the 200-day average as a yes-or-no question about the trend, not as a price to trade at. Every rule on this page used it that way, and it was still the rule’s own logic, not the filter, that decided whether a trade made money.
— Michael Whitman
This page is educational, not financial advice. Test every idea on your own charts before risking money.