Kaufman Adaptive Moving Average (KAMA): The Noise-Filtering Trend Indicator That Slows Down When Markets Chop and Speeds Up When They Trend
Overview #
@vmodus (NexusFi, 2020)
Every futures trader has been there. You put a 10-period EMA on your chart, it fires a long signal during lunch, you enter — and the market immediately chops sideways for an hour before reversing against you. The EMA crossed because price moved a few ticks up. Not because the market was actually trending.
The Kaufman Adaptive Moving Average solves exactly this problem. Instead of responding to every tick regardless of whether the market is going somewhere, KAMA measures how efficiently price is moving and adjusts its own sensitivity so. In a strong trend, it behaves like a fast moving average, tracking price with minimal lag. In choppy consolidation, it nearly flatlines, refusing to react to noise that would send a standard EMA or SMA firing in random directions.
Perry Kaufman developed KAMA in 1995 and published the methodology in his book Trading Systems and Methods. The core insight was elegant: before adjusting a moving average, first ask whether the market is actually worth following. If prices are just bouncing back and forth with no net progress, a trend-following indicator should stay put. Only when price is genuinely moving — when the net distance traveled is a significant fraction of the total path — should the indicator track closely.
That measurement, which Kaufman called the Efficiency Ratio, is the engine behind everything KAMA does. Understanding it deeply is understanding the indicator completely.
The Efficiency Ratio: KAMA's Core Innovation #
The Efficiency Ratio (ER) answers a deceptively simple question: of all the ground the market covered during the lookback period, how much of it contributed to net directional movement?
The formula is:
ER = |Close₍ₜ₎ − Close₍ₜ₋ₙ₎| ÷ Σ|Close₍ᵢ₎ − Close₍ᵢ₋₁₎|
where n is the lookback period (default 10), the numerator is the absolute net price change over n bars, and the denominator is the sum of all absolute bar-to-bar price changes over the same period.
Walk through what this produces in practice. Suppose ES trades 50 points net upward over 10 bars, and the total back-and-forth path traveled was 60 points. ER = 50/60 = 0.83. The market was 83% efficient — most of the movement was directional. KAMA should respond quickly to this.
Now suppose ES ends those 10 bars at the same price it started, but meandered 60 points in the process. ER = 0/60 = 0.00. The market was zero percent efficient. KAMA should barely move at all.
This is radically different from what a standard EMA or SMA sees. Both of those respond to the most recent close versus the previous value — they measure displacement from the average, not directional efficiency. During consolidation, price constantly oscillates around the average and each oscillation moves the indicator, generating false signals. KAMA ignores those oscillations when ER is low.
The ER ranges from 0 to 1. An ER above 0.5 generally indicates a trending environment worth following. Below 0.3, the market is providing little directional signal and KAMA throttles down its responsiveness to near zero.
One edge case to handle in implementation: if all 10 bars have the same close (denominator = 0), define ER = 0 rather than dividing by zero. This happens occasionally with limit-up/limit-down situations in commodities or during extreme illiquidity.
Community member @Fat Tails, a prolific NinjaTrader indicator developer on NexusFi, described the Efficiency Ratio as measuring "fractal efficiency" — the signal-to-noise ratio of price movement. In the thread Kaufman Efficiency Study, he documented how the ER formula maps to NinjaScript, noting that "The trend is exhausted when the ADX goes below 25 or the Kaufman Efficiency falls." The ER independently confirms the same market state as ADX but through directional efficiency rather than average directional movement.
The Complete KAMA Formula: Three Steps to Adaptive Smoothing #
With the Efficiency Ratio calculated, KAMA applies it in three steps:
Step 1: Define the fast and slow smoothing constants
KAMA blends between two exponential smoothing constants based on how directional the market is. The defaults are a fast period of 2 and a slow period of 30:
SC_fast = 2 ÷ (fast_period + 1) = 2 ÷ (2 + 1) = 0.6667
SC_slow = 2 ÷ (slow_period + 1) = 2 ÷ (30 + 1) = 0.0645
These look like EMA smoothing constants because they are — when ER is 1 (perfect trend), KAMA behaves like a 2-period EMA. When ER is 0 (pure chop), KAMA behaves like a 30-period EMA.
Step 2: Calculate the adaptive smoothing constant
SC = [ER × (SC_fast − SC_slow) + SC_slow]²
Two things make this formula important. First, the bracketed term linearly blends between fast and slow based on ER. Second, the entire expression is squared. This is Kaufman's key design choice. Squaring compresses the effective range of SC nonlinearly.
In a trending market (ER = 0.8): SC = [0.8 × (0.6667 − 0.0645) + 0.0645]² = [0.546]² = 0.298
In a choppy market (ER = 0.1): SC = [0.1 × (0.6667 − 0.0645) + 0.0645]² = [0.125]² = 0.016
The squaring means even a moderate ER drop cuts SC dramatically. An ER of 0.5 produces SC = [0.35]² = 0.123, which already cuts responsiveness by more than half versus a trending ER of 0.8. This aggressive compression is what makes KAMA so effective at filtering consolidation noise.
Step 3: Update the KAMA value
KAMA₍ₜ₎ = KAMA₍ₜ₋₁₎ + SC × (Price₍ₜ₎ − KAMA₍ₜ₋₁₎)
This is identical to the EMA update formula, just with an adaptive SC instead of a fixed smoothing constant. When SC is large (trending), KAMA moves rapidly toward the current price. When SC is tiny (choppy), KAMA barely budges from its previous value.
Initialization: Seed the first KAMA value as the first close price. The first n bars will produce somewhat unreliable values while the ER stabilizes — build in a warm-up period of n+10 bars before trusting signals.
Default Parameters and What They Actually Mean #
The standard KAMA configuration is n=10, fast=2, slow=30. These defaults appear in virtually every trading platform's implementation, and they're remarkably strong across instruments and timeframes.
The lookback n=10 determines how many bars the ER measures directional efficiency over. A shorter lookback makes ER more reactive — it responds faster to regime changes but is also more easily fooled by short bursts of directional movement in otherwise choppy markets. A longer lookback creates a more stable ER that requires sustained directional movement before KAMA accelerates.
The fast period of 2 sets the upper bound on responsiveness. When ER approaches 1, KAMA behaves like a 2-period EMA, which is extremely reactive. Some traders prefer fast=3 or fast=4 to slightly reduce the maximum responsiveness and smooth out entries.
The slow period of 30 sets the minimum responsiveness. In pure chop, KAMA behaves like a 30-period EMA. Increasing this to 40 or 50 makes KAMA even more stubborn in sideways markets, though it also slows the initial reaction when a trend begins.
The combination of n=10, fast=2, slow=30 has been tested across decades of futures market data. It's a genuine starting point, not just a generic default. That said, the Market-Specific Parameter Recommendations section below covers instrument-specific calibration.
How KAMA Adapts: Trending vs Choppy Markets #
The most intuitive way to understand KAMA's behavior is to watch the Smoothing Constant (SC) over time rather than the KAMA line itself. During a sustained trend, SC consistently runs between 0.20 and 0.40. During consolidation, SC collapses to 0.004--0.015. The ratio between a trending SC and a choppy SC is typically 30--40 times — a 39× difference in responsiveness between market regimes.
This matters practically because it means KAMA's effective "period" is not fixed. In a trend, KAMA behaves like a 3--5 period EMA. In consolidation, it behaves like a 60--100 period EMA. The indicator automatically makes itself slower when slowing down is the right call.
Compare this to a 10-period EMA. In a trend, the EMA tracks price with moderate lag — fine. In consolidation, the EMA continues updating at the same pace, crossing price from below when a bar or two pushes it higher, crossing from above when a couple of bars push it lower. Each of these crosses is an implied signal. None of them mean anything. The EMA doesn't know whether the cross came from a trending move or a random oscillation. KAMA does.
The practical result: KAMA in a 20-bar choppy range typically generates 0--2 directional changes (slope transitions). An EMA over the same period typically generates 6--12 directional changes. In futures trading where every entry has transaction costs and slippage, eliminating 80% of false directional signals is the difference between a profitable system and a losing one.
KAMA vs EMA, SMA, and HMA #
Each common moving average type has distinct failure modes in futures markets. Understanding these comparisons clarifies when KAMA is the right choice.
KAMA vs SMA: The Simple Moving Average adds equal weight to all n bars and has the highest lag of any common MA. In a trend, it lags price by roughly n/2 bars — a 10-period SMA lags by about 5 bars. In consolidation, it meanders around the range midpoint, continuously generating minor crossovers. SMA has no adaptive mechanism whatsoever. KAMA is almost universally superior for trend-following applications in futures.
KAMA vs EMA: The Exponential Moving Average reduces lag by weighting recent bars more heavily. The key EMA failure mode in futures is midday consolidation: after a strong morning move, the afternoon range typically sees the EMA produce 3--6 false directional changes as price chops around. KAMA flattens during this phase, giving zero false signals while the EMA fires on every minor oscillation.
KAMA vs HMA: The Hull Moving Average dramatically reduces lag by using a weighted moving average of differences. The HMA often leads price rather than lagging it, making it excellent for entries but dangerous in consolidation — it oscillates aggressively around the range. KAMA is slower in trending markets than HMA but dramatically more stable in ranges.
When to choose KAMA over alternatives: KAMA is the best choice when you need a trend regime filter that works in all market conditions without parameter switching. If you're designing a system that needs to be on or off based purely on market state, KAMA's ER gives you that signal built-in. If you're optimizing purely for trend entry timing and willing to accept more false signals, HMA's reduced lag may be superior for entry timing.
The one scenario where KAMA underperforms: sharp, violent regime changes. If the market gaps down 80 points on news and immediately starts trending lower, KAMA's ER needs n bars to fully reflect the new regime. For the first 10 bars after a major news event, KAMA will be too slow to reflect the new trend. This is a known limitation — KAMA measures historical directional efficiency, not future direction.
Trading Signals: What Actually Works #
Traders use KAMA three different ways, and they're not equally effective:
Raw crossovers (least effective): Price crossing above or below KAMA generates a signal. This works in trending environments but fails in consolidation — KAMA flattens enough to reduce false signals but doesn't eliminate them entirely. During strong sideways periods, price can oscillate through KAMA multiple times even though KAMA is nearly flat. Crossover systems backtested on KAMA show moderate improvement over EMA crossovers but still fail during range-bound phases.
Slope direction with persistence (intermediate): Use the sign of KAMA slope (KAMA₍ₜ₎ > KAMA₍ₜ₋₁₎) as the regime indicator. Bullish when KAMA rising; bearish when falling. Adding a persistence requirement — KAMA must hold its direction for 2--3 bars before you act — filters out brief reversals. Adding an ER threshold (ER > 0.3 before the signal is valid) reduces early regime entries. This approach works well as a regime filter for other entry systems.
Pullback entries (most effective, recommended): The professional KAMA strategy doesn't use KAMA for entry timing at all. It uses KAMA to define the regime, then waits for a pullback toward KAMA during a confirmed trend, and enters when price reclaims KAMA with volume and order flow confirmation.
Combining KAMA with Volume and Order Flow #
In isolation, KAMA tells you whether the market is trending and approximately where trend support/resistance lies. What it can't tell you is whether the current bar's order flow supports continued movement in the trend direction — and that's where it needs help.
VWAP as the value anchor: In intraday futures trading, VWAP establishes where fair value is for the session. A rising KAMA means trend direction; price above VWAP means the market is above value. When both conditions align — KAMA slope positive AND price above VWAP — you're trading with two independent frameworks saying the same thing. Their agreement substantially reduces false entries.
The specific dual-filter rule: Only take long positions when (1) KAMA slope has been positive for 3+ bars AND (2) current price is above the session VWAP. This combination typically eliminates the majority of false signals during the 11:30 AM--1:30 PM EST midday range period, when price often oscillates near VWAP while KAMA is flat or barely rising.
Delta and CVD confirmation: At the bar level, use cumulative volume delta (CVD) to confirm entries. A pullback that sees decreasing delta (selling pressure contracting) followed by a reclaim of KAMA with increasing positive delta (buyers stepping back in) is a much higher-probability entry than price simply crossing KAMA without delta confirmation.
KAMA for Day Trading: 5-Minute and 15-Minute Timeframes #
Day trading with KAMA on ES and NQ requires some session-specific adaptations beyond the standard parameters.
Start-of-session initialization: The first 10--15 bars of RTH should be treated with lower confidence while the ER stabilizes. Don't trade KAMA signals in the first 30 minutes unless other confluence is very strong.
Overnight inventory: The overnight Globex session often creates a price gap or drift that makes KAMA start the RTH session already displaced from previous-day's value. Check whether the gap is significant relative to the prior day's ATR before fading or following KAMA on the open. A 15-point ES gap on a 30-ATR day is meaningful; a 2-point gap is noise.
Midday KAMA behavior: Between 11:30 AM and 1:30 PM EST, ES and NQ regularly consolidate. KAMA typically flattens during this period, which is correct behavior — don't force signals during midday chop. The absence of a KAMA signal is itself information: the market is in equilibrium and no directional trade is warranted.
Session-specific parameters for ES/NQ:
- Morning session (9:30--11:30 AM): Default n=10 works well, trends are usually cleanest
- Midday (11:30 AM--1:30 PM): Consider n=14--16 if you must trade, to reduce sensitivity
- Afternoon (1:30--4:00 PM): n=10 again, but watch for regime change around 2:00 PM with any Fed/macro catalysts
RTH-only filtering: Apply KAMA only to RTH bars and reset at each session open. The overnight session has different liquidity characteristics — spreads are wider, participation is thinner, and moves that look like trends on a continuous chart often reverse at RTH open.
KAMA for Swing Trading: 4H and Daily Timeframes #
Swing trading with KAMA requires longer lookback periods to match the timeframe being analyzed. On a 4-hour chart, a 10-period KAMA responds to 40 hours of price action — roughly 5 trading days. That's similar in market-time to a 10-period KAMA on a 1-hour chart in terms of signal frequency, but it filters much more noise because each 4-hour bar represents a significant chunk of market activity.
Recommended swing parameters:
- ES/NQ (4H chart): n=20, fast=2, slow=30
- ES/NQ (Daily chart): n=20 or n=25, fast=2, slow=30
- CL/GC (4H chart): n=18--22, fast=2, slow=35 (higher slow reduces sensitivity to overnight sessions)
- ZB/ZN (4H chart): n=20, fast=2, slow=40 (bond futures have different noise characteristics)
Multi-timeframe KAMA framework: The most strong swing approach uses two KAMA periods:
- Higher timeframe (Daily or 4H): Defines the primary trend regime -- only trade in this direction
- Lower timeframe (4H or 1H): Defines entry timing -- enter when lower TF KAMA aligns with higher TF direction
When both KAMAs are sloping the same direction, you have trend confirmation across two independent timeframes. When they diverge, stay flat. This filters the majority of false swing entries that come from reacting to counter-trend moves on the daily while the weekly is still trending against you.
Market-Specific Parameter Recommendations #
These are research-based calibrations for the major futures contracts. Use them as starting points for your own walk-forward optimization:
E-mini S&P 500 (ES):
- Day trading (5m): n=10, fast=2, slow=30 -- the default is well-calibrated for ES's microstructure
- Swing (4H): n=20, fast=2, slow=30
- Key behavior: ES KAMA tends to flatten heavily during the 11:30--1:30 EST midday period, which is correct
E-mini Nasdaq-100 (NQ):
- Day trading (5m): n=12--15, fast=2, slow=30 -- slightly larger n because NQ is noisier than ES
- Swing (4H): n=20--25, fast=2, slow=30
- Key behavior: NQ has higher intraday volatility; a slightly larger lookback helps ER stay stable
Crude Oil (CL):
- Day trading (5m): n=12--16, fast=2, slow=35
- Swing (4H): n=18--22, fast=2, slow=35
- Key behavior: CL trends strongly during specific events and ranges tightly otherwise; KAMA's adaptivity is especially valuable here
Gold (GC):
- Day trading (5m): n=12, fast=2, slow=30
- Swing (Daily): n=20, fast=2, slow=30
- Key behavior: GC often exhibits smooth multi-session trends with clean KAMA performance on daily charts
Optimizing responsibly: If you test KAMA parameters on historical data, use a proper walk-forward methodology. Split your historical data: 70% for parameter selection, 30% for validation. Include realistic commissions ($3--5 per side per contract) and slippage (0.25--0.5 ticks depending on market hours). Never improve all three parameters simultaneously — keep fast=2 and slow=30 fixed and only tune n.
Divergence Signals: Using KAMA Without an Oscillator #
[[FIGURE]]
[[FIGURE]]
KAMA isn't an oscillator, so it doesn't generate traditional divergence signals the way RSI or MACD does. But there's a useful divergence concept: when price is making new highs or lows but KAMA's rate of change is decelerating (the KAMA slope is decreasing in absolute value), the trend is losing momentum.
This happens because a decelerating KAMA reflects a declining ER — the market is covering less net ground per bar even though price is still moving directionally. When the ER declines from 0.7 to 0.4 while price continues making new highs, the market is becoming less efficient even as it continues higher. This is often a precursor to consolidation.
How to use this in practice:
- Watch for price making 3+ consecutive new highs while KAMA slope decreases on each swing
- Combine with CVD divergence: price making higher highs while CVD fails to make higher highs
- Use to tighten stops or reduce position size, not as a reversal entry trigger
- The strongest version includes declining volume alongside decelerating KAMA slope
This form of divergence is more subtle than RSI divergence but tends to be higher-quality because it specifically measures the decline in directional efficiency — the same measurement KAMA is built on.
Common Mistakes and How to Avoid Them #
Mistake 1: Trading every KAMA slope change. Each bar that KAMA slope flips direction is not a trading signal. KAMA can flip direction multiple times in consolidation even as it remains relatively flat. Use slope changes only after persistence (2--3 bar confirmation) and ER thresholding.
Mistake 2: Ignoring session breaks. If you're running KAMA on continuous contracts across overnight sessions, a major gap at the RTH open creates an instant ER spike because the first bar covers significant ground. This makes KAMA temporarily hyper-responsive at the open. Filter out the first 30 minutes of signals after session transitions.
Mistake 3: Using KAMA as the only filter. KAMA tells you the market might be trending. It doesn't tell you the trend will continue past your entry. Always combine with a level-based entry (pullback to support/resistance, VWAP, volume profile) and order flow confirmation before executing.
Mistake 4: Over-optimizing parameters by instrument. It's tempting to find the "optimal" n for each instrument and each timeframe you trade. The risk is that historical optimization produces parameters that are overfit to the training period. A single set of strong parameters (n=10, fast=2, slow=30) used consistently will outperform a highly optimized but fragile parameter set over new data.
Backtesting KAMA Without Overfitting #
If you're building an automated system around KAMA, several implementation details much affect out-of-sample performance:
Price input: Use closing prices, not typical price ((H+L+C)/3). The ER formula measures the path of a single price series — mixing closing prices for the net change with typical prices for the bar-to-bar differences creates inconsistency.
Transaction cost realism: Every KAMA slope change that you act on costs round-trip commissions and likely 1--2 ticks of slippage. For a 5-minute ES contract, that's roughly $20--40 per round trip. A system generating 6 slope-change signals per session that averages only 1 tick per trade in gross profit will be a losing system after costs.
Session filtering: RTH-only KAMA consistently outperforms overnight-inclusive KAMA in backtests of US equity index futures. The overnight session adds noise without proportionally adding signal. Consider resetting KAMA each RTH open or using RTH-only bars.
Walk-forward structure: Use 18-month in-sample periods with 6-month out-of-sample validation windows, rolling forward in 6-month increments. This gives you 3--4 independent out-of-sample periods across a multi-year backtest — enough to assess whether performance is genuine or luck.
Knowledge Map
Go Deeper
Build on this knowledgeReferences This Article
Articles that build on this topicCitations
- — Attack of the Robots - An Algo Journal (2020) 👍 6
- — Attack of the Robots - An Algo Journal (2020) 👍 2
- — Need NT indicator help to print highlight bars (2011) 👍 1
- — Attack of the Robots - An Algo Journal (2022) 👍 3
- — Attack of the Robots - An Algo Journal (2022) 👍 2
- — amaAdaptiveLaquerreFilter (2021) 👍 3
- — Amazon.com
- — Kaufman Efficiency Study (2011) 👍 10
- — How many of you use a moving average or similar "mean" as a profit target? (2019) 👍 4
- — Ask any Trading Question (2013) 👍 9
