Knowledge base · Indicator
Exponential moving average (EMA)
Exponential moving average (EMA)
Definition
The EMA is a recursively weighted average that gives recent
prices exponentially more weight than old ones — the standard
lower-lag alternative to the SMA, and the building block of MACD
(indicator-macd). Same job as the SMA (trend smoothing),
different lag/noise trade-off.
How it works / structure
- Formula: EMA_t = α·P_t + (1−α)·EMA_{t−1}, with α = 2/(N+1) for the “N-period” convention.
- Parameters (engine-executable): N (or α directly), price input, initialization (seed with SMA(N) — early values differ by seed, a replay-reproducibility detail the engine pins), and derived signals (price-vs-EMA, EMA slope, fast/slow EMA crossovers — 12/26 being MACD’s pair).
- Properties vs SMA: responds faster to new prices (less lag), never fully forgets old ones (infinite memory, geometrically decaying), no drop-off artifact — a shock decays smoothly instead of exiting abruptly.
- Equivalence caveat: EMA(N) and SMA(N) are not comparable at equal N; matching effective lag requires different windows — parameter conversions matter when porting rules.
When it applies
Anywhere the SMA applies with a preference for responsiveness: faster trend-state flips, crossover systems on shorter horizons, MACD construction. The choice between SMA and EMA is a lag-vs-noise parameter decision the engine treats as tunable, not a doctrine.
Risk profile & failure modes
- Faster also means noisier: the EMA’s responsiveness converts to more whipsaw signals in ranges — it moves the trade-off, it does not escape it.
- Seed sensitivity in short replays: early-window EMA values depend on initialization; short backtests inherit seed bias.
- False precision folklore: claims that specific EMA windows
(8/21, 9/13) carry special power are uncited lore; window
choice is a fitted parameter with all of
lens-quantitative’s overfitting caveats.
Evidence & limits
The evidence base is the same MA-rule literature as the SMA (Brock-Lakonishok-LeBaron 1992; Sullivan et al 1999’s snooping correction) — EMAs were among the tested family; no study establishes EMA superiority over SMA as a class. Trend-state content is real (time-series momentum); crossover timing edges are weak-to-unproven after costs.
Falsifiable-thesis examples
Illustrations only, not signals:
- “X, with its 21-day EMA above its 50-day EMA, will outperform its sector over the next month” — falsified by the pair’s returns.
- “Replacing SMA with lag-matched EMA in system S improves replay Sharpe this year” — falsified by the paired replay.
Cross-references
- Arithmetic sibling:
indicator-sma; principal consumer:indicator-macd - Effect proxied:
strategy-momentum - Platform binding:
trend_state - Method caveats:
lens-technical,lens-quantitative
Sources
- Brock, W., Lakonishok, J. and LeBaron, B. (1992), Simple Technical Trading Rules and the Stochastic Properties of Stock Returns — Journal of Finance 47(5), 1731-1764
- Sullivan, R., Timmermann, A. and White, H. (1999), Data-Snooping, Technical Trading Rule Performance, and the Bootstrap — Journal of Finance 54(5), 1647-1691
The agent cites this page.
Inside the platform, this entry is live context: the AI reasons from it, quotes it, and grades against it. Make your case.