Direct answer: the Kaufman Efficiency Ratio formula
The Kaufman Efficiency Ratio (often abbreviated as ER) is calculated as a ratio of net price movement to total price movement over a chosen lookback window.
A common form is:
ER = ( |Priceₜ − Priceₜ−n| ) / ( Σᵢ=1→n |Priceₜ−(n−i+1) − Priceₜ−(n−i)| )
Where:
- Price is the numerical price series you measure (for example, a closing price series).
- t is the ending index of the window.
- n is the lookback length in bars (the number of intervals included).
- The numerator is the absolute difference between the start and end of the window (net movement).
- The denominator sums absolute step-to-step changes across the window (total movement).
If the denominator is 0, ER is undefined; implementations typically handle this as an edge case.
Mechanism or definition: what the ratio is measuring
ER compares two quantities for the same lookback window:
-
Net movement (numerator)
- Net movement uses only the start and end points of the window.
- If price ends far from where it started, net movement is large.
- If price ends near where it started, net movement is small.
-
Total movement (denominator)
- Total movement adds up the absolute changes between consecutive samples.
- If price moves in a straight path (few back-and-forth swings), total movement is close to net movement.
- If price whipsaws (back-and-forth), total movement becomes much larger than net movement.
Conceptually, ER is a measure of path efficiency:
- High ER suggests the price traversed the window with relatively little cancellation (less back-and-forth).
- Low ER suggests the price moved a lot but ended near its starting point due to reversals or noise.
Evidence or example: computing ER step by step (with explicit assumptions)
Assume you sample a price series at regular intervals (for example, each bar is one hour), and you choose:
- Lookback length n = 4 bars.
- You use Price = close (the specific choice of price type matters; ER’s inputs are the series you select).
Let the four consecutive prices in the window be:
- Priceₜ−4 = 100
- Priceₜ−3 = 101
- Priceₜ−2 = 100
- Priceₜ−1 = 103
- Priceₜ = 104
1) Net movement
Net movement uses only the start and end:
- |Priceₜ − Priceₜ−4| = |104 − 100| = 4
2) Total movement
Total movement sums absolute step changes:
- |101 − 100| = 1
- |100 − 101| = 1
- |103 − 100| = 3
- |104 − 103| = 1
Total movement = 1 + 1 + 3 + 1 = 6
3) ER
ER = 4 / 6 ≈ 0.667
Interpretation (general, not predictive):
- This is higher than 0 would indicate, meaning net displacement was relatively large compared to the overall travel distance.
- It is not “perfectly efficient” because total movement exceeded net movement, implying some reversals.
Limitations and risks: what can go wrong or mislead you
Even though the calculation is deterministic once inputs are chosen, the meaning and reliability depend on how you set it up.
1) Division by zero when total movement is zero
If the denominator (total movement) equals 0, then all consecutive prices in the window were identical (no movement between sampled points). In that case, ER cannot be computed in the standard ratio form.
A careful implementation must define a behavior for this edge case (for example, returning a special value or skipping the point). The correct handling depends on your analysis workflow.
2) Sensitivity to the chosen lookback length (n)
ER uses the last n intervals. Changing n can change ER materially because:
- A longer window includes more movement and more opportunities for reversals.
- A shorter window focuses on a narrower path, which can exaggerate noise.
So ER is not “one-size-fits-all”; it summarizes the efficiency of the specific window you request.
3) Dependence on price sampling and price type
ER’s inputs are a specific price series sampled on a specific schedule.
- Using close prices vs. typical prices vs. another derived series changes the step-by-step values.
- Using different bar sizes (more or fewer samples per unit time) changes the path and the total movement.
Therefore, two ER calculations using different data choices are not directly comparable.
4) Vulnerability to noisy data and microstructure effects
Because the denominator uses absolute differences between consecutive samples, ER can be affected by:
- Small fluctuations and noise
- Bid–ask related effects in certain contexts
- Execution-related artifacts in event-driven data
This doesn’t make the formula “wrong,” but it can make the computed ER reflect trading noise rather than a smooth directional move.
5) Historical relationships do not imply future results
ER is a descriptive statistic of recent movement efficiency. It is not a forecast by itself.
- High or low ER in the past does not establish what will happen next.
- Any interpretation that assumes predictability is an extra step beyond the calculation.
Verification or next question: how to independently check the result
To verify an ER calculation yourself:
- Write down the exact window you use (which index is t, and what is n).
- Confirm the exact price series used for Price (for example, close).
- Recompute the numerator using only the start and end prices of the window.
- Recompute the denominator by summing absolute differences between each consecutive pair inside the window.
- Check the edge case where total movement is 0.
- Repeat after changing one input (like n) to see how sensitive ER is to that choice.
If you want to go further, a useful next question is how changing the inputs (lookback length and data sampling) changes ER’s numerical behavior, and what generic interpretations are appropriate for a descriptive efficiency metric.