You are on page 1of 3

stoCk inDexes

TRaDing Techniques

Fixing Bollinger bands


By Dav i D Ro o k e

Bollinger bands are a popular indicator for market analysis. However, a new twist
on these can offer better results. Here, we introduce, explain and test the concept.

B
ollinger Bands are used widely in price around the mean should conform to sample mean, 95.4% of prices should be
the trading community and are statistical normality, or get close to it. found within two standard deviations of
a key component of many trad- Unfortunately, this is not the case for the mean, etc. This will be described as the
ing strategies. By their nature, Bollinger Bollinger bands and has led to a search to price/band ratio. While it can be debated
bands offer a particular perspective of fix the problem. Based on observations of whether daily price changes are normally
the market. But that perspective is not Bollinger bands, here are some of the issues: distributed, the Bollinger price/band ratio
without its drawbacks. • They are saddled with high lag, as can be said to offer little or no informa-
This article will present a revised virtually all SMA-based indicators are. tion from a probabilistic perspective.
approach to the trading band concept Consequently, the user should be mindful • The price/band ratio is not scale invariant.
with the aim of sharpening the focus of of the delay in what the bands present. That is, the price/band ratio from a given
this class of indicator significantly. Both • They do not envelope price in a manner standard deviation does not remain con-
are valid and share a common heritage, but consistent with a Gaussian distribution. stant as timescales increase. For example,
they are quite different under evaluation That is, 68.2% of prices should be found see the following based on S&P 500 prices
and in application. The derivation here is within one standard deviation of the with 2xSD banding:
termed a volatility band. This article will
explain why this derivation is necessary Volatile solution
and how it is constructed and provide
high-level preliminary test results. The volatility bands hug price much tighter than Bollinger bands, and they are far less
sensitive to a sudden surge in volatility.
Bollinger Bands
volatility Bands Chart of 20-Day Bollinger and Volatility bands
976.8718
Reversion to mean
954.0118
931.1518
Although the volatility bands are origi- 903.2918
nal in design and execution, they were 885.4318
inspired by Dennis McNicholl’s work to 862.5718
improve Bollinger bands in the late 1990s 839.7118
816.8518
(“Better Bollinger Bands,” October 1998).
793.9918
771.1318
Houston, we have a problem 748.2718
Popularized by John Bollinger, who gave 725.4118
them their name, Bollinger bands are sim- 702.5510
Volatility Bands
ply a plot of a multiple of the standard 679.6918
Bollinger Bands 656.8318
deviation of price from its simple moving
633.9718
average (SMA), both above and below. By
Dec

Jan

Feb

Mar

Apr

May

Jun

the use of standard deviation, we should


reasonably expect that the distribution of
Source: TradersStudio

36 FuTuRes May 2010

TT_Rooke_May10.indd 36 4/15/10 1:56:49 PM


160-bar Bollinger bands: HistoriCal VerifiCation
Price/band ratio = 83.7%
80-bar Bollinger bands: These charts illustrate how the volatility bands closely correlate to historical volatility. The oscil-
Price/band ratio = 86.2% lators (top chart) move in step, while the scatter plot shows significant positive correlation.
20-bar Bollinger bands:
Price/band ratio = 88.5%
• The movement of the bands against the 1575.7082
1547.7413
1519.7744
moving average does not correlate with his- 1481.8075
1463.8406
torical volatility. Seeing as Bollinger bands 1435.8737
1407.9068
are intended, in part, to reflect changes in 1379.9399
1351.9730
1324.0061
volatility, this is an issue. 1298.0392
1268.0723
1240.1054
1212.1385
Thankfully, these issues can be resolved 1184.1716
21.7203
in a practical way. By systematically address- 20 Period Historical Volatility 19.3146
16.9090
14.5033
ing each of these issues in turn, we can con- 12.0977
9.6920
7.2864
struct an indicator that complements rather 20 Period Bollinger Bands (Volatility) 8.4524
than replaces Bollinger bands and provides 6.1251
3.7978
a useful additional trading tool. The solu- 20 Volatility Bands (Volatility) 4.1593
3.6885
3.2178
tion is also simpler than anticipated. 2.7470
2.2763
1.8055
1.3348
May
Jul
Sep
Nov
2005
Mar
May
Jul
Sep
Nov
2006
Mar
May
Jul
Sep
Nov
2007
Mar
May
Jul
Sep
Nov
Volatility bands
Let us see how these so-called volatility
bands address some of these issues before
explaining how the bands are constructed. Volatility vs Band Width (Japanese Yen)
Maybe the best way to demonstrate this is 25
with a chart (see “Volatile solution,” left).
In this chart of the S&P 500, it’s clear 20
how tightly the volatility bands hug price

Historical Volatility
changes relative to the slow and sometimes
15
wild and wide gyrations of the Bollinger
bands. Volatility bands achieve this through
the application of a low lag moving average 10
and by calculating the standard deviation
of price against that moving average. Note 5
that the “standard” standard deviation
function is an inappropriate tool for this. 0
The result is trading bands with low 0.00 0.01 0.01 0.02 0.02 0.03 0.03 0.04 0.04 0.05 0.05
lag. Let’s see how effectively these bands Band Width
encapsulate S&P 500 prices at 2xSD:
Source: TradersStudio
160-bar volatility bands:
Price/band ratio = 94.6% achieving what it set out to do — that is, The requirements for calculating the
80-bar volatility bands: proportionally encapsulate price according volatility bands are simple:
Price/band ratio = 95.3% to the configured standard deviation range. • Any low-lag moving average
20-bar volatility bands: The numbers are not perfect, but are a big • A standard deviation calculation based
Price/band ratio = 95.7% improvement on the baseline. So, we can on that moving average
To validate this point let’s take a peek hypothesize that these bands are conveying The moving average used here is a lag-
at the numbers for 1xSD: meaningful information that may be trad- adjusted triple exponential moving average:
160-bar volatility bands: able. We’re also making good progress in Function ZL_TEMA(TEMA1 As BarArray,
Price/band ratio = 65.0% tackling the issues highlighted earlier. Length, OffSet) As BarArray
80-bar volatility bands: “Historical verification” (above) shows Dim TEMA2 As BarArray
Price/band ratio = 66.9% something just as interesting: how the oscil- Dim Diff
20-bar volatility bands: lations in the width of the volatility bands, TEMA2 = TEMA(TEMA1, Length,
Price/band ratio = 67.8% as a percentage of the mean, appear to cor- OffSet)
relate with historical volatility. To validate Diff = TEMA1 - TEMA2
These numbers verify that this imple- this assertion, we can review scatter charts ZL_TEMA = MA_TEMA1 + Diff
mentation of standard deviation bands is of historical volatility against band width. End Function

futuresmag.com 37

TT_Rooke_May10.indd 37 4/15/10 1:57:08 PM


TRaDing Techniques continued

reVerting to profit invested, hence the high drawdown


value. By applying coherent exit and risk
The results of the mean-reverting strategy, which seeks to profit when price corrects back controls, one should expect these results
toward the “norm,” are encouraging and should respond well to risk-control measures. to improve.

Total net profit $1,412.690.00 Open position P/L $21,020.00 Breakout strategy
Gross profit $3,859,150.00 Gross loss ($2,446,460.00) The tight integration of price with bands
Total # of trades 697 Percent profitable 56.96% might be utilized as a price channel for a
Number winning trades 397 Number losing trades 300 breakout strategy. This test is intended
Largest winning trade $114,925.00 Largest losing trade ($48,125.00) to evaluate that concept. In this case,
Average winning trade $9,720.78 Average losing trade ($8,154.87) the strategy buys or sells as price breaks
Ratio avg win/avg loss 1.19 Avg trade (win & loss) $2,026.81 out above the highest or lowest band
Max consecutive winners 14 Max consecutive losers 15
over a given channel length and is again
Avg # bars in winners 16 Avg # bars in losers 19 100% invested.
This time, we tested against a wider
Max intraday drawdown ($225,205.00) Max 3 contracts held 1
basket of commodities: crude oil, cof-
Profit factor 1.58 yearly return on account 48.15%
fee, the euro, gold, copper, orange juice,
Account size required $225,205.00
natural gas, the Swiss franc, the 30-year
Treasury bond and silver. The choice of
Standard deviation is calculated using These tests are conducted using the data for this test has been an arbitrary
the following function: TradersStudio Portfolio backtester, a selection of markets deemed conducive
strong program in the domain of trading (or not) to channel breakout. Testing ran
Function StdDevPlus(Series As BarArray, systems analysis and the development of from Jan. 2, 1980 to Jan. 12, 2010 and
SeriesMA As BarArray, Length As Integer) integrated trade-management strategies. produced a net profit of $953,311.45.
As Double We’ll feed it with Pinnacle’s reverse-adjust- Based on this limited evidence, it would
Dim i ed, continuously linked, historical futures appear that breakouts are a good use case
Dim SumSquares data deducting $25 commission and $75 for the volatility bands (like Bollinger
For i = 0 To Length -1 slippage for each trade to simulate trans- bands, but with different characteris-
SumSquares = SumSquares + actional friction. Wide-ranging parameter tics). However, sensitivity analysis would
(Deviation(Series[i], SeriesMA[i])^2) optimization will not be performed. need to be undertaken to determine how
Next robust the approach really is for this style
StdDevPlus = Sqr(SumSquares / Mean reverting strategy of implementation. Again, this strategy
(Length -1)) Printouts of the distribution of price should be supported by a solid exit and
End Function around the mean have shown a near risk management framework.
normal distribution where the lowest
The next step is to see how these bands probability price events occur as the tails For codes and results go to
pan out in a hypothetical test. of the bell curve narrow. Consequently, futuresmag.com/rookecode.
buying or selling at these extremes may
Time for a test drive be profitable. The simple strategy put Here we’ve highlighted a number of
So we have a seemingly interesting modi- together to test the idea buys or sells issues with classical Bollinger bands
fication to the original Bollinger bands. when the ratio of price to band width and shared one approach designed to
Now we need to run some tests to see how it crosses above or below a fixed thresh- address those problems. We have also
performs. Consider these proof-of-concept old with no stops. The absence of stops seen how the technique could be used to
tests to see what the raw indicator can offer is sure to leave the strategy exposed to signal reversion to the mean or to cap-
and how consistent it has been over time. big losers when price trends instead of ture breakouts in price volatility. What
Based on the evidence from the earlier reversing. But this is not intended to be we haven’t been able to do is construct
examination of the volatility bands there a tradable strategy, but rather to indicate a more complex strategy or combine the
are two obvious approaches that could be whether further study is warranted. volatility bands with other complemen-
used to apply this indicator: We tested this on the major stock index tary inputs. That may prove to be a fruit-
1) Short or medium-term mean rever- futures (S&P 500, Dow, Nasdaq 100, ful line of further investigation.
sion: Buy or sell as price reaches extreme Russell 2000), which are good benchmarks
readings, as indicated by the bands. for mean reverting strategies. Testing runs David Rooke is an iT professional and indepen-
2) Medium to long-term breakout: Buy from Jan. 2, 1997 to Jan. 12, 2010. dent trader and researcher based in Berkshire,
or sell on breakouts from the price chan- These results are encouraging (see united kingdom. his primary focus is on mod-
nel. (Codes and results for both strategies “Reverting to profit,” above). A strategy eling financial indexes and strategizing risk.
are online.) of this type is not helped by being 100% Reach him at dverke@gmail.com.

38 FuTuRes May 2010

TT_Rooke_May10.indd 38 4/15/10 1:57:09 PM

You might also like