CommodityChannelIndex
class backtide.indicators.CommodityChannelIndex(period=20)
Commodity Channel Index (CCI).
Measures how far the typical price deviates from its statistical mean, identifying cyclical trends. Values above +100 suggest overbought conditions; below -100, oversold. Useful for identifying cyclical price patterns, spotting divergences, and timing entries in commodities and equities.
Formula:
\[
\begin{aligned}
TP_t &= \frac{H_t + L_t + C_t}{3} \\\\
CCI_t &= \frac{TP_t - SMA_n(TP_t)}{0.015 \cdot MD_t}
\end{aligned}
\]
where \(MD_t\) is the mean absolute deviation of \(TP\) over \(n\) periods. Read more on Wikipedia.
| Parameters |
Look-back window length.
|
| Attributes |
Short ticker-style acronym.
name : str
Human-readable indicator name.
|
See Also
Bollinger Bands (BB).
Relative Strength Index (RSI).
Stochastic Oscillator (STOCH).
Methods
| compute | Compute the indicator on a dataset. |
| description | Short explanation of what the indicator measures. |
method backtide.indicatorscompute(data)
Compute the indicator on a dataset.
method backtide.indicatorsdescription()
Short explanation of what the indicator measures.
| Returns |
str
The description.
|