Financial markets are diverse, offering opportunities to trade stocks, bonds, commodities, derivatives on financial instruments and foreign exchange. Each market is different with its own personality but there are similarities between all markets. One similarity in all markets is that the potential risks of loss are highly correlated with potential rewards. Large rewards generally require a trader to accept large risks. That similarity has led analysts in all markets to search for strategies that can improve rewards while reducing risk. It might be surprising to some stock market traders to learn that many of the most reliable technical indicators were developed by futures traders. This might be because of the fact that there are usually larger risks in futures markets because futures markets are leveraged. With leverage, a small move can bring either large gains or losses and traders have spent a great deal of time searching for ways to maximize gains and minimize risks in these markets.
As one example, the popular relative strength index (RSI) and average true range (ATR) were developed by J. Welles Wilder, a futures trader who didn’t even mention individual stocks in the book he wrote explaining these indicators. A less popular but reliable indicator, CCI, also traces its roots to the commodities market.
CCI is the Commodity Channel Index. This indicator was developed by Donald Lambert, a computer programmer who noticed cycles of varying lengths seem to be visible in commodity markets. Lambert was not a trader, he was a computer programmer and mathematician who viewed markets as math problems. He introduced CCI in 1980 to take advantage of new technology, the handheld Texas Instrument programmable calculator. Market historians believe CCI was the first indicator that could not be easily calculated by hand and its introduction seemed to mark a turning point in technical analysis away from simple approaches to increasingly more complex ideas.
Noticing cycles, which are simply price moves that go up and down over time, Lambert created CCI to identify when the cycle was changing from up to down. It is a trend reversal indicator and in theory, Lambert succeeded in solving a math problem related to cycles. In his original article he wrote, “A rather remarkable result was finding that the CCI always gave for all perfectly cyclical contracts (PCCs) an exit signal either at or before the extreme price, never after the extreme price.” PCCs are a mathematical construct and no actual market is perfectly cyclical so the results of CCI will not be perfect in real trading.
Calculating CCI is a multi-step process.
- The 9:15am Money Meetings
Private trading group led by 25-year Wall Street insider uses a "hidden-in-plain-sight" investment on the NYSE... to generate income on demand LIVE on the air. Here’s how you can watch their LIVE meetings and follow trade recommendations that could make you enough to replace your job income.
The typical price was widely used by commodity traders to find price targets. There were a number of formulas based on that idea among floor traders and it isn’t surprising to see commodity traders use typical price in a calculation.
The rest of the calculations are finding a value that Lambert said was similar to a “standard score” in statistics. The standard score is the number of standard deviations a value is from the mean. Median deviation provides a frame of reference of how volatile recent price action has been.
Finding the mean deviation, or the average distance between the typical price and a moving average of the typical price, was the process Lambert programmed into his calculator. Now the calculations are done in spreadsheets, charting software or web site like StockCharts.com
CCI is the ratio of the current day’s price action to the mean deviation. The constant, 0.015 in the denominator, is used so that 70% to 80% of CCI’s values will fall between -100 and +100.
You won’t ever have to calculate CCI but you might want to chart it. In the chart below, we have used 20 days to calculate CCI, the default setting identified by Lambert in 1980. Horizontal lines are added at +200 to show when the indicator is overbought and at -200 to show when it is oversold. Traders generally use +/- 200 instead of +/- 100 to limit the number of trading signals. CCI can be used to signal a buy when the indicator becomes either overbought or oversold. Green vertical lines show buy signals for both conditions.
CCI provides buy signals when it moves above +200 indicating an uptrend is beginning and bulls seem to be buying into the stock at any price. When used this way, CCI is buying into sharp up trends. This signal will allow you to participate in markets that form bubbles since you’ll be buying as prices accelerate to the up side after an extended bull market.
The indicator also signals a buy when CCI moves above -200 after falling below that level. This shows buyers are moving into the stock after it sold off sharply and is using CCI to find oversold markets. Prices become oversold after selling pressure increases and when the number of sellers decreases we expect a market to turn higher.
In both cases, CCI is used to generate buy signals while sell signals are being ignored. We are focusing on buy signals since most traders limit their activity to the long side in the stock market.
In the chart above, three of the four signals were successful and indicates CCI appears to be useful. Testing is needed to determine if CCI is actually capable of delivering profits. We will look at two tests to assess CCI.
For the first test, we will compare CCI with a random market entry. Testing will be done on SPDR S&P 500 ETF (NYSE: SPY) using 25 years of data ending in July 2016. Commissions of $5 per trade are deducted to account for trading costs. Trades are closed four weeks after the trade is entered. A time-based exit allows us to focus on the effectiveness of the indicator as an entry signal. There are no other rules for this test. The results are summarized in the table below.
Test results show CCI beats random entries. The largest profits are found using CCI to spot deeply oversold trading opportunities. Buying when CCI crosses above -200 from below have the highest win rate and largest average gain per trade.
Determining whether or not an indicator beats a random entry with the same exit rules is the first step in deciding whether or not to use an indicator. The next step in the testing process is to determine if the indicator is better than other indicators. The next table shows the results for tests on MACD and RSI. For MACD, we are buying when the histogram turns bullish by crossing over zero. For RSI we completed two tests to make it comparable to CCI. First, we test the idea of buying when RSI become overbought, in this case buying when RSI breaks above 70. Then we test buying when buying moves above 30 after becoming oversold.
To be conservative, we are using the results for the combined CCI rules, buying on both moves above -200 and +200. The same time frame, same exit rules and same commissions are used in all tests.
Once again, CCI comes out on top. MACD and RSI can be profitable, but CCI is more profitable in this test. RSI works better finding oversold opportunities to buy. This was the case with CCI as well.
Simple tests show that CCI can be a useful indicator, potentially more useful than better known indicators. Based on quantitative test results, this is an indicator you should consider adding to your charts. You could vary the number of days used to calculate CCI, making it less than 20 if you want to trade more frequently and more than 20 if you want fewer trading signals. You could also take signals when CCI reaches +100 or -100 if you are an active trader. Based on the data, it’s likely to can find success with CCI in the stock market.