Concept

ALMA

ALMA, also known as Arnaud Legoux moving average, is a Trend concept. A reference entry: the Library explains it rather than implements it.

Arnaud Legoux

What is ALMA?

ALMA (the Arnaud Legoux Moving Average) is a windowed weighted average introduced by Arnaud Legoux and Dimitrios Kouzis-Loukas in 2009. Its weights follow a Gaussian bell curve laid across the lookback window, with the bell's peak shifted toward the most recent bars. That shape is the whole idea: where a WMA or EMA weights bars in one monotonic decay, ALMA concentrates weight around a chosen point in the window and tapers off on both sides, filtering high-frequency noise while keeping lag modest.

Two parameters shape the bell. Offset (0 to 1, commonly 0.85) slides the peak: toward 1 the average leans on the newest bars and turns faster, toward 0.5 it is smoother but laggier. Sigma (commonly 6) controls the bell's width relative to the window: larger sigma narrows the bell around the peak, smaller sigma spreads weight more evenly across the window. Because ALMA is a finite-window filter with no recursion, it belongs to the windowed FIR family of smoothers: its output depends only on the last N bars, with no infinite tail of old data as in an EMA.

Legoux and Kouzis-Loukas published the average as a practical answer to the oldest complaint about smoothing: filters smooth enough to ignore noise are usually too slow to catch turns. Sliding a Gaussian window off-center was their compromise, and it aged well; ALMA ships as a built-in on major charting platforms and appears as a smoothing option inside other indicators. Against extrapolative low-lag designs such as the Hull MA, which combines weighted averages in a way that can overshoot at turns, ALMA's off-center bell is typically the gentler route to lag reduction. Note what it does not do: the window length is fixed rather than condition-driven, so unlike an adaptive-lookback MA it does not speed up or slow down with volatility; responsiveness is set by where the bell sits, not by market state.

How to calculate ALMA

ALMA takes three inputs: window length N, offset (default 0.85), and sigma (default 6).

  1. 1Locate the peak: m = offset × (N - 1), where the bar index i runs from 0 (oldest bar in the window) to N - 1 (newest).
  2. 2Set the bell's width: s = N / sigma.
  3. 3Weight each bar: w(i) = exp(-(i - m)² / (2 × s²)), so bars near the peak dominate and bars far from it contribute little.
  4. 4Output the normalized weighted sum: multiply each of the N prices by its weight, sum the products, and divide by the sum of the weights.
  5. 5Sanity-check the shape: offset 0.5 centers the bell for maximum smoothing, while values approaching 1 push the peak onto the newest bars so the output hugs recent price.

How it's calculated

A Gaussian-weighted moving average with the weight peak shifted toward recent bars to reduce lag while staying smooth.

m=offset×(n1)m = \text{offset} \times (n - 1)
s=n/σs = n / \sigma
wi=exp((im)22×s2) for i=0 to n1w_i = \exp\left(-\frac{(i - m)^2}{2 \times s^2}\right)\text{ for }i = 0\text{ to }n - 1
ALMAt=i=0n1wi×Ptn+1+ii=0n1wi\operatorname{ALMA}_t = \frac{\sum_{i=0}^{n-1} w_i \times P_{t-n+1+i}}{\sum_{i=0}^{n-1} w_i}
P_(t-n+1+i): source price of the bar at window position i (commonly close)
n: window length (default 9)
offset: peak position between 0 and 1 (default 0.85)
sigma: width control of the weight curve (default 6)
m: window position where the weights peak
s: standard deviation of the Gaussian weight curve
w_i: weight applied at window position i
i: position inside the window, 0 is the oldest bar
t: current bar index
ALMA_t: Arnaud Legoux moving average at bar t
exp(): the exponential function

Defaults follow Arnaud Legoux's original release: n = 9, offset = 0.85, sigma = 6.

Offset near 1 tracks price closely with little lag; lower offset smooths more.

Some implementations round m down to an integer before computing the weights.

How traders use it

  • As a general-purpose overlay smoother sitting between the classic extremes: smoother than an EMA of comparable lag, more responsive than an SMA of comparable smoothness, and tunable in both directions.
  • In crossover and price-cross logic, where the offset and sigma dials let the same setup be re-tuned per market instead of switching moving-average types.
  • As the centerline of envelopes and bands, where its stability keeps the band structure from twitching on every bar.
  • As a smoother for non-price series (oscillator outputs, volume, spreads), where Gaussian-shaped weighting is a standard noise-reduction choice borrowed from signal processing.
  • As a steadier slope gate: the Gaussian window suppresses bar-to-bar jitter, so ALMA's slope flips sign less often than a comparably fast EMA's, a reasonable engine for an MA slope filter or a simple trend regime label.

ALMA vs similar averages

EMA: An EMA is recursive, so every past bar contributes a decaying amount forever and one length setting fixes its response. ALMA uses a finite window with Gaussian weights, and offset and sigma tune the smoothness-lag balance independently of length.

SMA: An SMA weights every bar equally, which maximizes smoothing for the window but reacts late and drops old bars abruptly. ALMA reshapes the same window into a bell, trading a little smoothness for earlier response; push sigma low enough and its weights flatten back toward an SMA's.

Ehlers SuperSmoother: Both borrow from signal processing, but the SuperSmoother is a recursive filter designed in the frequency domain to attenuate short wavelengths, while ALMA is a plain weighted sum over a window. One is specified in cycle terms, the other by where you park the weight bell.

Concept family

Trend

100 concepts mapped · 100 in the Library

ALMA FAQ

What do the offset and sigma settings on ALMA control?

Offset positions the peak of the weight bell inside the window: values near 1 emphasize the newest bars (faster, less smooth), values toward 0.5 pull the peak back (smoother, laggier). Sigma sets the bell's width relative to window length: larger sigma concentrates weight tightly around the peak, smaller sigma spreads it out. The published defaults are 0.85 and 6.

Is ALMA better than an EMA or SMA?

It is not a strict upgrade; it is a different weighting scheme with more control. For a given amount of smoothing ALMA often shows less lag than an SMA and less noise than an EMA, but it still lags real turns and still whipsaws in ranges. The extra parameters also add tuning risk: more dials, more ways to curve-fit.

Does ALMA repaint?

A standard ALMA does not: it is computed from the current bar and the previous N - 1 bars only, and once a bar closes its value is fixed. Like any indicator, the value on the live bar moves until that bar closes. Only centered or forward-shifted variants that reference future bars repaint, a repaint-safety concern specific to those variants rather than to ALMA itself.

Is ALMA the same as a Gaussian filter?

It uses a Gaussian curve for its weights, but the name Gaussian filter usually refers to recursive smoothers engineered for a Gaussian-like frequency response, as in the Ehlers designs. Output character is similar; construction differs. ALMA exposes a finite window with offset and sigma, while a recursive Gaussian filter exposes a period or pole count and carries state from bar to bar.

What ALMA length should I use?

Treat length like any moving-average length: short windows track swings and whipsaw more, long windows define trend and lag more. Most users keep offset and sigma at the defaults and tune only the window, carrying over familiar 9, 21, or 50 bar conventions. Whatever you pick, validate out of sample; three parameters give ALMA more ways to fit the past than a one-knob average.

Can ALMA act as dynamic support and resistance?

In a steady trend, pullbacks often stabilize around a well-chosen ALMA just as they do around popular EMAs, so it can anchor dynamic S/R via MA tactics. The mechanism is trend persistence plus shared attention rather than the Gaussian math, so treat holds as evidence the trend is intact, not a floor the formula enforces.

Turn ALMA into a trading strategy.

Describe your ALMA idea to Quant. It builds the strategy with you and backtests it on real data.