• Notifikasi Pasar & Harga
      Lihat lebih banyak
    • Pengalihan Bahasa & Nilai Tukar
    • Pengaturan Preferensi
      Warna Naik/Turun
      Waktu Mulai-Akhir Perubahan
    Web3 Pertukaran
    Blog Gate

    Gerbang Anda ke berita dan wawasan tentang kripto

    Gate.io Blog Introduction to CCI and Its Strategy Design

    Introduction to CCI and Its Strategy Design

    28 October 11:42

    CCI, short for Commodity Channel Index, was originally introduced by the famous stock analyst Donald Lambert in 1980. It was initially designed to measure the price momentum of commodity futures. In the decades since its introduction, the indicator has grown in popularity among investors across all investment sectors. Its application has expanded from commodity futures alone, to other investment products such as stocks, foreign exchange, and cryptocurrencies. It is currently one of the most common indicators that identify cyclical trends in pricing.

    What is CCI used for?

    CCI is a momentum-based indicator that measures the difference between the current price and the historical average price of a cryptocurrency. Taking the moving averages as an example, the CCI index reflects the degree of deviation between the price of a digital asset today and its average price from previous days.

    It functions in a similar way to the ROC and WILLR. The CCI index can identify momentum of price movement, and spot possible reversals and extreme fluctuations in price. In addition, it can pick up on market sentiment just like the RSI indicator and determine overbought and oversold conditions.

    The CCI is also often used in conjunction with other indicators. Just like Bollinger Bands, it’s an oscillator whose value has two types of ranges: normal status and breaking status. When an indicator value belongs to normal status, it suggests that the price movement of the underlying asset is in a normal and stable state, without major changes in price movement or trend direction. When a value is in breaking status, it signals that the price of the underlying asset has broken through the normal fluctuation range, indicating the trend of price movement is about to change.

    Theoretically, the CCI is an unbounded oscillator, meaning that the value can go higher or lower indefinitely, without an upper or lower limit. To facilitate the extraction of information from CCI readings, Donald developed the CCI indicator by adding an adjustment parameter to its calculation based on the historical information of the commodity futures, limiting 70% to 80% of the CCI historical values to between -100 and 100. In this way, -100 to 100 becomes the normal status of the CCI indicator, while above 100 and below -100 is the breaking status of the indicator.

    In the earliest days of using the CCI indicator, investors identified a CCI reading above 100 as an overbought condition and a reading below -100 as an oversold condition. Subsequent asset price movements have shown that this approach is too crude and not very accurate in identifying oversold and overbought assets.

    Investors who make quantitative investments usually use the CCI in conjunction with a price trending indicator. When the price movement diverges from the CCI indicator, corresponding actions can be executed. Some investors use the CCI indicator in reverse, interpreting its reading in the opposite way, buying when the CCI indicator is at a lower position and selling when the CCI indicator is at a higher position.

    How to calculate the CCI?


    Compared to momentum indicators such as ROC and WILLR, the CCI is more complex in its calculation. As mentioned above, the CCI is an indicator that measures the difference between the current price and the historical average price of a cryptocurrency. Therefore, in the calculation, it is necessary to first confirm the current price of the underlying asset. Then we calculate the historical average price. In order to have the CCI indicator for all currencies at the same unit level, it is necessary to adjust the degree of deviation calculated above by dividing it by the mean absolute deviation, and finally adjust the CCI values to ensure that most of them fall between -100 and 100.

    Specific steps for calculating the CCI can be seen as follows:

    1. Calculate the typical price of the underlying asset in the current trading period. The average value of the closing price, the highest price and the lowest price is the typical price.



    2. Calculate the simple moving average of the typical price
    3. Calculate the mean absolute deviation



    In the above formula, MD stands for mean absolute deviation and TP refers to typical price.
    4. Calculate CCT value with the formula below:



    SMA is short for simple moving average and MD is the mean absolute deviation of the typical price.
    Donald set the constant at 0.015 to ensure that most of CCI values could fall between −100 and +100.
    Although the calculation process of the CCI is more complicated, investors do not need to calculate the value in all situations. Gate.io has integrated this indicator in their quantitative strategy creating system, and users only need to enter relevant parameters.

    The reason for introducing the calculation methods of the indicator is to hope that investors gain a deeper understanding of the operational principles of the indicator. After mastering these principles, one can make a configuration of the indicator's usage and parameter adjustment that is more in line with the current market. For example, the reason why Donald set the constant at 0.015 is to ensure that 70 to 80 percent of CCI values could fall between −100 and +100. The parameter 0.015 is in line with the market sentiment he observed, and this value might need to be adjusted for the cryptocurrency markets. At the moment, Gate.io does not support adjusting the internal parameters of existing indicators, but users can achieve the same parameters by adjusting the normal and breaking status thresholds of -100 and 100.

    Advantages of the CCI

    Compared to the ROC and WILLR, the CCI reduces unexpected errors when measuring the momentum of price changes. The momentum measured by the indicator is more balanced and leads to a smoother experience for traders.


    CCI’s practical use in quant trading

    MACD—CCI strategy
    [Trading Coins]
    BTC: The main coin used in the strategy research
    ETH: The coin used to test the general ability of the strategy
    [Trading Period]
    1 Hour
    [Leverage]
    None

    [Backtesting Time]
    BTC Time:01/01/2021 to 23/09/2021
    ETH Time:01/01/2021 to 23/09/2021

    [Trading Logic]
    The MACD is utilized to determine the price movement. The CCI is used to identify the optimal entry and exit time within a trend. If a DIF value above the DEA signals an uptrend in cryptocurrency price and the CCI reading is above the set value, it will be a buy signal; When a DIF value is below the DEA or the CCI is below -100, it will be a sell signal.

    [Parameter Settings]
    This strategy involves five parameters: Fast EMA, slow EMA, MACD signal, CCI entry signal point and CCI exit signal point. In order to reduce the number of parameters needed for this strategy and make it easier to use, the period parameter of the CCI is set to be the same as the fast EMA used with the MACD indicator. The CCI indicator is set over 120 as a buy signal point and below -100 as a sell signal point.

    Fast EMA: 12
    Slow EMA: 24
    MACD Signal: 9
    CCI entry signal point: 90
    CCI exit signal point: -90
    [Set Stop-loss ratio]
    None

    [Backtest Results]
    For BTC:


    As can be seen, the strategy is relatively decent on BTC.

    For ETH:



    The strategy works great after its application on ETH, even without any parameter optimization. It brings a higher cumulative return but the max drawdown has also risen.
    Buka Kotak Keberuntungan Anda dan Dapatkan Hadiah $6666
    Daftar Sekarang
    Klaim 20 Poin sekarang
    Eksklusif Pengguna Baru: selesaikan 2 langkah untuk segera mengklaim Poin!

    🔑 Daftarkan akun di Gate.io

    👨‍💼 Selesaikan KYC dalam waktu 24 jam

    🎁 Klaim Poin Hadiah

    Klaim sekarang
    bahasa dan wilayah
    Nilai Tukar

    Pilih bahasa dan wilayah

    Buka Gate.TR?
    Gate.TR sedang online sekarang.
    Anda dapat mengklik dan buka Gate.TR atau tetap di Gate.io.