A moving average shows the recent typical level of a price with the day-to-day noise filtered out, so the direction of a trend is easier to see. The cost of that smoothing is lag: an N-day simple average is centered (N−1)/2 trading days in the past, so a 200-day line describes where prices were, on average, about 100 trading days ago. It summarizes the past; on its own it does not forecast the next move.
Key takeaways
- A simple moving average (SMA) gives each of the last N prices a weight of 1/N; an exponential moving average (EMA) with α = 2/(N+1) gives today's price about twice that weight and lets older prices fade geometrically.
- With that α, both have the same average age, (N−1)/2 days, so on a steady trend an N-day EMA is no faster than an N-day SMA.
- From mid-2017 to October 2026 the S&P 500 closed above its 200-day SMA on 81% of trading days, yet price crossed the line 56 times, and 30 of those crossings reversed within five trading days.
- Each of the four 50/200-day "death crosses" in that decade arrived after the index had already fallen 10% to 22% from its high.
- Moving-average rules appeared to predict returns on Dow data from 1897 to 1986, before costs; later tests found little evidence out of sample or after costs.
A moving average is a filter
A daily price series mixes slow movements, such as a multi-month trend, with fast ones such as reactions to news. A moving average replaces each day's price with the average of a window of recent prices, so fast wiggles partly cancel and slow movements survive. In signal-processing terms it is a low-pass filter, and the window length N decides where "fast" ends and "slow" begins. That suits descriptive questions, such as whether today's price is above its recent level. Every input is a past price, so the line cannot anticipate anything new, and any rule built on it shares that limit.
Three formulas, three weightings
The NIST/SEMATECH e-Handbook of Statistical Methods defines the single moving average as the mean of the most recent N observations, with the window advancing one period at a time.
SMA_t = (P_t + P_(t-1) + ... + P_(t-N+1)) / N
EMA_t = alpha × P_t + (1 - alpha) × EMA_(t-1)
alpha = 2 / (N + 1)
WMA_t = (N×P_t + (N-1)×P_(t-1) + ... + 1×P_(t-N+1)) / (N(N+1)/2)
P_t = closing price on day t
N = number of periods (days, weeks or bars) in the average
alpha = smoothing factor between 0 and 1; higher means faster fading of old prices
The exponential version is the recursion NIST calls single exponential smoothing: the weight on a price k days old, α × (1−α)^k, decreases geometrically. Because it is recursive, an EMA never fully drops an old price, so its value depends slightly on the start date the software chose. The weighted moving average (WMA) is a linear compromise: weight N on the newest price down to 1 on the oldest.
The weights side by side
For a 10-day average, α = 2/11 ≈ 0.182. The table shows the share each day's close receives (rounded).
| Day | SMA (10) | WMA (10) | EMA (α = 2/11) |
|---|---|---|---|
| Today | 10.0% | 18.2% | 18.2% |
| 1 day ago | 10.0% | 16.4% | 14.9% |
| 2 days ago | 10.0% | 14.5% | 12.2% |
| 3 days ago | 10.0% | 12.7% | 10.0% |
| 4 days ago | 10.0% | 10.9% | 8.1% |
| 5 days ago | 10.0% | 9.1% | 6.7% |
| 6 days ago | 10.0% | 7.3% | 5.5% |
| 7 days ago | 10.0% | 5.5% | 4.5% |
| 8 days ago | 10.0% | 3.6% | 3.7% |
| 9 days ago | 10.0% | 1.8% | 3.0% |
| Older than 10 days | 0% | 0% | 13.4% in total |
For N from 20 to 200, the EMA's weight on today is 1.90 to 1.99 times the SMA's, and about 86.5% of its weight sits on the last N days.
Lag: the price of smoothing
Lag is best measured as the average age of the prices inside the average, its center of mass. For an N-day SMA, ages run from 0 to N−1 days with equal weight, so the average age is (N−1)/2. For an EMA it is (1−α)/α, which with α = 2/(N+1) also equals (N−1)/2. A WMA is younger.
Average age of an N-day SMA = (N - 1) / 2
Average age of an N-day EMA = (1 - alpha) / alpha = (N - 1) / 2 when alpha = 2/(N+1)
Average age of an N-day WMA = (N - 1) / 3
The three tests below use synthetic series, where the true path is known exactly. They illustrate the formulas; they are not models of real markets.
Test 1: a one-time jump
Illustrative example. A price sits at 100 for years, then jumps to 110 and stays. The table counts closes at the new level until each average covers half, 90% and all (or 99%) of the gap.
| Average | Half the gap | 90% of the gap | Reaches 110 |
|---|---|---|---|
| 20-day SMA | 10 days | 18 days | 20 days |
| 20-day EMA | 7 days | 24 days | Never exactly; 99% after 47 days |
| 50-day SMA | 25 days | 45 days | 50 days |
| 50-day EMA | 18 days | 58 days | Never exactly; 99% after 116 days |
| 200-day SMA | 100 days | 180 days | 200 days |
| 200-day EMA | 70 days | 231 days | Never exactly; 99% after 461 days |
The EMA moves first but finishes last: it gets halfway about 30% sooner, but its tail of older prices keeps it short of the new level long after the SMA arrives.
Test 2: a steady trend
Illustrative example. A price rises by exactly 0.1 points a day. Once settled, the 20-day SMA and EMA both sit 0.95 points below price, the 50-day pair 2.45 and the 200-day pair 9.95: 9.5, 24.5 and 99.5 days of trend, exactly (N−1)/2. On a smooth trend the EMA has no speed advantage.
Test 3: a noisy trend
Illustrative example. The same 0.1-point daily trend, now with random daily noise (normally distributed, standard deviation 2 points), run for 1,000 days after a 200-day warm-up. The underlying direction never changes, yet:
- Price crossed its 20-day SMA 442 times and closed above it on 68.7% of days.
- Price crossed its 50-day SMA 194 times and closed above it on 89.1% of days.
- Price never crossed its 200-day SMA and closed above it on every day.
EMAs and other random seeds gave similar counts. A short average crosses price constantly on noise alone; a long one filters the noise but sits about 10 points behind. Real prices are not a straight line plus independent noise, so these counts do not predict any real crossing rate.
The S&P 500 and its 200-day line
The figures below use the S&P 500 daily close series on FRED, downloaded on October 10, 2026. FRED carries only 10 years of daily history for this series (here October 10, 2016 to October 9, 2026, 2,514 trading days), and it is a price index without dividends. Each day's average includes that day's close.
How often the index was above it
The first full 200-day SMA falls on July 26, 2017. From then to October 9, 2026, the index closed above its 200-day SMA on 1,881 of 2,315 trading days, or 81.3%. The yearly share ranged from 100% in 2021 and 2024 to 15.1% in 2022 (38 of 251 days).
Yet price crossed the 200-day SMA 56 times; in 30 cases the next crossing came within five trading days, and in 41 within 20. More than half the crossings were whipsaws that undid themselves within a week.
When the 50/200 crosses arrived
The 50-day SMA crossed the 200-day SMA eight times in the window, alternating four death crosses (50-day falling below 200-day) and four golden crosses (the reverse). The table puts each pair next to the closing high and low around it.
| Episode | Death cross | Index vs prior high at death cross | Closing low | Golden cross | Index vs low at golden cross |
|---|---|---|---|---|---|
| 2018–2019 | Dec 7, 2018 (54 days after the Sep 20 high) | −10.2% | Dec 24, 2018 (−19.8%) | Apr 1, 2019 (66 days after the low) | +22.0% |
| 2020 | Mar 30, 2020 (28 days after the Feb 19 high) | −22.4% | Mar 23, 2020 (−33.9%) | Jul 9, 2020 (75 days after the low) | +40.9% |
| 2022–2023 | Mar 14, 2022 (48 days after the Jan 3 high) | −13.0% | Oct 12, 2022 (−25.4%) | Feb 2, 2023 (77 days after the low) | +16.9% |
| 2025 | Apr 14, 2025 (38 days after the Feb 19 high) | −12.0% | Apr 8, 2025 (−18.9%) | Jul 1, 2025 (57 days after the low) | +24.4% |
Day counts are trading days; percentages are index price changes, before dividends. This is the synthetic lag in real data: in 2020 and 2025 the death cross came four or five trading days after the closing low, and each golden cross followed a 17% to 41% rise. Four episodes in one index say nothing about what crosses do next; they show that the lines confirm moves after the fact.
The definition moves the dates
With a 50-day EMA against a 200-day EMA, the 2025 golden cross falls on May 19 rather than July 1, close to the mid-May date in Fidelity's 2025 chart review, which defines the cross with exponential averages. The EMA pair crossed ten times from May 2018 to October 2026, against eight for the SMA pair. "A golden cross has formed" means little without the average type and the data behind it.
Crossovers, bands and conventions
Most uses of moving averages are chart-reading conventions, not tested properties of markets.
- Trend direction. Whether the average is rising and price is above it. Fidelity's indicator guide calls the 200-bar SMA a common proxy for the long-term trend and the 50-bar SMA a gauge of the intermediate trend.
- Crossovers. A short average crossing a long one; Fidelity's definitions use the 50-day and 200-day SMAs for the death and golden cross.
- Support and resistance. Some chart readers treat a widely watched average as a level where declines or rallies pause; the studies below do not establish this.
- Envelopes and bands. Bollinger Bands, as set out by John Bollinger, place bands two standard deviations above and below a 20-period average, so they widen when prices are volatile. They measure how far price has strayed from its recent level, not where it will go.
What the research found
The best-known positive result is Brock, Lakonishok and LeBaron (1992) in the Journal of Finance. Testing moving-average and trading-range-break rules (signals when price breaks a recent high or low) on the Dow Jones Industrial Average from 1897 to 1986, they found returns after buy signals higher and less volatile than after sell signals, inconsistent with four standard models of returns, including the random walk.
Rules found by searching many variants on one data set can look good by chance, a problem called data snooping. Sullivan, Timmermann and White (1999) expanded Brock, Lakonishok and LeBaron's 26 rules to 7,846 rules of several kinds, including moving averages, filters, channel breakouts and support and resistance, and adjusted for that search. In their discussion-paper version, the best rules still beat the benchmark in 1897–1986 after the adjustment. In 1987–1996 the best rule was not statistically significant, and on S&P 500 futures from 1984 to 1996 they found no evidence that any rule outperformed.
Bajgrowicz and Scaillet (2012), using Dow data from 1897 to 2011, found that an investor could not have picked the future best rules in advance and that low transaction costs removed the apparent outperformance even in sample. A survey by Park and Irwin (2007) counted 56 positive, 20 negative and 19 mixed results among 95 modern studies, but warned that most were weakened by data snooping, rules chosen after the fact and hard-to-estimate risk and costs.
Costs, taxes and promoted signals
Every trade a rule generates pays the bid-ask spread, any commission and slippage (the gap between the backtest price and the actual fill). A rule acting on every S&P 500 crossing of the 200-day line above would have paid them 56 times. In taxable accounts, under IRS Topic 409, net short-term gains, on assets held one year or less, are taxed as ordinary income.
The CFTC's fraud advisory on commodity trading systems sold online, written about futures and options, notes that such systems draw signals from technical analysis of price and volume data, that advertised results are often hypothetical simulations, that data feeds and commissions raise the break-even point, and that "No trading system can guarantee profits." The SEC's auto-trading alert warns about cherry-picked track records and testimonials and suggests asking for a complete record over several months.
Frequently asked questions
Why do two charting tools show different values for the same 50-day average?
The usual causes are a different average type (simple or exponential), a different price input (raw closes or closes adjusted for dividends and splits) and, for an EMA, a different start date, since the recursion carries a trace of every earlier price.
Does a moving average of an index include dividends?
Only if the price series does. FRED's S&P 500 series is a price index, so a 200-day average built on it ignores the dividends an index-fund holder would have received, and it will not match an average of a total-return series.
How long is a 200-day moving average in calendar time?
Full calendar years in the FRED data had 250 to 253 trading days, so 200 trading days span about nine and a half months. A 40-week average on a weekly chart covers a similar span but uses one price per week, so the two lines differ slightly.
Can moving averages be used on weekly or intraday charts?
Yes; the formulas count bars, not days, which is why Fidelity's guide speaks of a 200-bar SMA. The lag scales with the bar: a 20-bar SMA on five-minute bars is centered 9.5 bars, or 47.5 minutes, in the past; on weekly bars, 9.5 weeks.
Is a stock's 200-day average the same as its average cost to investors?
No. The 200-day SMA is the plain average of the last 200 closing prices; it ignores how many shares traded at each price. An investor's cost basis depends on their own purchase prices.
Checks before reading an average
- Choose the window by the question. A short average follows the past month and crosses price often; a long one follows most of a year and lags by up to about 100 days.
- Compare the line with price, not with the future. "Price is 5% above its 200-day average" is a measurement; "price will rise because it is above the average" is a claim the line cannot support.
- Check backtests for look-ahead and survivorship. A signal computed from a day's close cannot be traded at that same close, and a test on today's index members alone leaves out dropped companies, which usually flatters results.
- Count the trades and their costs. Multiply the switches by a realistic spread, commission and slippage, and allow for short-term tax rates.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, 6.4.2.1 Single Moving Average
- NIST/SEMATECH e-Handbook of Statistical Methods, 6.4.3.1 Single Exponential Smoothing
- Federal Reserve Bank of St. Louis, FRED: S&P 500 (SP500), daily close, source S&P Dow Jones Indices LLC (downloaded October 10, 2026)
- Fidelity Learning Center: Simple Moving Average (SMA)
- Fidelity Learning Center: What is technical analysis?
- Fidelity Learning Center: 2025's biggest chart trends
- John Bollinger: Bollinger Bands
- Brock, Lakonishok and LeBaron (1992), Simple Technical Trading Rules and the Stochastic Properties of Stock Returns, Journal of Finance 47(5), 1731–1764
- Sullivan, Timmermann and White (1999), Data-Snooping, Technical Trading Rule Performance, and the Bootstrap, Journal of Finance 54(5), 1647–1691
- Sullivan, Timmermann and White, Data Snooping, Technical Trading Rule Performance, and the Bootstrap, LSE Financial Markets Group Discussion Paper 303 (October 1998)
- Bajgrowicz and Scaillet (2012), Technical trading revisited: False discoveries, persistence tests, and transaction costs, Journal of Financial Economics 106(3), 473–491
- Park and Irwin (2007), What Do We Know About the Profitability of Technical Analysis?, Journal of Economic Surveys 21(4), 786–826
- IRS Topic No. 409, Capital gains and losses
- CFTC Fraud Advisory: Commodity Trading Systems Sold on the Internet
- SEC Investor Alert: All About Auto-Trading (June 2009)