# EWMA Volatility

Also known as: RiskMetrics λ-decay.
A Volatility concept (Volatility estimators) in the LuxAlgo Library, with 1 indicator implementation.

## What is EWMA Volatility?

EWMA volatility estimates variance with an exponentially weighted moving average of squared returns: today's estimate equals a decay factor lambda times yesterday's estimate, plus one minus lambda times yesterday's squared return, with the mean return usually set to zero. J.P. Morgan's RiskMetrics methodology popularized the recursion and fixed lambda at 0.94 for daily data, which is why the recursion is often just called the RiskMetrics model. Geometrically decaying weights let the freshest shocks dominate while old ones fade smoothly.

The lineage spans industry and academia. Exponential smoothing was a forecasting workhorse long before finance adopted it; the academic treatment of time-varying volatility arrived with Robert Engle's ARCH model in 1982 and Tim Bollerslev's GARCH generalization in 1986. RiskMetrics, published openly by J.P. Morgan in 1994, chose the EWMA recursion as a pragmatic middle path: it captures the tendency of turbulent periods to follow turbulent periods without any model fitting, and its free publication helped make it a de facto standard for value-at-risk work in the 1990s.

Two properties drive its use. It has no drop-off artifact: rolling [realized volatility](https://www.luxalgo.com/library/concept/realized-volatility/) computed over a fixed window jumps when a large return enters the window and jumps again when it exits, while EWMA decays a shock continuously. And it is the boundary case of the GARCH family with no long-run anchor: it captures the persistence of calm and turbulent stretches but never mean-reverts, so its forecast at any horizon is simply the current estimate.

Lambda has a concrete meaning as memory. The weight on an observation k periods old is proportional to lambda raised to k, so at the daily value of 0.94 the weight halves roughly every 11 trading days: the past month dominates the estimate and data older than a quarter contributes little. The recursion outputs a variance whose square root gives per-bar volatility, usually annualized by the square root of periods per year. Because the input is squared close-to-close returns, gaps enter through the return itself, unlike [ATR](https://www.luxalgo.com/library/concept/atr/), which folds them in through true range.

## How to Read EWMA Volatility on a Chart

EWMA volatility plots as a smooth line or adaptive band width rather than a price pattern, so reading it is about shape and level.

1. Plot the estimate in a subpane with an EWMA indicator or a short script of the recursion, choosing lambda for your horizon; 0.94 is the daily default.
2. Read the shock response: EWMA jumps the bar after a large return, then decays smoothly; a volatility line that steps down with no news is usually a fixed-window estimate dropping its oldest observation, not EWMA.
3. Compare fast against slow: EWMA volatility above a longer equal-weighted estimate says turbulence is recent and building; crossing back below marks the decay phase.
4. Watch compressions: an EWMA line grinding to multi-month lows carries the same message as tightening [BandWidth](https://www.luxalgo.com/library/concept/bandwidth/) or a maturing [volatility contraction pattern](https://www.luxalgo.com/library/concept/volatility-contraction-pattern/): quiet that eventually gives way.
5. Level-check against history: express the reading as a [volatility percentile](https://www.luxalgo.com/library/concept/volatility-percentile-rank/) of its own past before calling it high or low; raw values do not compare across instruments.

## How it's calculated

An exponentially weighted estimate of return variance in which the newest squared return carries the most weight and older ones decay geometrically.

```
r_t = ln(P_t / P_{t-1})
σ_t^2 = λ × σ_{t-1}^2 + (1 - λ) × r_t^2
σ_t = sqrt(σ_t^2)
Weight form: σ_t^2 ≈ (1 - λ) × Σ λ^i × r_{t-i}^2 over i = 0..t-1
Annualized: σ_ann = σ_t × sqrt(A)

  P_t: close price at bar t
  r_t: one-bar log return
  t: bar index
  ln(): natural logarithm
  λ: decay factor, 0 < λ < 1 (RiskMetrics default 0.94 for daily data, 0.97 for monthly)
  σ_t^2: EWMA variance estimate at bar t
  σ_t: EWMA volatility per bar
  i: lookback offset in bars
  σ_ann: annualized volatility
  A: bars per year (252 for daily bars)
```

RiskMetrics popularized the recursion with λ = 0.94 for daily data, giving an effective memory of roughly 1 / (1 - λ) bars (about 17 at 0.94).

It assumes zero mean returns and is seeded with a sample variance over an initial window, whose influence decays by the factor λ each bar.

EWMA is GARCH(1,1) without the long-run variance term, so estimates react quickly to shocks but do not mean revert.

## How traders use it

- As the volatility input for risk work: volatility-targeted sizing, value-at-risk style estimates, and volatility-scaled stops benefit from an estimate that updates smoothly every bar.
- As an adaptive width for bands and filters: an [envelope](https://www.luxalgo.com/library/concept/envelope/) built on EWMA variance widens quickly after shocks and tightens as calm returns, without the step changes a fixed rolling window produces.
- As a freshness read: EWMA volatility above a slower equal-weighted estimate says turbulence is recent and building; below it, decaying.
- As a normalizer: dividing returns or indicator readings by EWMA volatility puts instruments and eras on one scale, stabilizing signals otherwise dominated by the most volatile asset.
- As a stop and target scale: multiples of EWMA sigma play the same role as ATR multiples, and bands built from either, such as [ATR bands](https://www.luxalgo.com/library/concept/atr-bands/), often frame similar levels.

## EWMA Volatility vs Other Volatility Measures

- **Realized Volatility** (https://www.luxalgo.com/library/concept/realized-volatility/): Classic realized volatility weights every return in the window equally and forgets each one abruptly at the cutoff. EWMA swaps the hard window for geometric decay, trading a transparent lookback for smoother behavior.
- **ATR** (https://www.luxalgo.com/library/concept/atr/): ATR averages true ranges, so it is denominated in price units, includes gaps and intrabar range, and ignores the statistics of returns. EWMA volatility works on squared returns, the natural input for percentage-based and risk-model uses.
- **Bollinger Bands** (https://www.luxalgo.com/library/concept/bollinger-bands/): Bollinger Bands apply a fixed-window standard deviation of price around a moving average. EWMA volatility measures return variability with decaying weights, and bands scaled by it adapt faster after shocks without window artifacts.

## FAQ

### What lambda should I use for EWMA volatility?

RiskMetrics' classic values are 0.94 for daily returns and 0.97 for monthly, and most implementations default near those. Higher lambda decays slower, giving a smoother, steadier estimate; lower lambda tracks shocks faster at the cost of noise. There is no universally correct value: it is a responsiveness-versus-stability trade, so match it to your holding horizon.

### How is EWMA volatility different from GARCH?

EWMA is the special case of GARCH(1,1) with the persistence terms summing to one and no constant, so there is no long-run variance to revert toward. GARCH must be fitted but forecasts volatility decaying back to its unconditional level; EWMA needs no estimation and forecasts a flat line at today's value, which makes it the simpler choice for bar-by-bar chart calculations.

### What is the half-life of an EWMA volatility estimate?

It follows from lambda: the weight on old data halves every ln(0.5)/ln(lambda) periods, about 11 trading days at 0.94 and about 23 at 0.97. Half-life is often a more intuitive dial than lambda itself, and some practitioners parameterize the estimator that way.

### Is EWMA volatility better than ATR for setting stops?

Neither dominates. ATR includes gaps and intrabar range and thinks in price units, suiting instruments that gap and stops set at chart distances. EWMA reacts to close-to-close returns with smooth decay and suits statistical sizing. Consistency in applying one method matters more than the choice.

### How do you annualize EWMA volatility?

Multiply the per-period volatility by the square root of periods per year: conventionally 252 trading days for traditional markets, or 365 for markets that trade every day. Because the forecast is flat, the same figure stands in for any horizon, convenient but also the model's main simplification.

### Why does EWMA volatility assume a zero mean return?

At daily and intraday horizons the average return is tiny relative to its variability, and estimating it adds noise that hurts the variance estimate more than ignoring it. RiskMetrics made the zero-mean form standard and most implementations keep it. For long horizons or strongly trending series it is worth revisiting.

## Implementations in the Library

- EWMA Volatility (LuxAlgo): https://www.luxalgo.com/library/indicator/ewma-volatility/

## Related concepts

- Volatility Estimators: https://www.luxalgo.com/library/concept/volatility-estimators/
- Close-to-close Historical Volatility: https://www.luxalgo.com/library/concept/close-to-close-historical-volatility/
- Parkinson Estimator: https://www.luxalgo.com/library/concept/parkinson-estimator/
- Garman-Klass Estimator: https://www.luxalgo.com/library/concept/garman-klass-estimator/
- Rogers-Satchell Estimator: https://www.luxalgo.com/library/concept/rogers-satchell-estimator/
- Yang-Zhang Estimator: https://www.luxalgo.com/library/concept/yang-zhang-estimator/
- Garman-Klass–Yang-Zhang Hybrid: https://www.luxalgo.com/library/concept/garman-klass-yang-zhang-hybrid/
- Jump Detection: https://www.luxalgo.com/library/concept/jump-detection/
- Volatility Signature Plot: https://www.luxalgo.com/library/concept/volatility-signature-plot/
- Volatility of Volatility: https://www.luxalgo.com/library/concept/volatility-of-volatility/

---

Source: https://www.luxalgo.com/library/concept/ewma-volatility/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/