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
- In flat, low-volatility stretches the phase estimate gets noisy and the lines can wobble; the standard 0.5 / 0.05 limits clamp the damage but don't eliminate it.
- It is a trend filter, not a complete system — it says nothing about position sizing or where the trend goes next.
- Implementations vary. The canonical Ehlers recursion (used here) is causal — bar t uses only data through bar t — but simplified “adaptive” variants circulating online often pin alpha near the floor, quietly degrading into a slow fixed EMA.