Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
23:10 (32-38): The Link Between Bollinger Bands & The Commodity Channel Index by N. Harrington
In
never really considered the commodity channel they had to be mathematically equivalent, or very close to
index (CCI) until December 2003, when I at- it. That intrigued me even more.
tended a conference of Woodie’s CCI Club, But before going any further into my research, let’s
highlighted by a talk by CCI creator Donald R. review the technical foundation of the commodity channel
Lambert. Seeing so many people willing to index and Bollinger Bands.
come to a conference just to discuss one indicator got me
curious. That curiosity led to my own study of the CCI in LAMBERT’S COMMODITY CHANNEL INDEX
December 2003 and early January 2004. During that time, I Donald Lambert’s article on the CCI was originally published
happened upon an interesting relationship between the CCI in Commodities magazine (now Futures) in October 1980,
Copyright (c) Technical Analysis Inc.
Stocks & Commodities V. 23:10 (32-38): The Link Between Bollinger Bands & The Commodity Channel Index by N. Harrington
TRADING TECHNIQUES
High + Low + Close Calculate the standard deviation of the n most recent
1 TPi = typical prices:
3
2
Compute the simple moving average of the n most TPi – SMA
5 SD =
recent typical prices: n
n
2 SMA = 1n Σ TP
i =1
i
This is the key calculation difference between Lambert’s
and Bollinger’s techniques. As I will comment later, with a 20-
period simple moving average, the difference between a mean
Compute the mean deviation of the n most recent typical deviation and standard deviation is relatively insignificant.
prices:
Calculate the upper band:
n
3 MD = n1 Σ TPi – SMA
i=1 6 TopBand = SMA + 2 * SD
-150.00
used by Bollinger Aug Sep Oct Nov Dec 05 Feb Mar Apr May Jun Jul Aug
-200.00
Bands.
FIGURE 1: THE CCI. Here’s the CCI plotted with the e-mini S&P 500 futures contract.
9 %B = Close – BotBand
TopBand – BotBand
I normalize this equation to map the Bollinger Bands to well as differences. Lambert used the mean deviation in his
±100 instead of one and zero. This makes its numbers map to calculations and Bollinger used the standard deviation. With
the same range as the CCI. Here is the normalized %B: the 0.015 constant in his equations, Lambert wanted to encom-
pass 70–80% of the price action within ±100%. Bollinger used
Close – BotBand – 100 ±2 standard deviations to encompass 95% of the price action
10 %NB = 200 *
TopBand – BotBand with ±100%. An interesting sidenote is that Lambert used
[Equation 10] mean deviation instead of standard deviation because, in
%B presents a normalized view of ±2 standard deviations 1980, he was dealing with a Texas Instruments calculator and
around the moving average of the price action. The 100% line not a personal computer. Mean deviation was an easier
is the TopBand and the -100% line is the BotBand of the calculation than standard deviation.
Bollinger Bands. When price goes above the TopBand, it also My first experiment created almost an exact match. I changed
goes above 100%. Statistically, ±2 standard deviations will the standard deviation parameter of the normalized %B indica-
encompass 95% of the price action. tor from two to one. Statistically, this meant the bands encom-
Bandwidth measures the width of the band as a percentage passed 68% of the price action within the bands. I actually like
of the moving average: using SD = 1 instead of two, because with this setting, like the
CCI, it indicates a bullish move when it penetrates the top band
TopBand – BotBand and a bearish move when it penetrates the bottom band. Figure
11 BW = 4 shows this new setting of 1 for both the Bollinger Bands and
MidBand
the normalized %B.
As you can see from Figure 4, the plots for the CCI and the
To quote Bollinger: “When the bands narrow drastically,
normalized %B with a parameter of 1 are virtually identical.
a sharp expansion in volatility usually occurs in the very near
future.” We will come back to this later.
MASSAGING THE EQUATIONS
Since these graphs of the CCI and %B were so similar, I had
LAMBERT’S CCI AND BOLLINGER’S %B
to figure out how their calculations came to the same results.
This is where the plot thickens. Figure 3 shows the standard
In other words, how could:
CCI in subgraph 2, my normalized %B in subgraph 3, and the
Bollinger Bands on the price graph. There are similarities as
1,247.34
1,233.75
1.224.76
1,200.00
1,180.00
1,160.00
1,140.00
1,120.00
1,100.00
1.080.00
200.00
100.00
-21.060
-100.00
-200.00
200.00
100.00
3.57
-100.00
-200.00
Aug Sep Oct Nov Dec 05 Feb Mar Apr May Jun Jul Aug
FIGURE 3: CCI AND BOLLINGER BANDS. Here’s the standard CCI, the normalized %B in subgraph 3, and Bollinger Bands in the price graph. There
are similarities as well as differences.
1,241.69
1,233.75
1.230.41
1,200.00
1,180.00
1,160.00
1,140.00
1,120.00
1,100.00
1.080.00
200.00
100.00
-21.060
-100.00
-200.00
200.00
100.00
7.14
-100.00
-200.00
Aug Sep Oct Nov Dec 05 Feb Mar Apr May Jun Jul Aug
FIGURE 4: THEY DO SEEM SIMILAR. The plots for CCI and the normalized %B with a parameter of 1 appear almost identical.
TPi – SMA
12 CCI =
.015 * MD
≈ %NB We must realize that the commodity
channel index and Bollinger Bands are
= 200 * Close – BotBand – 100 cut from the same mathematical cloth.
TopBand – BotBand
First, let’s look at the normalized %B and see what we can see if anyone else had already discovered and discussed this.
do with it. With equation 10: It was no surprise to me that John F. Ehlers in his book Rocket
Science For Traders discussed the CCI in a way that showed
Close – BotBand – 100 he got exactly the meaning of the 0.015 constant in Lambert’s
%NB = 200 * calculations. But Ehlers didn’t go on to discuss the CCI’s
TopBand – BotBand
similarity to John Bollinger’s %B oscillator.
TopBand = SMA + SD
BotBand = SMA – SD WHAT DO WE DO NOW?
TopBand – BotBand = (MA + SD) – (MA – SD) We must realize the CCI and Bollinger Bands are cut from the
= 2*SD same mathematical cloth, or as John Bollinger said, don’t use
redundant indicators. It is interesting to note that Bollinger
So: said that the CCI was an early choice to use with the bands,
but, as it turned out, it didn’t work, as it tends to be collinear
%NB = 200 * Close – SMA + SD – 100 with the bands themselves in certain time frames. Bollinger
2 * SD
found out empirically what this article shows mathemati-
cally; namely, that the only difference between Bollinger’s
%NB = 100 * 2 * Close – SMA + 1 – 1 %B and Lambert’s CCI is the use of the mean deviation versus
2 * SD 2
the standard deviation and the values of the parameters
feeding them.
13 %NB = 100 * Close – SMA Simplify, simplify, simplify just by using Bollinger’s %B
SD where you were using CCI. Use Bollinger Bands (BB) and
bandwidth (BW) to provide added visual impact and infor-
Now, let’s manipulate the CCI, starting with equation 4: mation to support your trading decisions.
Finally, find a nonredundant indicator to complement your
TPi – SMA
CCI = use of Bollinger Bands so that you have “two independent
0.015 * MD witnesses” confirming your trading decisions.
TPi – SMA 1,000 Neil Jon Harrington is the director of the Brigham Young
= *
MD 15 University Data Center facilities and adjunct professor teach-
ing honors courses in technical analysis. He is also the president
TPi – SMA of Harrington Trading Co., providing consulting, training, and
14 = 66.66667 * system development for traders. He runs the Harrington Center
MD
for Technical Market Analysis.
So now, instead of equation 12, we have:
SUGGESTED READING
Bollinger, John [1992]. “Using Bollinger
TPi – SMA
15 CCI = 66.66667 * ≈ %NB Bands,” Technical Analysis of STOCKS &
MD COMMODITIES, Volume 10: February.
Ehlers, John F. [2001]. Rocket Science
= 100 * Close – SMA
SD For Traders, John Wiley & Sons.
Lambert, Donald R. [1982-3]. “Commod-
This approximate equality works because: ity Channel Index: Tool For Trading Cy-
clic Trends,” Technical Analysis of
• TPi is approximately equal to close STOCKS & COMMODITIES, Volume 1:
• When you compare standard deviation and mean Chapter 5.
deviation, the former is greater than the latter, compen-
sating some for 66.66667 being less than 100.
After figuring this out, I researched the trading literature to †See Traders’ Glossary