Factors Directory

Quantitative Trading Factors

Commodity Channel Index

Overbought and OversoldTechnical FactorsMomentum Factor

factor.formula

Typical Price (TP):

Commodity Channel Index (CCI(N)):

Mean Absolute Deviation (MAD):

in:

  • :

    Typical Price represents the average level of price during a specific period of time, calculated as the arithmetic mean of the highest price (HIGH), the lowest price (LOW) and the closing price (CLOSE). This is a key intermediate variable representing price activity during that period of time.

  • :

    The Simple Moving Average of TP represents the arithmetic mean of the typical prices in the past N time periods. This value is used as a benchmark to measure the degree of deviation of the current typical price from the recent average level. N represents the time period of calculation, usually 20 periods are selected.

  • :

    Mean Absolute Deviation of TP measures the average degree to which the typical price deviates from its mean over the past N time periods. It is calculated by first calculating the absolute value of |TP - SMA(TP,N)| for each time period and then averaging these absolute values. MAD reflects an important dimension of price volatility and is used as a scaling factor in the calculation of CCI.

  • :

    A constant factor used to scale the CCI values ​​to make them easier to analyze and interpret. This factor was introduced by Donald Lambert, the inventor of the CCI, to normalize the indicator.

  • :

    The calculation period parameter indicates the length of the time period used to calculate the moving average and the average absolute deviation. The default value is 20, which represents the price data of the past 20 periods. This value can be adjusted according to the trading strategy and asset characteristics. A shorter period makes the indicator more sensitive to price changes, and vice versa.

factor.explanation

The Commodity Channel Index (CCI) assesses the overbought or oversold state of an asset's price by measuring the degree of deviation of the Typical Price (TP) from its recent average. When the CCI value is significantly above zero, it may indicate that the price is overbought and may face the risk of a pullback; conversely, when the CCI value is significantly below zero, it may indicate that the price is oversold and may face the opportunity to rebound. The numerical fluctuation range of the CCI indicator is usually between -100 and +100, but it may sometimes break through this range. In addition, CCI can also be used to identify divergences in price trends. For example, when the price hits a new high but the CCI indicator fails to hit a new high, it may indicate the occurrence of a trend reversal. It should be noted that CCI, as an oscillator, should not be used alone and should be used in combination with other technical indicators or fundamental analysis tools to improve the accuracy of trading signals.

Related Factors