The Test Bench › Moving averages › EMA crossover › Study 019
Does the 9 EMA crossing the 21 EMA predict the next month? We tested 97,289 signals across 483 S&P 500 stocks, 2006 to September 2026, over the next 20 trading days (about a month).
STUDY 019After a bullish 9/21 EMA crossover in a stock above its 200-day average, the stock rose a median 1.2% over the next 20 trading days, 0.20 percentage points more than on an ordinary day.
After a bearish 9/21 EMA crossover in a stock below its 200-day average, the stock rose a median 1.0%, 0.39 percentage points less than on an ordinary day.
The largest estimated gap in the four comparisons, in either direction, was 0.39 percentage points; none met our test for a clear difference. One, after a bearish 9/21 EMA crossover in stocks above their 200-day average, was just positive on the main test but did not hold under every setting, so we do not treat it as a robust finding.
In this test, either 9/21 EMA crossover showed no clear difference from ordinary days over the next 20 trading days; that is not proof that there is none.
Worked examples and how traders use it: the EMA crossover explained. The same test for the golden cross and the 200-day average. Moving-average rules compared as trading strategies: the moving average backtest. The whole series: moving average trading explained.
An event study: it measures what followed each signal. No entry, exit, position size or trading cost is simulated; the backtest of these rules is a separate study. The stocks are today’s S&P 500 members, so companies that failed along the way are missing (survivorship bias).
Calm and volatile compare each stock’s volatility with its own whole-period median, a label that uses hindsight. Over the 40 trading days before the signal, stocks above their 200-day average had moved a median +1.8% to +2.4%, depending on the volatility state. Over the next 20 days they rose a median 1.2%, against +1.0% on an ordinary day; the gap was not clear.
Over the 40 trading days before the signal, stocks below their 200-day average had moved a median −3.0% to −1.2%, depending on the volatility state. Over the next 20 days they rose a median 1.0%, against +1.4% on an ordinary day; the gap was not clear.
The lines stay close to zero: in this test, the signals were not followed by a clear difference from ordinary days over the next 20 days.
The 200-day average made no clear difference. Many guides take a fast crossover only in the direction of the long-term trend, set by the 200-day average. After an upward cross, against an ordinary day: 0.20 percentage points more in stocks above the average (not clear), 0.09 percentage points more in stocks below it (not clear). In this test, the side of the 200-day average made no clear difference to what followed.
We added this check after reading the main results, so treat it as a pattern to test again on new data, not a confirmed edge. It asks whether the signal marks a change in how much the price moves, or the start of a steadier trend; it measures no trading profit, and the return comparison above remains the main test. Same stocks, years and signals; the comparison is again with ordinary days of the same stocks on the same side of the 200-day average. The measure is a ratio: volatility (the standard deviation of daily returns) over the 20 trading days after a signal or an ordinary day, divided by the same over the 20 days before; the figures are medians of that ratio, and 1.00 means no change. The chart shows the path on a different scale, 20-day volatility against the stock’s usual level.
Over the 20 trading days after a bullish 9/21 EMA crossover in a stock above its 200-day average, volatility was 5% lower than over the 20 before (a median ratio of 0.95), against 1.00 on ordinary days: a difference in the ratio of −0.05 (−0.07 to −0.03), clear under every block length. It fell after 55% of these 31,035 signals, against 50% of ordinary days; and in 379 of the 483 stocks with at least one such signal, the stock’s median ratio after the signal was below its median on its own ordinary days. After a bearish 9/21 EMA crossover in a stock below its 200-day average, the median ratio was 1.03 against 0.96: +0.06 (+0.04 to +0.08), clear under every block length.
Trendiness compares the net price change over the window with the total distance the price travelled, the sum of its daily moves: near 1, the price moved mainly one way; near 0, back and forth. It shows whether a trend followed. Before a 9/21 EMA cross up it was 0.081 against 0.213 on ordinary days (clear under every block length); after it, 0.213 against 0.202 (clear under every block length). Before a cross down, 0.096 against 0.205 (clear under every block length); after it, 0.204 against 0.201 (not clear).
The two other cells answer whether the side of the 200-day average or the direction of the signal drove this. After a 9/21 EMA cross up in a stock below its 200-day average, the median ratio was 0.91, against 0.96 on ordinary days (clear under every block length, 17,367 signals); after a cross down in a stock above it, 1.09 against 1.00 (clear under every block length). Here the direction of the signal mattered more than the side of the 200-day average.
One possible explanation: the window before a rise holds the turbulent stretch that set it up, and volatility tends to settle after such a stretch, while falling prices tend to come with higher volatility. The test does not isolate it. It measures how much the price moved; which way it moved is the subject of the results above.
Brock, Lakonishok and LeBaron (1992) found that, on the Dow Jones Industrial Average from 1897 to 1986, buy signals from simple moving-average rules were followed by higher returns than sell signals. Their rules set a 1-, 2- or 5-day average against a 50-, 150- or 200-day one; this study tests the same family of rules with the 9/21 pair, on single stocks and in a later period.
Question: after a bullish 9/21 EMA crossover or a bearish 9/21 EMA crossover, does the stock’s median return over the next 20 trading days differ from ordinary days for the same stocks on the same side of the 200-day average?
| Part | Definition |
|---|---|
| Indicators | The 9-day and 21-day exponential moving averages of the daily close (custom EMAs in the app) |
| Bullish 9/21 EMA crossover | The first close on which the 9-day EMA is above the 21-day EMA, after a close below it |
| Bearish 9/21 EMA crossover | The first close on which the 9-day EMA is below the 21-day EMA, after a close above it |
| Measured | From the signal day’s close, over the next 20 trading days (about a month) |
| Compared with | Every eligible day of the same stocks on the same side of the 200-day average |
| Stocks | 483 current S&P 500 members, 2006 to September 2026, price returns |
The design was set on 15 October 2026 in our internal study record, before any return was read. The stocks, data and years are those of our RSI studies, so the series can be compared on one data set.
The 97,289 signals are not 97,289 independent observations: signals repeat in the same stock, the 20-day windows overlap, and stocks move together. The 95% intervals come from a calendar-block bootstrap that resamples whole stretches of the calendar (2,000 resamples), rerun with several block lengths and designs. A gap is called clear when every interval excluded zero on the same side: our own rule, stricter than a single test, and not proof that a gap will persist in future data. The four comparisons are not adjusted for being tested together, so one clear result among them would be weaker evidence than it looks. Signal days are part of the ordinary-day pool, as in the app’s event study: the comparison is with every eligible day, signals included. Leaving the signal days out of the pool moves each comparison by 0.009 percentage points or less, a small fraction of every interval’s width.
Survivorship bias. This is not the historical index. It is today’s S&P 500 members projected backwards, so companies that failed or left the index after a deep fall are missing. How the bias works and how to avoid it: survivorship bias in backtesting.
In Custom Indicators, add an EMA with Period 9 and an EMA with Period 21. In the Events panel, add a Signal “your EMA 9 ↑ crosses above your EMA 21”, wired into EVENT (the block that marks the event days). Choose 1d · Daily, set the horizon to 20 and the Trend to > SMA200, run it, then repeat with < SMA200 and with “↓ crosses below”.
| Signal | Stocks | Signal days | Median 20-day return | Ordinary days | Difference | 95% interval | Result |
|---|---|---|---|---|---|---|---|
| 9/21 EMA cross up | Above 200-day | 31,147 | +1.22% | +1.02% | +0.20 points | −0.04 to +0.40 | not clear |
| 9/21 EMA cross up | Below 200-day | 17,425 | +1.51% | +1.43% | +0.09 points | −0.31 to +0.50 | not clear |
| 9/21 EMA cross down | Above 200-day | 30,088 | +1.26% | +1.02% | +0.24 points | +0.004 to +0.49 | some settings |
| 9/21 EMA cross down | Below 200-day | 18,629 | +1.04% | +1.43% | −0.39 points | −0.88 to +0.04 | not clear |
| After 5 days | Above the 200-day average | Below it |
|---|---|---|
| 9/21 EMA cross up | +0.03 points (−0.06 to +0.12) | −0.18 points (−0.35 to −0.01) |
| 9/21 EMA cross down | +0.16 points (+0.05 to +0.28) | −0.11 points (−0.25 to +0.04) |
Main (63-day) intervals only: these checks were not rerun under the other settings and are not adjusted for being tested together, so an interval here that excludes zero is weaker evidence than a clear result.
| Signal | Signal days | Volatility, next 20 ÷ previous 20 days | Ordinary days | Difference | 95% interval | Result |
|---|---|---|---|---|---|---|
| 9/21 EMA cross up · above 200-day | 31,035 | 0.953 | 1.003 | −0.05 | −0.07 to −0.03 | clear |
| 9/21 EMA cross up · below 200-day | 17,367 | 0.909 | 0.964 | −0.06 | −0.08 to −0.03 | clear |
| 9/21 EMA cross down · above 200-day | 29,992 | 1.085 | 1.003 | +0.08 | +0.07 to +0.10 | clear |
| 9/21 EMA cross down · below 200-day | 18,572 | 1.026 | 0.964 | +0.06 | +0.04 to +0.08 | clear |
| Signal | Trendiness, previous 20 days | Ordinary days | Result | Trendiness, next 20 days | Ordinary days | Result |
|---|---|---|---|---|---|---|
| 9/21 EMA cross up | 0.081 | 0.213 | clear | 0.213 | 0.202 | clear |
| 9/21 EMA cross down | 0.096 | 0.205 | clear | 0.204 | 0.201 | not clear |
Intervals: calendar-block bootstrap over trading dates, blocks of 21, 63, 126, 252 days, 2000 resamples each; the interval shown is the 63-day one.
| Signal | State | Signal days | Difference | 95% interval |
|---|---|---|---|---|
| 9/21 EMA cross up | Above 200-day · calm | 17,180 | +0.26 points | +0.01 to +0.46 |
| 9/21 EMA cross up | Above 200-day · volatile | 13,967 | +0.05 points | −0.30 to +0.42 |
| 9/21 EMA cross up | Below 200-day · calm | 5,365 | +0.11 points | −0.18 to +0.45 |
| 9/21 EMA cross up | Below 200-day · volatile | 12,060 | +0.13 points | −0.47 to +0.66 |
| 9/21 EMA cross down | Above 200-day · calm | 16,181 | +0.17 points | −0.04 to +0.39 |
| 9/21 EMA cross down | Above 200-day · volatile | 13,907 | +0.33 points | −0.09 to +0.76 |
| 9/21 EMA cross down | Below 200-day · calm | 5,531 | −0.15 points | −0.53 to +0.17 |
| 9/21 EMA cross down | Below 200-day · volatile | 13,098 | −0.54 points | −1.19 to +0.10 |
Using this research. The analysis, tables and figures on this page are GU Analyser Ltd’s own work, published under a Creative Commons BY-NC 4.0 licence. You are welcome to quote it, cite it and build on it, with credit and a link. Suggested credit: GU Analyser, The Test Bench, Study 019, linking to guanalyser.com/test-bench/ema-crossover-9-21/. For commercial use, ask us at hello@guanalyser.com.
Rebuild the test
Add two EMAs, build the crossover in the Events panel, set the trend precondition and the horizon, and measure what followed it on your own stocks.
Create a free account and run your own tests → or read how the EMA is calculated →The method: how an event study works