Learn / Ehlers MAMA & FAMA, explained

Ehlers MAMA & FAMA, explained

Every fixed moving average forces the same bad trade: fast enough to catch turns means whipsaw; slow enough to avoid whipsaw means late. MAMA's answer is to stop fixing the speed.

The idea

John Ehlers — an engineer who spent a career applying signal processing to markets — published the MESA Adaptive Moving Average (MAMA) in 2001. It is an exponential moving average whose smoothing factor (alpha) is recomputed every bar from the market's currently dominant cycle. When price is turning quickly, alpha rises toward a fast limit (typically 0.5) and the average hugs price; when a trend is grinding along, alpha falls toward a slow limit (typically 0.05) and the average flattens out and ignores noise.

The cycle measurement comes from DSP: a Hilbert transform decomposes recent price into in-phase and quadrature components, and a homodyne discriminator extracts the instantaneous phase advance per bar. Big phase advance = short cycle = speed up; small phase advance = long cycle = slow down. Alpha is simply the fast limit divided by the per-bar phase change, clamped between the two limits.

FAMA — the following line

FAMA (Following Adaptive Moving Average) is an EMA of MAMA computed at half of MAMA's alpha each bar. It trails MAMA with a lag that adapts in the same way, which produces a useful geometry: in an uptrend FAMA rides below price like a dynamic support floor, and in a downtrend it sits above like resistance. Because both lines slow down together mid-trend, MAMA/FAMA crossovers — or the simpler test, price closing across FAMA — happen far less often than fixed-MA crosses, but when they happen they tend to mean something.

Using it as a trend gate

The cleanest deployment is binary: spot above FAMA = trend intact; spot below FAMA = trend broken. Compared to a fixed 50- or 200-period average, the adaptive line concedes less of a crash before signaling (it speeds up as the turn develops) yet whipsaws less in a grinding bull (it slows down when the cycle lengthens). It makes a better exit discipline than entry trigger — trend breaks are its specialty, not bottom-ticking reversals.

A practitioner's warning: feed it the right series

If you use MAMA/FAMA to manage a position in a leveraged ETF, compute the filter on the unleveraged index — never on the leveraged product itself. Daily-compounded 2x/3x ETFs decay against their index over multi-day horizons, so a FAMA computed on the leveraged series drifts away from where the underlying trend actually sits and fires exits on decay artifacts rather than real trend breaks. Compute on the index; act on the product.

Caveats

See MAMA/FAMA on SPY, live
Canonical Ehlers engine — 10y weekly or 1y daily
Open dashboard

FAQ

What's the difference between MAMA and a normal EMA?

An EMA's smoothing factor is a constant you choose once. MAMA recomputes it every bar from the measured dominant cycle, so the same indicator is fast at turns and slow mid-trend.

What do the fast and slow limits (0.5, 0.05) do?

They clamp the per-bar alpha. 0.5 caps how aggressively MAMA can chase price during short cycles; 0.05 floors it so the line never fully stalls during long trends.

Why compute the filter on QQQ or SPY instead of a 3x ETF?

Leveraged ETFs compound daily and decay versus their index over multi-day windows. A filter computed on the leveraged series inherits that decay and signals trend breaks that never happened in the underlying.

Related reading