EMA (Exponential Moving Average)
Exponential moving average of an upstream series. Edge-first and chainable, with a symbol-fetch fallback when unconnected. Wired to more than one Price Factor, it fans out to per-ticker by_symbol results.
What (One-liner)
EWM recursive smoothing (α = 2/(span+1), adjust=False) — reacts faster than SMA, and feeds MACD / Bollinger / momentum chains.
Inputs
span(number, optional) — EMA span, default 20.symbol(string, optional) — fallback ticker used only when there is no upstream series.
Outputs
series— EMA series aligned to the input.current— latest EMA value.by_symbol— per-ticker map when fed by multiple Price Factors.
How to use
- Connect an upstream series.
- Set
span(default 20; 12 / 26 for MACD components). - Output
serieschains downstream.
Core formulas
α = 2 / (span + 1)
EMA_0 = P_0
EMA_t = α·P_t + (1-α)·EMA_{t-1}
# pandas equivalent
series.ewm(span=span, adjust=False).mean()Assumptions & applicability
Assumptions: TradingView / MT4 convention α = 2/(span+1) + recursive (adjust=False) + first-value init.
Applicability: MACD components, Bollinger middle band, momentum strategies; any asset class, any frequency.
Out of scope: Wilder α = 1/n (that is RSI), triangular / WMA weighting, short series.
Known limitations
- More responsive than SMA, but more prone to whipsaw on noisy input.
- Early values reflect a short effective lookback before the span fills in (recursive init bias).
- α = 2/(span+1) and adjust=False are hardcoded conventions.
References
Murphy (1999), Technical Analysis of the Financial Markets; Roberts (1959), EWM statistical origin.
Golden Test
tests/golden/fixtures/tier1/compute_ema/ — tolerance 1e-12 absolute, benchmarked against pandas.Series.ewm(span=span, adjust=False).mean(), last verified 2026-05-25, status passing.
Changelog
- 1.0.0 (2026-05-25) — Activated as canonical Layer-1 transform; merged governance fields from the superseded Layer-0
compute_emacard.

