Every Quant

Moving average crossover

Short answer

A moving average crossover is a trading rule that acts when a faster moving average crosses a slower average, or when price crosses a moving average. A cross upward is read as the start of an uptrend, and a cross downward as a downtrend.

Moving averages smooth price, and a faster average reacts more quickly than a slower average. When the faster average rises above the slower, recent prices are higher than older ones, which suggests a trend might have begun. Some crossovers have popular names in market commentary, such as the golden cross and the death cross, but they are simply particular choices of average lengths. The rule is simple and transparent, which explains its wide use.

How it is used in strategy design and testing

In strategy design, crossovers are a basic trend-following building block. Designers choose the type of average, the lengths, whether to trade both long and short, and whether to require a buffer before acting to reduce whipsaws. Many systematic programs combine several crossovers at different speeds, which spreads the bet across fast and slow trends and reduces reliance on any particular setting.

In testing, crossovers are easy to overfit because the lengths can be tuned endlessly. Testers record every setting tried, check that results hold across neighbouring settings and markets, and include realistic costs for each trade. They also examine choppy periods, where crossovers produce many small losses, and use out-of-sample data before trusting any setting.

Common mistakes

  • Optimising lengths to the past. The setting that looked strongest on history rarely stays that way.
  • Ignoring whipsaws. Sideways markets produce frequent false crossovers.
  • Using look-ahead prices. Trading at the same close used to compute the cross is a hidden bias.
  • Treating a famous cross as special. Popular settings have no special power.

Where the term comes from

Brock, Lakonishok and LeBaron studied moving average crossover rules on a long history of stock index data, a widely cited academic test of the approach.

Education only. Not investment advice.

Questions people ask

What is a moving average crossover?

It is a rule that buys when a faster average crosses above a slower average and sells when it crosses below. It is used to follow trends.

What is a golden cross?

It is a popular name for a faster moving average crossing above a slower average, usually with long lengths. A death cross is the opposite.

Do moving average crossovers lag?

Yes. Averages use past prices, so crossovers always confirm a trend after it starts. Faster averages lag less but whipsaw more.

How can crossover rules be checked fairly?

Fix the rule before testing, check many markets and periods, include costs, and confirm results on data not used to choose the settings.

Papers

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