The Test Bench › Moving averages › EMA crossover

EMA Crossover Strategy Explained: The 9/21 EMA, and What Our Tests Found

How the exponential moving average is calculated, how the 9/21 crossover is read, and how it compares with slower signals, with what our tests found.

An exponential moving average (EMA) follows the price more closely than a simple average of the same length. Two EMAs of different lengths cross when their order changes, which traders often read as a shift in short-term momentum; the 9-day and 21-day pair is a commonly used example.

An EMA turns sooner than a simple averageAn exponential moving average adds a share of each new close to yesterday’s value: 2 ÷ (n + 1), so a fifth for a 9-day EMA.The newest close carries more of the average than in a simple average of the same length.Faster turns mean earlier signals, and more that reverse soon after.
The 9/21 EMA crossover is a short-term trend signalTraders often read the 9-day EMA crossing above the 21-day as a bullish short-term signal, and crossing below as bearish.Traders use short EMA pairs for short-term signals; our study tests the 9/21 pair on daily bars.Many guides take it only in the direction of the 200-day trend.
MACD is built from the same ideaThe MACD line is the 12-day EMA minus the 26-day EMA. It crosses zero when those two EMAs cross.The 9/21 crossover is the same comparison with faster averages.The usual MACD signal is a different event: the MACD line crossing its own signal line, which our MACD studies test.

How is an EMA calculated?

Today’s EMA = yesterday’s EMA + k × (today’s close − yesterday’s EMA), with k = 2 ÷ (n + 1). For a 5-day EMA, k = 2 ÷ 6 ≈ 0.33. With yesterday’s EMA at 21.40 and today’s close at 25, today’s EMA is 21.40 + 0.33 × (25 − 21.40) = 22.60. A 5-day simple average of the same closes is 22.40. For the 9-day EMA, k = 2 ÷ 10 = 0.20. This example starts the EMA from the day-5 simple average; platforms start it in different ways (GU Analyser starts from the first close of the history), so their early values differ.

The 9/21 crossover

9-day and 21-day EMA crossoversinvented pricesClose9-day EMA21-day EMACROSS UPCROSS DOWNCROSS UP
Invented prices. The fast EMA crosses the slow one several times as the price changes direction.

Because the averages are shorter, the 9/21 pair usually reacts sooner than the 50/200 pair of the golden cross. It can also reverse more often when the price moves sideways. Many traders add the 200-day average as a filter and take only crossovers in its direction.

What our tests found

How to read these results. An event study compares the days after a signal with ordinary days of the same stocks; a backtest runs one complete rule with costs and reports a median total return per stock over the whole period; the two answer different questions. “Clear” is our own rule: the 95% interval excluded zero under every test setting we ran, which is not proof that a gap will last. All tests use today’s S&P 500 members projected back, which can flatter strategies that hold through deep falls, such as buying and holding (see survivorship bias in backtesting), and price returns without dividends.

Related: our MACD crossover studies test a signal built from the 12-day and 26-day EMAs.

Common questions

What is an EMA?

An exponential moving average: an average of past closes that gives the newest close the most weight. Each day it moves towards the close by 2 ÷ (n + 1) of the gap, so a 9-day EMA moves a fifth of the way.

What is the 9/21 EMA crossover?

A short-term signal: the 9-day EMA crossing above the 21-day EMA is read as bullish, crossing below as bearish. It is used for short-term signals; our study tests it on daily bars, and tests no intraday strategy.

Is the EMA better than the SMA?

Neither is better in general. The EMA turns sooner, which gives earlier signals and more that reverse soon after; the SMA is smoother and later. The choice mainly changes how early and how often a rule trades.

Does the 9/21 EMA crossover work?

In our test, the 20 trading days after a bullish crossover in a stock above its 200-day average were not clearly different from ordinary days. In the separate backtest, as a trading rule, it was in the market 58% of the time, with a median total return per stock of +68% against +361% for buying and holding, 2006 to September 2026.

What is the best EMA crossover?

There is no single best pair. 9/21, 12/26 (the basis of MACD) and 20/50 are common; shorter pairs trade more often. A pair chosen because it did best on past data often does worse on new data: picking the best of many pairs after testing them fits the past (overfitting).

Should I take EMA crossovers only with the trend?

Many guides take a bullish crossover only while the price is above its 200-day average, and a bearish one only below. Our study reports both sides of the 200-day average.

How is the EMA crossover related to MACD?

MACD is the 12-day EMA minus the 26-day EMA, so MACD crossing zero is the 12/26 EMA crossover, with the same EMA settings. The 9/21 crossover compares two shorter averages in the same way.

Want to test an EMA crossover yourself?

Add two EMAs with your own periods, measure what followed the crossover on your stocks, or backtest it with a cost on each trade.

Create a free account and build your own strategies → or read how the EMA is calculated in the app →

The methods: how a backtest is built · how an event study works

These are historical analyses. They are neither advice nor forecasts. They describe what happened on past data under stated, simplified assumptions. Past results do not prove what will happen next, and nothing in the Test Bench is a recommendation to buy or sell an investment. GU Analyser is an analytical and educational tool — no money is ever traded here.