Moving Averages Explained: SMA, EMA, 50/200 Cross

TL;DR. A moving average is the running mean of the last N closing prices. The simple moving average (SMA) weighs every day equally; the exponential moving average (EMA) puts more weight on the most recent days, so it turns faster when the price changes direction. Traders use them to smooth noise, define trend, and mark support or resistance. The most-watched crossover is the 50-day above the 200-day — the “Golden Cross” — and its bearish twin, the “Death Cross.” Neither is a magic signal; both are trend confirmations, not predictions.

What a moving average actually does

Raw daily closes look like a scribble. A moving average draws a line through that scribble so the underlying direction is easier to see. If today’s price is above a rising moving average, the trend is up. If it’s below a falling one, the trend is down. Everything else — crossovers, envelopes, channels — is built on top of that basic idea.

The trade-off is always the same: the longer the lookback, the smoother the line but the later it turns. A 5-day average whips around with the price; a 200-day average barely moves week to week. Picking a lookback is really picking how much lag you can tolerate in exchange for how much noise you want gone.

Simple Moving Average (SMA)

The SMA is just the arithmetic mean of the last N closing prices. Formally:

SMAN = (Pt + Pt−1 + … + Pt−N+1) ÷ N

Each new bar drops the oldest price out of the window and adds the newest one. That’s why an SMA is sometimes called a boxcar filter — every observation inside the box gets the same weight, everything outside gets zero. This is the definition the Wikipedia entry on moving averages gives as the unweighted mean of the previous k data-points.

Exponential Moving Average (EMA)

The EMA fixes what many chartists dislike about the SMA: the old boxcar treats a price from N days ago the same as yesterday’s. The EMA weights recent prices more heavily, with the weight decaying exponentially as you go back in time. The recursion is:

EMAt = K × Pt + (1 − K) × EMAt−1

where the smoothing constant K = 2 ÷ (N + 1). For a 20-day EMA, K ≈ 0.0952 (yesterday’s close gets 9.5% of the weight; every prior day fades geometrically). This is the standard finance form of exponential smoothing, seeded with the SMA of the first N periods.

Because K > 0, the EMA never fully forgets a price — it just gives ancient prices vanishingly small weight. That means an EMA reacts to a fresh move roughly twice as quickly as an SMA of the same length, at the cost of being noisier in a chop.

A worked example you can check by hand

Suppose a stock closes at $100, $101, $99, $102, $104 on five consecutive days. Here is the 3-day SMA versus the 3-day EMA (seeded on day 3 with the SMA of days 1–3). The 3-day EMA smoothing constant is K = 2 ÷ (3 + 1) = 0.50.

Day Close ($) 3-day SMA 3-day EMA EMA arithmetic
1 100.00 Not enough data yet
2 101.00 Not enough data yet
3 99.00 100.00 100.00 Seed = SMA(1..3) = 100.00
4 102.00 100.67 101.00 100 + 0.50 × (102 − 100) = 101.00
5 104.00 101.67 102.50 101 + 0.50 × (104 − 101) = 102.50
Worked example. SMA formula from Wikipedia: Moving average; EMA recursion from Wikipedia: Exponential smoothing.

Notice the pattern. When the price jumps from $99 to $102 on day 4, the 3-day SMA moves from 100.00 to 100.67 — a modest 0.67 point rise. The 3-day EMA moves from 100.00 to 101.00 — a bigger 1.00 point rise. Same input; the EMA turned faster. Now flip the tape: if day 4 had been a crash back to $95, the EMA would also fall faster. Speed cuts both ways.

Common lookback periods — and what traders use them for

There is nothing magical about 20 or 50 or 200 days. They became standard because a monthly cycle is roughly 20 trading days, a quarter is roughly 50, and a year is roughly 250. Round them off and you get the industry defaults.

Lookback Typical use Who watches it
9- / 12-day EMA Short-term momentum; the fast leg of the MACD signal. Swing and day traders.
20-day SMA/EMA One trading month; centre line of standard 20/2 Bollinger Bands. Short-term trend followers, mean-reversion setups.
50-day SMA Roughly one quarter of trading days; commonly used as a swing-trade support/resistance level. Position traders, CANSLIM investors.
100-day SMA Half-year filter; less widely watched but useful between the 50 and 200. Trend-following systems.
200-day SMA Roughly one trading year; often the textbook line separating cyclical bull vs bear markets. Institutional investors, long-term trend and CTA models.
Common lookbacks. Pair definitions from Wikipedia: Moving-average crossover.

Chartists rarely use just one. A common combination is a fast line (say 20-day) plotted with a slow line (say 200-day), and watched together for direction, distance, and crossovers.

Why the EMA turns faster — visualised

Imagine a stock that trades flat at $100 for nine days, then gaps up to $110 and stays there. The chart below shows how a 10-day SMA and a 10-day EMA respond to that single shock. The SMA needs the shock to work its way through the full 10-day window before it fully reflects the new level. The EMA reweights immediately and closes most of the gap in a few days.

SMA vs EMA response to a price shockIllustrative 24-day series showing a flat price at $100 followed by a jump to $110 on day 11. The 10-day EMA closes the gap much faster than the 10-day SMA.$100$102$104$106$108$110Day 1Day 5Day 10Day 15Day 20Day 24Price shock (Day 11)Price10-day SMA10-day EMA
Illustrative diagram (synthetic data). SMA and EMA computed with the formulas shown above. Concept per Wikipedia: Exponential smoothing.

The Golden Cross and Death Cross

Two lines, one signal. When the 50-day simple moving average crosses above the 200-day SMA, chartists call it a Golden Cross. When the 50-day crosses below the 200-day, it’s a Death Cross. Wikipedia’s Moving-average crossover entry defines the Golden Cross as the moment “the 50 days simple moving average crosses 200 days simple moving average from below.”

The intuition is straightforward. When the short average moves above the long one, the recent trend is beating the long-run average — a signal that the intermediate direction has turned up. It’s a confirmation, not a leading indicator: by construction the cross happens after the trend has already changed. The bear-market version (Death Cross) is symmetric.

Because both averages have to catch up before they can cross, these signals lag. The Wikipedia entry on the Death Cross notes explicitly that “Death cross is not a reliable indicator of future market declines.” Treat crossovers as context, not calls.

Illustrative Golden Cross on a 260-day synthetic price seriesSynthetic one-year price series with the 50-day and 200-day simple moving averages overlaid. The 50-day crosses above the 200-day near day 200, marking a Golden Cross.$85$90$95$100$105$110$115Day 1Day 51Day 101Day 151Day 201Day 260Price (synthetic)50-day SMA200-day SMA
Illustrative diagram (synthetic data, computed in Python). Crossover definitions per Wikipedia: Moving-average crossover.

Common mistakes — and when moving averages break down

  • Treating them as predictions. A moving average is a lagging summary of what already happened. It doesn’t forecast anything on its own; it just describes the recent path.
  • Cherry-picking the lookback. If you tune the period until a signal fits your favourite historical trade, you’re curve-fitting. The 20/50/200 defaults exist precisely so you don’t.
  • Forgetting they lag in chop. In a sideways range, an MA and price will cross repeatedly and produce a stream of losing signals. Crossover systems live and die on their ability to catch a few big trends and give back a lot in the ranges between.
  • Ignoring dividends and splits. An MA over raw prices is discontinuous on ex-dividend and split dates. Serious backtests use total-return, split-adjusted series.
  • Confusing SMA with weighted variants. A 20-day SMA and a 20-day EMA can be materially different, especially on volatile days. Chart software often defaults to one or the other without saying which.

Related concepts — what to learn next

Moving averages are the building block for a lot of other technical tools. Once the SMA/EMA is clear, three concepts follow directly:

  • MACD (12-day EMA minus 26-day EMA, smoothed with a 9-day EMA) is really just three EMAs stacked. If you understood the EMA above, you already understand the mechanics of MACD.
  • Bollinger Bands are a 20-day SMA plus and minus two standard deviations. The centre line is the same moving average you already know.
  • Envelopes and Keltner Channels replace the standard-deviation envelope with a fixed-percentage or ATR-based band around a moving average.

Sources & further reading

Disclosure: This article is for informational purposes only and is not investment advice.

Leave a Comment