What Is a Moving Average?
A moving average is a calculation that smooths price data by creating a constantly updated average price over a specific number of periods. It is called "moving" because the average is recalculated with each new data point -- the window slides forward in time, dropping the oldest value and incorporating the newest one.
Moving averages are arguably the most widely used tools in technical analysis. They serve two primary purposes: smoothing out short-term price noise to reveal the underlying trend, and generating trading signals when prices or different moving averages cross each other.
There are two main types of moving averages used by traders and analysts: the Simple Moving Average (SMA) and the Exponential Moving Average (EMA). Each has distinct properties, advantages, and trade-offs.
Simple Moving Average (SMA)
The Simple Moving Average is the arithmetic mean of the last N closing prices. The formula is straightforward:
Where P1 through PN are the closing prices over the last N periods.
For example, a 20-day SMA on April 4 would be the sum of the last 20 closing prices divided by 20. On April 5, the calculation drops the oldest price (from 20 trading days ago) and adds the new closing price.
Properties of the SMA
Equal weighting: Every price in the window contributes equally to the average. The closing price from 20 days ago has the same influence as yesterday's close. This is both a strength (simplicity) and a weakness (the SMA can be slow to react to recent changes).
Sensitivity to old data dropping off: When a particularly high or low price exits the lookback window, the SMA can shift noticeably even if recent prices have been flat. This can create artificial movements in the indicator that do not reflect current market conditions.
Smoothness: The SMA produces a smoother line than the EMA for the same period, which can be useful for identifying broad trends without reacting to every short-term fluctuation.
Exponential Moving Average (EMA)
The Exponential Moving Average addresses the SMA's equal-weighting limitation by assigning more weight to recent prices. The formula uses a multiplier (also called the smoothing factor) that determines how much weight the most recent price receives:
EMAtoday = (Closetoday x Multiplier) + (EMAyesterday x (1 - Multiplier))
For a 20-period EMA, the multiplier is 2 / (20 + 1) = 0.0952, meaning the most recent price receives approximately 9.52% of the weight. For a 50-period EMA, the multiplier is 2 / (50 + 1) = 0.0392. For a 200-period EMA, it is 2 / (200 + 1) = 0.00995.
The EMA is recursive -- each new value depends on the previous EMA value, which in turn depends on the one before it, and so on. This means that, technically, all historical prices have some influence on the current EMA, though the influence decays exponentially (hence the name). In practice, the influence of prices older than about 3N periods is negligible.
SMA vs. EMA: Practical Differences
The EMA reacts more quickly to recent price changes than the SMA of the same period. This faster response means the EMA will turn sooner when a trend changes direction, potentially providing earlier signals. However, it also means the EMA is more prone to whipsaws -- false signals generated by short-term price fluctuations.
Neither is objectively "better." The choice depends on the trader's goals. Traders focused on shorter time frames and faster signals tend to prefer the EMA. Longer-term trend followers and institutional analysts frequently use the SMA, particularly the 200-day SMA, because its slower response filters out more noise.
Common Moving Average Periods
Widely Used Moving Average Periods
- 20-day: Short-term trend. Roughly one trading month. Often used for swing trading
- 50-day: Medium-term trend. Used by both traders and analysts as an intermediate trend gauge
- 200-day: Long-term trend. The most institutionally significant moving average. Widely used as a regime indicator
- 10-day / 21-day EMA: Popular with short-term momentum traders
- 100-day: Sometimes used as a middle ground between 50 and 200
These specific periods are conventions that have become entrenched through decades of use. There is no mathematical proof that 200 is better than 195 or 210. However, the widespread adoption of these round numbers creates a degree of self-reinforcing behavior: because so many market participants watch the same levels, price reactions at these moving averages can be amplified.
The 200-Day Moving Average: An Institutional Benchmark
The 200-day moving average deserves special discussion because of its unique status in institutional finance. It is the single most watched moving average in the industry.
When the S&P 500 is trading above its 200-day simple moving average, it is generally considered to be in a bullish regime. When it is below, the regime is bearish. This binary classification -- above or below the 200-day MA -- is used by a wide range of market participants, from individual technical traders to multi-billion-dollar systematic funds.
The logic is intuitive: if the current price is above the average of the last 200 trading days (approximately 10 calendar months), the intermediate-to-long-term trend is up. If it is below, the trend is down. This is a crude but surprisingly useful heuristic.
Institutional reality: Many trend-following and managed futures funds use 200-day MA crossover (or variants of it) as one component of their trend signals. The 200-day MA is also commonly referenced in financial media, analyst reports, and market commentary. When a major index crosses below its 200-day MA, it tends to generate significant coverage, which can itself influence behavior.
For individual stocks, the 200-day MA serves a similar function. Stocks trading above their 200-day MA are in uptrends; those below are in downtrends. Many traders will only consider long positions in stocks above their 200-day MA, and short positions in stocks below it. This is a trend-following filter rather than a timing tool.
Golden Cross and Death Cross
Golden Cross
A golden cross occurs when a shorter-period moving average crosses above a longer-period moving average. The most commonly cited version is the 50-day SMA crossing above the 200-day SMA. This is interpreted as a bullish signal -- the intermediate trend is turning up relative to the long-term trend.
Death Cross
A death cross is the opposite: the 50-day SMA crossing below the 200-day SMA. This is interpreted as a bearish signal.
Do They Actually Work?
The historical record of golden and death crosses is mixed, and this is where precision matters.
Golden and death crosses are lagging signals by definition. Because they use 50-day and 200-day averages, a significant price move must already have occurred before the crossover triggers. By the time the 50-day MA crosses above the 200-day MA, the stock has typically already rallied substantially from its low.
As trend confirmation signals, golden crosses have some value. They indicate that a sustained upward move is underway, which can be useful for longer-term position management. However, as entry signals, their timing is often poor -- you are buying well after the trend has started.
Death crosses suffer from similar timing issues. Many death crosses in the S&P 500 have occurred near the bottom of a decline, just before a reversal. The December 2018 death cross, for example, triggered only days before the market bottomed and began a strong rally.
Whipsaw risk: In sideways, choppy markets, the 50-day and 200-day MAs can repeatedly cross each other, generating alternating buy and sell signals that lead to cumulative losses from transaction costs and bad entries. This is the primary failure mode of moving average crossover systems.
Moving Averages as Support and Resistance
Traders commonly observe that prices tend to "bounce" off key moving averages, particularly the 50-day and 200-day SMAs. A stock in an uptrend may pull back to its 50-day MA and then resume its advance. A stock in a downtrend may rally to its 200-day MA and then resume its decline.
This behavior is partly self-fulfilling. Because so many traders place buy orders near the 50-day or 200-day MA (expecting a bounce), the concentration of demand at those levels can actually cause the bounce. Similarly, stop-loss orders clustered just below a moving average can trigger cascading selling when the level breaks.
However, it is essential to understand that moving averages are not true support and resistance in the structural sense (the way a prior low or high is). They are dynamic levels that shift daily, and the price interaction with them is statistical, not deterministic. The 50-day MA "acts as support" frequently enough to be useful, but it also fails frequently enough that relying on it without additional confirmation is risky.
Academic Research on Moving Average Trading Rules
The academic literature on moving average trading rules spans decades and provides important context for anyone using these tools.
Brock, Lakonishok & LeBaron (1992)
One of the most influential studies on the topic is "Simple Technical Trading Rules and the Stochastic Properties of Stock Returns" by William Brock, Josef Lakonishok, and Blake LeBaron, published in the Journal of Finance in 1992. The authors tested moving average crossover rules and trading range break rules on the Dow Jones Industrial Average from 1897 to 1986.
Their findings were striking: simple moving average rules (such as buying when the short-term MA crosses above the long-term MA) generated returns that significantly exceeded buy-and-hold, even after accounting for transaction costs. Buy signals produced average annual returns substantially higher than sell signals. The results were consistent across sub-periods and were not driven by a few extreme observations.
This paper was important because it used a very long data series and applied rigorous bootstrap methods to assess statistical significance. The results suggested that moving average rules captured genuine patterns in stock returns, not just random noise.
Sullivan, Timmermann & White (2001)
However, a subsequent study by Ryan Sullivan, Allan Timmermann, and Halbert White, "Data-Snooping, Technical Trading Rule Performance, and the Bootstrap" published in the Journal of Finance in 1999, raised significant concerns. The authors argued that the Brock et al. results, while technically sound, were subject to data-snooping bias.
The argument: by the time Brock et al. conducted their study, the rules they tested (like the 50/200 MA crossover) were already well-known to practitioners. Testing well-known rules on historical data and finding they worked does not prove they will work going forward -- it may simply mean that generations of analysts already mined these patterns, and the surviving rules are those that happened to work in-sample.
Sullivan, Timmermann, and White applied a Reality Check bootstrap procedure that accounted for the universe of rules that could have been tested. After adjusting for data-snooping, the statistical significance of the best technical trading rules was substantially reduced.
The data-snooping problem is real. If you test 1,000 trading rules, roughly 50 will appear statistically significant at the 5% level purely by chance. The rules that survive and become popular are precisely those that worked in-sample -- but this does not mean they captured a genuine, repeatable pattern. This concern applies not just to moving averages but to all technical trading rules.
Post-Publication Evidence
Several studies examining moving average trading rules on data after the Brock et al. sample period (post-1986) have found diminished or absent profitability. This is consistent with the idea that as trading rules become widely known, they are arbitraged away -- enough capital flows into the strategy that the opportunity shrinks or disappears.
That said, moving average rules have continued to show some effectiveness in certain contexts: emerging markets (where information dissemination is slower), during high-volatility regimes, and when used as filters rather than primary signals.
Limitations of Moving Averages
Lag
All moving averages are lagging indicators. They are calculated from past prices and will always turn after the price itself turns. A 200-day moving average, by definition, reflects the average of the last 200 days -- it cannot possibly identify a trend change until well after it has occurred. The longer the period, the greater the lag.
Whipsaws in Sideways Markets
In range-bound markets where prices oscillate without a clear trend, moving average crossover systems generate frequent false signals. The price crosses above the MA, triggering a buy, then crosses back below, triggering a sell at a loss. This cycle repeats, and transaction costs compound. Moving averages work best in trending markets, which is a circular problem -- you need to know the trend to know if MAs will work, but you are using MAs to identify the trend.
No Information About Magnitude
A golden cross tells you the intermediate trend is turning up, but it tells you nothing about how far the move might go. The signal is binary (above or below), not scaled. A golden cross at the start of a multi-year bull market looks identical to a golden cross that produces a brief rally followed by a reversal.
Sensitivity to Period Selection
Changing the moving average period changes the signals. A 50/200 crossover system generates different trades than a 40/180 system or a 60/220 system. There is no objective way to determine the optimal periods in advance, and optimizing periods on historical data leads to overfitting.
Practical Guidelines for Using Moving Averages
- Use moving averages primarily as trend filters. Rather than using MA crossovers as entry signals, use the position of price relative to the 200-day MA (or another long-term MA) to determine whether you should be looking for long or short opportunities.
- Combine with other information. A moving average signal combined with volume confirmation, insider buying data, or fundamental analysis is far more useful than a moving average signal alone.
- Accept the lag. Do not try to "fix" the lag by using very short periods -- this increases whipsaws and noise. The lag is the cost of smoothing, and some lag is necessary to filter out random fluctuations.
- Watch the 200-day SMA on major indices. Even if you are skeptical of moving average trading rules, the 200-day MA on the S&P 500 is so widely watched that it has practical significance. Major breaks above or below it tend to attract attention and capital flows.
- Be aware of market regime. Moving average systems perform well in trending markets and poorly in sideways markets. If you can identify the regime in advance (which is itself a difficult problem), you can adjust your reliance on MA signals accordingly.
Moving Averages in Multi-Factor Signal Pipelines
In modern quantitative trading, moving averages are rarely used as standalone trading systems. Instead, they serve as one component in a multi-factor pipeline that combines different types of information to generate trading signals.
A common architecture uses the moving average as a trend filter, a momentum oscillator (like the RSI) for timing, volume for confirmation, and some form of fundamental or alternative data for the underlying thesis. Each component contributes information that the others lack.
In the context of insider trading analysis, moving averages provide the trend context that makes insider signals more actionable. An insider purchase at a stock that is above its 200-day MA and pulling back to its 50-day MA is a very different setup than an insider purchase at a stock in a sustained downtrend below all major moving averages. The insider buying provides the information edge; the moving average analysis provides the trend context and timing framework.
Alpha Suite uses moving average data -- including the relationship between price and the 50-day and 200-day averages -- as part of its technical overlay for scoring insider trading signals. Momentum and trend confirmation are weighted alongside insider conviction, volume, and relative strength to produce a composite signal score.
Insider Signals with Trend Confirmation
Alpha Suite overlays SEC Form 4 insider purchase analysis with moving average trend filters, momentum scoring, and volume confirmation for institutional-grade signal generation.
Get Started with Alpha Suite