Every Quant

Moving average

Short answer

A moving average is the average of a series over a rolling window of recent values, recalculated as each new value arrives. It smooths out short-term noise so the underlying direction of a price is easier to see.

The simple moving average gives each value in the window equal weight. The exponential moving average gives more weight to recent values, so it reacts faster. Other versions weight by volume or adapt to volatility. All share the same trade-off: a longer window is smoother but reacts later, and a shorter window reacts sooner but follows more noise.

How it is used in strategy design and testing

In strategy design, moving averages serve as a reference level. Trend followers often treat a price above a rising average as an uptrend and below a falling average as a downtrend. Mean-reversion designers do the opposite and measure how far price has stretched away from its average. A crossover between a faster and a slower average is a classic way to describe a change in trend.

In testing, the main question is robustness. The tester checks how results change across a broad range of window lengths, because a result that depends on a single precise window is likely fitted to the past. Testers also compare the moving-average rule with a simple buy-and-hold benchmark, include costs from the extra trades in choppy markets, and look at behaviour in trending and range-bound regimes separately.

Common mistakes

  • Searching for the perfect window. The top window on old data rarely stays on top.
  • Ignoring lag. Every moving average reacts after the move has begun.
  • Forgetting whipsaw costs. In sideways markets, price crosses the average often, and each cross can mean a costly trade.
  • Treating the average as support. A moving average is a summary of the past, not a level the market must respect.

Where the term comes from

Brock, Lakonishok and LeBaron studied simple moving-average and trading-range rules on a long history of stock index data, a widely cited academic study of these tools.

Education only. Not investment advice.

Questions people ask

What is a moving average in trading?

It is the average price over a rolling window of recent periods. It smooths short-term noise and helps traders see the direction of the trend.

What is the difference between a simple and an exponential moving average?

A simple moving average weights every value in the window equally. An exponential moving average weights recent values more, so it reacts faster to new prices.

What is a moving-average crossover?

It is the point where a faster moving average crosses a slower average. Traders use it to describe a possible change from a downtrend to an uptrend, or the reverse.

Do moving averages predict prices?

No. They summarise past prices and lag the market. Their use in strategies rests on the idea that trends tend to persist, which may or may not hold in a given period.

Papers

Written and checked by the Every Quant research team · Updated . How we write and check entries: methods.