Donald Lambert designed CCI in 1980 for commodity futures, hence the name, though it is applied to equities far more often now. The idea is a standardised distance: how unusual is today’s price relative to its own recent average, measured in units of that average’s typical dispersion. The call is @CCI(high, low, close, 20).
How it is computed
typical_price = (high + low + close) / 3
CCI = (typical_price - SMA(typical_price, N)) / (0.015 * mean_deviation)
The 0.015 constant is arbitrary. Lambert chose it so that roughly 70 to 80% of readings would land between -100 and +100 on the futures data he was working with. That calibration was fitted to 1980 commodity markets, not to NSE equities, so the familiar -100 and +100 lines do not carry the same coverage on INFY or HDFCBANK.
The output is unitless but unbounded, unlike RSI or the stochastic, so extreme readings of +300 or worse are possible:
@CCI(high, low, close, 20) < -100
Typical parameters and readings
| Setting | Convention | Reads as |
|---|---|---|
| 20-period window | Lambert’s original | one trading month |
| 14-period window | common alternative | faster, more extremes |
| Above +100 | described as strong or overbought | price well above its recent mean |
| Below -100 | described as weak or oversold | price well below its recent mean |
| Between -100 and +100 | ordinary range | no extreme reading |
Note that the same threshold is read two opposite ways by different practitioners. Some treat a move above +100 as a breakout to buy, others as an overextension to fade. When an indicator’s own community disagrees about the sign of the signal, that is a strong hint the indicator is descriptive rather than predictive.
How to read the output
CCI is a normalised deviation, nothing more. A reading of -150 says the typical price is 150 units of scaled mean deviation below its 20-period average. That is a statement about the recent distribution of prices, restated. It carries no information about earnings, valuation, or flows.
Risks and caveats
Being unbounded, CCI has no ceiling to pin against, which is sometimes described as an advantage over RSI. It creates its own problem instead. There is no natural anchor for what counts as extreme, so any threshold you pick is a choice you made, and picking it by testing many candidates on one history is straightforward overfitting.
The mean absolute deviation in the denominator collapses in quiet markets. When a stock barely moves for a month, a small move produces a very large CCI, which is exactly backwards from what you want.
Both the window and the threshold are free, and the two interact. A grid over 10 windows and 10 thresholds gives 100 candidates on one price history, and the best of 100 will always look good.