Direct answer
A “worked example of KAMA” means you take the KAMA formulas, choose specific input numbers (price series, smoothing parameters, and an initial value), then calculate KAMA step by step for at least one new data point. The key point is that you must state every assumption used in the math, so someone else can reproduce the same values from the same inputs.
Mechanism or definition
Kaufman’s Adaptive Moving Average (KAMA) is a moving average that aims to adjust its smoothing strength. In plain terms, it tries to move faster when price action is more “efficient” (relatively directional) and to move slower when price action is less efficient (more noise).
A standard way to describe KAMA uses:
- A price series (for example, the closing price at each time step).
- A lookback length n (how far back you measure efficiency).
- Two end smoothing constants (often denoted SCmax and SCmin), which represent fast vs. slow adaptation.
- The efficiency ratio ER, which compares net movement to total movement over the lookback.
- A smoothing constant SC derived from ER, which then updates KAMA.
One common formula set is:
- Efficiency ratio over n steps:
- Let change = |Price[t] − Price[t−n]|
- Let volatility = Σ_{i=0 to n−1} |Price[t−i] − Price[t−i−1]|
- ER = change / volatility (define ER = 0 if volatility = 0)
- Smoothing constant:
- SC = (ER × (SCmax − SCmin) + SCmin)²
- KAMA update:
- KAMA[t] = KAMA[t−1] + SC × (Price[t] − KAMA[t−1])
Evidence or example (worked, numeric, with assumptions)
Worked example goal: compute KAMA[t] from a short, hypothetical sequence.
Assumptions (all stated):
- We use a lookback length n = 3.
- We compute one KAMA update at time t = 3 (meaning Price[0] … Price[3] are known).
- Prices are simple example values (not live data):
- Price[0] = 100
- Price[1] = 102
- Price[2] = 101
- Price[3] = 105
- We set the previous KAMA value:
- KAMA[2] = 101.5
- We choose adaptation endpoints (this is a modeling assumption; different conventions exist across implementations):
- SCmax = 0.4444
- SCmin = 0.0640
Step A: compute ER at t = 3 using n = 3
- change = |Price[3] − Price[0]| = |105 − 100| = 5
- volatility = |Price[1] − Price[0]| + |Price[2] − Price[1]| + |Price[3] − Price[2]| = |102 − 100| + |101 − 102| + |105 − 101| = 2 + 1 + 4 = 7
- ER = 5 / 7 ≈ 0.7142857
Step B: compute SC from ER
- SC = (ER × (SCmax − SCmin) + SCmin)²
- SCmax − SCmin = 0.4444 − 0.0640 = 0.3804
- ER × (SCmax − SCmin) = 0.7142857 × 0.3804 ≈ 0.271714
- Inside parentheses = 0.271714 + 0.0640 = 0.335714
- SC ≈ (0.335714)² ≈ 0.112712
Step C: update KAMA
- Price[3] − KAMA[2] = 105 − 101.5 = 3.5
- KAMA[3] = 101.5 + SC × 3.5
- KAMA[3] ≈ 101.5 + 0.112712 × 3.5
- KAMA[3] ≈ 101.5 + 0.394492
- KAMA[3] ≈ 101.8945
What to notice in this example:
- ER is high because net change (5) is large relative to summed absolute movement (7).
- That raises SC compared with SCmin, so KAMA moves toward Price[3] more than it would in a noisy/choppy interval.
Limitations and risks (material failure modes)
- Parameter dependence: The numerical result depends on n, SCmax, SCmin, and the initial KAMA value. Different software may use different parameter conventions, so “the same settings” must be confirmed to reproduce values.
- Noise and regime shifts: ER can drop sharply when price becomes choppy, causing KAMA to smooth more. In highly noisy series, the adaptive behavior may reduce responsiveness when you might expect the opposite.
- Lag is still present: Even with adaptation, KAMA updates from previous KAMA and reacts gradually to new data. In fast reversals or discontinuities, it can be behind price.
- Division-by-zero handling: If the summed absolute movement (volatility) is zero, ER must be defined by implementation (commonly set to 0). Different edge-case handling changes results.
- Not a standalone prediction: Even a correctly calculated KAMA value does not guarantee any specific future behavior; historical patterns do not establish future outcomes.
Verification or next question
To independently verify a KAMA calculation, reuse the same inputs and steps:
- Confirm the exact ER, SC, and KAMA formulas used by the specific implementation.