Kaufman Adaptive Moving Average (KAMA): Efficiency Ratio Worked on Nifty
Calculate KAMA Efficiency Ratio on real Nifty closes, with smoothing constant, settings, and a worked F&O trade after STT and costs.
Key Takeaways
- 1.KAMA changes speed automatically using the Efficiency Ratio (ER), which compares net price travel against total price travel over a look back window.
- 2.On a trending 10 day Nifty window (24,050 rising to 24,560), the ER works out to 0.76 and KAMA tracks price closely. On a choppy window the ER falls near 0.05 and KAMA almost stops moving.
- 3.The smoothing constant is SC = (ER x (0.6667 minus 0.0645) + 0.0645) squared, using fast period 2 and slow period 30 as Perry Kaufman's defaults.
- 4.A common Nifty setting is a 10 period ER with 2 and 30 bound periods. Shorter look backs react faster but whipsaw more in sideways markets.
- 5.F&O profit from a KAMA signal is taxed as business income at your slab, not as capital gains. Always net out STT, brokerage and GST before judging an edge.
What the Kaufman Adaptive Moving Average Actually Does
The Kaufman Adaptive Moving Average (KAMA) was published by Perry J. Kaufman in his book Smarter Trading. A simple moving average uses one fixed speed, so it lags badly in a fast trend and whipsaws in a flat market. KAMA fixes this by changing its own speed bar by bar. When price is moving cleanly in one direction it speeds up and hugs price. When price is just noise around a level it slows down and flattens out, so you get fewer false crossovers.
This matters on Indian instruments because Nifty and Bank Nifty alternate between sharp directional moves around events such as RBI policy, the Union Budget and monthly expiry, and long dull ranges in between. A fixed 20 day SMA treats both regimes alike. KAMA reads the regime from the price data itself through one number, the Efficiency Ratio, which is the heart of the indicator and the part most explanations skip.
Below we build that number step by step on real style Nifty closing prices, plug it into the smoothing constant, and show the actual rupee outcome of a KAMA crossover trade. Price levels are illustrative and chosen to be realistic for the current Nifty range. Nothing here is a promise of returns.
The Efficiency Ratio: The Number That Drives Everything
The Efficiency Ratio (ER) answers a single question: of all the up and down movement price made over the window, how much of it actually went somewhere? It is defined as the absolute net change over the period divided by the sum of every absolute day to day change in that period. ER ranges from 0 to 1. A value near 1 means a clean trend where almost every step pushed in the same direction. A value near 0 means price thrashed up and down but ended close to where it started.
Written out, ER = |Close today minus Close n bars ago| divided by the sum of |Close minus previous Close| across the last n bars. The numerator is the direction or signal. The denominator is the volatility or total path length. Kaufman's standard look back is 10 bars, so the denominator sums 10 daily moves while the numerator measures the 10 bar net travel.
ER alone tells you whether you are in a trend or a chop, before you even compute KAMA. Many Indian traders plot ER as its own line and only take KAMA crossovers when ER is above roughly 0.30 to 0.40, which filters out most sideways whipsaws on Nifty.
Worked Efficiency Ratio Calculation on Real Nifty Closes
Take an 11 value series of illustrative Nifty 50 daily closes that form a steady uptrend. Eleven closes give us ten daily changes, which is exactly the 10 period look back. The closes are 24,050, 24,120, 24,090, 24,180, 24,260, 24,210, 24,300, 24,380, 24,420, 24,500 and 24,560. We compute the two pieces of the ER from these.
| Day | Nifty Close | Daily change | Absolute change |
|---|---|---|---|
| 1 | 24,050 | seed | seed |
| 2 | 24,120 | +70 | 70 |
| 3 | 24,090 | -30 | 30 |
| 4 | 24,180 | +90 | 90 |
| 5 | 24,260 | +80 | 80 |
| 6 | 24,210 | -50 | 50 |
| 7 | 24,300 | +90 | 90 |
| 8 | 24,380 | +80 | 80 |
| 9 | 24,420 | +40 | 40 |
| 10 | 24,500 | +80 | 80 |
| 11 | 24,560 | +60 | 60 |
Step 1, the direction (numerator). Net change is the last close minus the first close: 24,560 minus 24,050 equals 510 points. Step 2, the volatility (denominator). Add up every absolute daily change: 70 + 30 + 90 + 80 + 50 + 90 + 80 + 40 + 80 + 60, which sums to 670 points. Step 3, the ratio. ER = 510 divided by 670 = 0.7612. That high reading confirms a clean, efficient uptrend, so KAMA should now move quickly.
From ER to the Smoothing Constant and KAMA Value
ER is converted into a smoothing constant (SC) that decides how big each KAMA step is. Kaufman blends two EMA speeds: a fast period of 2 and a slow period of 30. Their per bar factors are fast = 2 divided by (2 plus 1) = 0.6667, and slow = 2 divided by (30 plus 1) = 0.0645. The formula is SC = (ER x (fast minus slow) + slow) squared. Squaring the term is deliberate, it makes KAMA stay very slow until ER is genuinely high.
Plugging in our trending ER of 0.7612: SC = (0.7612 x (0.6667 minus 0.0645) + 0.0645) squared = (0.7612 x 0.6022 + 0.0645) squared = (0.4585 + 0.0645) squared = (0.5230) squared = 0.2734. Then KAMA = previous KAMA + SC x (current price minus previous KAMA). Seeding the previous KAMA at the first close of 24,050 and using the current price of 24,560: KAMA = 24,050 + 0.2734 x (24,560 minus 24,050) = 24,050 + 0.2734 x 510 = 24,050 + 139.4 = 24,189.4. A single bar pulled KAMA up by about 139 points because the trend was efficient.
| Step | Trending window | Choppy window |
|---|---|---|
| Net change (direction) | 510 points | 30 points |
| Sum of absolute moves (volatility) | 670 points | 580 points |
| Efficiency Ratio (ER) | 0.7612 | 0.0517 |
| Smoothing constant (SC) | 0.2734 | 0.0092 |
| KAMA step taken | about 139 points | about 0.3 points |
The choppy column uses a second illustrative Nifty series that wobbles between roughly 24,270 and 24,360 and ends only 30 points from its start. There the ER collapses to 0.0517, the SC shrinks to 0.0092, and KAMA barely moves, about a third of a point. Same formula, opposite behaviour, driven entirely by the Efficiency Ratio reading the market regime. That is the adaptive part doing its job.
Reading KAMA Slope and Crossovers
Once plotted, KAMA is read two ways. The first is slope. A rising KAMA line means the adaptive average is tilting up, so the dominant push is bullish. A flat KAMA, which happens when ER is low, is itself a signal to stand aside. The second is price versus KAMA. Price closing above a rising KAMA is the standard long trigger, and price closing below a falling KAMA is the short trigger.
The strength of KAMA is that during a flat phase the line goes nearly horizontal, so price brushes it without crossing decisively and you take fewer trades. During a strong move the line accelerates and the crossover comes early. For Bank Nifty intraday traders, where ranges run wide and fast, this early acceleration in trends is the main reason to prefer KAMA over a plain 20 period EMA.
- Long setup: price closes above KAMA and KAMA slope is up, ideally with ER above 0.30.
- Short setup: price closes below KAMA and KAMA slope is down, ER above 0.30.
- No trade: KAMA is flat and ER is below about 0.20, the regime is choppy.
- Exit or trail: a close back through KAMA against your position, since the trend efficiency is fading.
Worked Trade Example: A Nifty Long via Options
Suppose the KAMA long trigger above fires on Nifty spot around 24,560 and you express it with a slightly in the money weekly 24,500 CE. The Nifty options lot size is 65. You buy 1 lot at a premium of 120 and the move continues, letting you exit at 185. Gross profit is (185 minus 120) multiplied by 65, which is 65 x 65 = Rs 4,225. That is before costs, and costs are exactly where many backtests quietly cheat.
| Cost item | Basis (illustrative) | Amount |
|---|---|---|
| Gross profit | (185 minus 120) x 65 | Rs 4,225.00 |
| STT on sell side | 0.15% of 185 x 65 | Rs 18.04 |
| Brokerage | Rs 20 per order x 2 | Rs 40.00 |
| Exchange transaction charges | approx 0.03503% of premium turnover | Rs 6.95 |
| GST | 18% on brokerage plus exchange | Rs 8.45 |
| Stamp duty | 0.003% on buy side | Rs 0.23 |
| Total costs | about Rs 73.67 | |
| Net profit | about Rs 4,151 |
So a clean 65 point premium gain on 1 Nifty lot nets roughly Rs 4,151 after STT, brokerage and GST. The STT of 0.15% applies on the sell side premium for options, a rate effective from 1 April 2026, so on a larger position it is the cost that scales most. If the same KAMA signal had failed and you exited at 95 instead of 185, the gross loss would be (95 minus 120) x 65 = minus Rs 1,625, and you would still pay the small sell side STT and brokerage on top. Position sizing and a hard stop matter more than the indicator.
Profit from Nifty and Bank Nifty F&O is treated as non speculative business income and taxed at your income tax slab, not as capital gains. The 20% STCG and 12.5% LTCG rates apply to equity delivery, not to options. Keep a trade log, since F&O turnover often triggers tax audit thresholds.
Best KAMA Settings for Nifty and Bank Nifty
Kaufman's defaults are a 10 period ER with fast 2 and slow 30, written as KAMA(10, 2, 30). This is a sensible starting point for Nifty daily charts. For shorter horizons traders compress the ER window, while for position trades they stretch it. The fast and slow bounds are usually left at 2 and 30 because they already span almost the full range of EMA speeds.
| Style | Suggested KAMA | Chart | Behaviour |
|---|---|---|---|
| Intraday Bank Nifty | KAMA(10, 2, 30) | 5 to 15 min | Reacts fast, needs an ER filter to avoid chop |
| Nifty swing | KAMA(10, 2, 30) | Daily | Balanced, the standard preset |
| Nifty position | KAMA(20, 2, 30) | Daily or weekly | Smoother, fewer signals, rides big trends |
| Liquid stock (Reliance, TCS) | KAMA(10, 2, 30) | Daily | Good on clean trenders, weaker on gappy names |
A practical refinement is to keep the ER period at 10 but require ER above a threshold before acting, rather than shortening the period. Shortening the ER period makes the indicator twitchy, whereas an ER gate keeps KAMA smooth and simply blocks trades when the market is inefficient. On Bank Nifty, which is more volatile than Nifty, a higher ER gate around 0.35 cuts down false breakouts near the open.
Combining KAMA With Other Indicators
KAMA defines trend and timing but does not measure momentum, so it pairs well with an oscillator. Using the Relative Strength Index alongside KAMA is common: take the KAMA long only when RSI is above 50 and not yet overbought, which avoids buying into a stretched move. Adding the volatility picture through ATR helps size stops in rupee terms for a Nifty lot.
- KAMA plus RSI: trend and timing from KAMA, overbought or oversold context from RSI.
- KAMA plus MACD: KAMA for the line cross, MACD histogram for momentum confirmation.
- KAMA plus ATR: KAMA for entry, ATR to place a volatility scaled stop and to convert it to rupees.
- Two KAMA lines: a fast KAMA(10) and slow KAMA(20) crossover for an all adaptive system.
Limitations and Common Mistakes
KAMA is adaptive, not predictive. Its biggest weakness is the transition from chop to trend: at the start of a new move the ER is still low because the recent window was choppy, so KAMA wakes up slowly and you enter late. The opposite also happens, a sudden one day gap can spike the ER and produce a fast but false crossover. This is why the rupee math matters, your edge is the net of many trades after costs, not any single signal.
Two errors recur. The first is over shortening the ER period to feel responsive, which destroys the noise filtering that is the whole point of KAMA. The second is ignoring expiry mechanics when trading through weekly options, where time decay can erase a correct directional call if the move is slow. On expiry day especially, a KAMA long that is right on direction but late by a few hours can still lose because theta has crushed the premium.
Before trusting any KAMA setting on Nifty or Bank Nifty, backtest it with realistic STT, brokerage, GST and slippage included, and log every trade. A strategy that looks profitable on gross points often turns flat once the roughly Rs 70 round trip cost per options lot and slippage are subtracted.
Sources and Further Reading
For the original method see Perry J. Kaufman's writing, and for Indian market mechanics, charges and contract specifications use Zerodha Varsity, Investopedia and NSE India. Always confirm current STT rates, lot sizes and expiry rules on the official source before you trade.
Sources and Further Reading
For authoritative data and further reading on this topic, refer to Zerodha Varsity, Investopedia and NSE India. Always confirm current rules, rates and contract specifications on the official source before you trade.
Related Topics
Related Articles
Understanding Trading Psychology in Indian Markets
Learn trading psychology for Indian markets with a worked Nifty options example showing how fear and greed turned a Rs 3,600 loss into Rs 16,500.
Pair Trading Strategy for Indian Markets
Pair trade TCS and Infosys with real z-score math, lot sizes, rupee P&L, STT and slab-rate tax. A worked, market-neutral guide for Indian traders.
Understanding Limit Orders in Indian Markets
How limit orders work on the NSE, with a real bid-ask order book, tick sizes, and worked Reliance, HDFC Bank and Nifty examples with charges.
Understanding Stock Splits in Indian Markets
How stock splits work in India with a real dated IRCTC example, split vs bonus, F&O adjustments, and LTCG and STCG tax treatment of split shares.
Understanding the Harami Pattern in Indian Markets
What a harami pattern is, bullish vs bearish, a real dated Nifty 2024 reversal example, F&O rupee maths, confirmation rules and India tax basics.
Sector Rotation Strategy in Indian Markets
Sector rotation for Indian markets with a real Nifty IT vs FMCG worked example, futures lot math, stop rules and STT and tax facts.
The trading journal built for Indian F&O traders. Track your trades, spot patterns, build discipline.
- Log one trade a day by hand, on purpose
- AI mentor finds your repeat mistakes
- Behavioural analytics catch tilt early
- Trading calendar with P&L heatmap
- Pre-trade checklist flags risks
Yearly ₹2,499 · No broker credentials