Indicator library · Trend

KAMA, Kaufman's Adaptive Moving Average

A moving average that changes its own responsiveness: fast while movement is efficient, deliberately slow while it is noise. The adaptation does not remove lag; it relocates it to where it costs less.

The calculation

  1. Compute the efficiency ratio over n bars, the net move divided by the total distance travelled, bounded between 0 and 1.
  2. Map it onto a smoothing constant: SC = (ER × (fast − slow) + slow)², where fast and slow are the exponential constants for 2 and 30 periods.
  3. Apply it like any exponential average: KAMA = previous + SC × (close − previous).

The squaring in step two is the part worth pausing on. It pulls the constant towards the slow end unless efficiency is genuinely high, on this page’s series the constant runs from 0.444 in the clean advance down to 0.018 in the zig-zag, a factor of roughly 25. KAMA is conservative by construction and spends most of its life much closer to a slow average than to a fast one.

KAMA through an efficient advance and a zig-zagThe upper panel shows a price series advancing in a straight line for fifteen bars and then zig-zagging upward for fifteen more. The lower panel shows KAMA, which tracks closely behind price during the straight advance and then flattens markedly during the zig-zag, rising only slowly while price swings above and below it.CLOSEKAMA61.14chop beginsKAMA through an efficient advance and a zig-zagThe upper panel shows a price series advancing in a straight line for fifteen bars and then zig-zagging upward for fifteen more. The lower panel shows KAMA, which tracks closely behind price during the straight advance and then flattens markedly during the zig-zag, rising only slowly while price swings above and below it.CLOSEKAMA61.14chop begins
Fig. 1: schematicComputed at build time with a 10-bar efficiency ratio and constants from 2 and 30 periods. In the efficient advance KAMA sits 0.87 points behind the close where a plain 10-period exponential average sits 3.15 behind. Then the character changes: through the zig-zag the line flattens and stops chasing the swings, which is the entire product, an average that declines to produce crossings when there is no trend to follow.

What the adaptation actually buys

The moving average page sets out the one axis every fixed-period average sits on: short windows turn early and often, long windows turn late and rarely, and no setting is both. An adaptive average does not escape that axis. What it does is move along it automatically, according to a measurement rather than a guess.

The same market, three averages
ConditionFixed EMAKAMA
Efficient trendFollows at its set rate, some distance behind.Uses the fast constant and tracks closer.
Range or chopKeeps chasing every swing; crossings arrive constantly.Flattens deliberately. Few crossings, and price wanders across it.
The turn itselfLate by its period.Later, the turn looks inefficient, so the average slows just as it begins.

That third row is the honest cost and it is rarely stated. A reversal starts with exactly the signature KAMA is built to ignore: progress stalls, swings widen, efficiency collapses. The average therefore becomes least responsive at the moment a genuine turn is developing, and only speeds up once the new direction has established itself. Anyone who wants an average that is both quiet in chop and quick at reversals is asking for something no causal filter can provide.

Three parameters instead of one

A fixed average has one setting. KAMA has three, the ratio window and the two bounds, and they do not act independently.

The window decides how quickly the average is allowed to change character; a short one lets it switch on a few bars of chop, a long one keeps it committed to a regime. The fast bound caps how responsive it can ever be, and setting it near a 2-period constant means that in a strong trend KAMA is effectively tracking price. The slow bound decides how flat it goes in noise, which is what the whole design is for.

Because they interact, the temptation to search all three on past data is stronger here than with a simple average, and the resulting overfit is correspondingly worse. The defensible approach is Kaufman’s defaults unless a specific behaviour is missing, and a stated reason when one is changed.

Reading the line rather than the crossings

Most averages are used for crossings. KAMA rewards a different reading, because its most informative property is its slope rather than its position: a flat KAMA is an explicit statement that recent movement has been inefficient, and that is information a fixed-period average cannot give you at all.

Used that way it becomes a regime filter with a line attached (trade trend rules while the average is visibly rising or falling, stand aside while it is flat), which is the same job ADX is usually given, done by something that also doubles as a trailing reference. The two agree often enough that running both is mostly duplication.

Where it misleads

Known failure modes
SituationWhat goes wrong
ReversalsA turn begins as inefficient movement, so the average slows exactly when it would need to be fast.
Read as lag-freeAdaptation relocates lag; it does not remove it. In chop the line is deliberately very late.
Three parameters searchedThe window and the two bounds interact, so grid-searching them overfits faster than tuning a single period.
GapsA gap looks efficient, one large step in the numerator and the denominator, so the average speeds up on a corporate action or an earnings jump.
Very quiet instrumentsA tiny denominator in the ratio makes efficiency jump on rounding, and the average changes character for no reason.
Crossings traded in chopThe flat line still gets crossed by price wandering. Fewer crossings is not no crossings.

What volume adds

KAMA adapts to the shape of the price path and knows nothing about participation. An efficient advance on the thinnest volume of the quarter is efficient in exactly the sense the ratio measures, price met nothing on the way, and the average speeds up to track it.

That is the situation where the pairing pays. Efficiency produced by an absence of sellers looks identical, in the closes, to efficiency produced by persistent demand, and only one of the two survives the arrival of a real order. Reading the volume beside the average costs nothing and separates them.

Frequently asked questions

What does KAMA adapt to?

The efficiency ratio, the net move over n bars divided by the total distance travelled. When movement is efficient the average uses a fast smoothing constant and tracks price closely; when the same net move is being made by zig-zagging, it uses a slow constant and barely moves. So the responsiveness is set by the character of recent movement rather than by a period you chose in advance.

How is the smoothing constant derived?

Kaufman maps the efficiency ratio onto the range between a fast and a slow exponential constant — conventionally the constants for 2 and 30 periods — then squares the result. The squaring matters: it pushes the constant towards the slow end unless efficiency is genuinely high, so KAMA is conservative by design and spends most of its life closer to a slow average than to a fast one.

What are the standard parameters?

A 10-period efficiency ratio with fast and slow constants taken from 2 and 30 periods. Three numbers instead of one is the price of adaptation, and it is worth noting that they interact: lengthening the ratio window changes how quickly the average is allowed to switch character, which is a different effect from changing either constant.

Does adaptation remove the lag?

No. It moves it to where it costs less. In an efficient trend KAMA tracks close behind price, so the lag in the situation that matters most is small. In choppy conditions it deliberately becomes very slow, which is not a reduction in lag but a decision to accept a great deal of it in exchange for not being whipsawed. Anything claiming to remove lag from an average is claiming to know the future.

How does it compare with a plain EMA?

On a clean trend they behave similarly, with KAMA usually a little closer to price. In a range they diverge sharply: the EMA continues to follow every swing at its fixed rate while KAMA flattens out. That flatness is the whole product, a moving average that stops producing crossings when there is no trend to follow.

Is it better than TEMA or a displaced average?

They are different trades rather than a ranking. TEMA reduces lag by extrapolating, which makes it faster and prone to overshoot at turns. KAMA reduces whipsaw by becoming slow, which makes it late at turns and quiet in ranges. A displaced average simply shifts a line sideways and changes nothing about its behaviour. Which one is appropriate depends on whether false signals or late signals cost you more.

What does it do at a genuine reversal?

Arrives late, for a specific and unavoidable reason. A reversal begins with movement that looks inefficient (price stops making progress, swings widen), so the efficiency ratio falls and the average slows down at exactly the moment a turn is under way. It catches up once the new direction becomes efficient. This is the cost side of the design and it cannot be tuned away without giving up the whipsaw protection.

Can the efficiency ratio be replaced with something else?

Yes, and several published variants do, using ADX, the ratio of two volatility measures, or a correlation with time as the adaptation signal. They all share the same architecture: a fixed pair of bounds and a measure that decides where between them the smoothing sits. The specific measure matters less than whether the adaptation is bounded, because an unbounded one can make the average faster than the data supports.