Sunday, November 25, 2007

Bollinger Bands

Bollinger Bands are a technical trading tool created by John Bollinger in the early 1980s.

The purpose of Bollinger Bands is to provide a relative definition of high and low.
Bollinger Bands consist of a set of three curves drawn in relation to securities prices.

The middle band is a measure of the intermediate-term trend, usually a simple moving average, that serves as the base for the upper and lower bands.

The interval between the upper and lower bands and the middle band is determined by volatility,typically the standard deviation of the same data that are used for the average.

The default parameters,are 20day (periods) and two standard deviations:

Middle Bollinger Band = 20-Day simple moving average
Upper Bollinger Band = Middle Bollinger Band + 2 * 20-period standard deviation
Lower Bollinger Band = Middle Bollinger Band - 2 * 20-period standard deviation

the interpretation of the Bollinger Bands is based on the fact that the prices tend to remain in between the top and the bottom line of the bands.

A distinctive feature of the Bollinger Band indicator is its variable width due to the volatility of prices.

In periods of considerable price changes (i.e. of high volatility) the bands widen leaving a lot of room to the prices to move in. During standstill periods, or the periods of low volatility the band contracts keeping the prices within their limits.

Calculation
Bollinger bands are formed by three lines. The middle line (ML) is a usual Moving Average.
ML = SUM[CLOSE, N]/N

The top line, TL, is the same as the middle line a certain number of standard deviations (D) higher than the ML.
TL = ML+(D*StdDev)

The bottom line (BL) is the middle line shifted down by the same number of standard deviations.
BL = ML-(D*StdDev)

Where:
N is the number of periods used in calculation;
SMA = Simple Moving Average;
StdDev = means Standard Deviation.
StdDev = SQRT(SUM[(CLOSE-SMA(CLOSE,N))^2,N]/N)

It is recommended to use 20-period Simple Moving Average as the middle line, and plot top and bottom lines two standard deviations away from it.

To Calculate Bollinger Bands in MS Excel:.
Column,values to enter, formulas U have to enter
A = Company Name/date
B = Open
C = High
D = Low
E = LTP/close
F = Volumes

first we have to calculate a 20-day standard deviation:

G = here, we have to calculate mean (or Simple Mov. Aver.) of 20 days, we add all 20 days clsoing prices and divide it by 20.i.e no.of periods we require.so in cell G21(20th day) u have to enter formula,it is =SUM(E2:E22)/20

then,we have to manually copy the mean (ie.Simple Mov. Aver.) of 20 days above the G21.till we complete 20 days.ie. G21+19 cells above it.

H = then,we have to calculate deviation for these 20 day period so subract SMA from closing price we get deviation =E2-G2

I = then have to square the deviation so =POWER(H2,2)

J = standard deviation = then,we divide the sum of the squared deviation by the number of days so formula is =SQRT(SUM(I2:I21)/20)

Bollinger bands are formed by three lines.
G = Middle band

K = Upper band (SMA plus 2 standard deviations) =G21+(2*J21)

L = Lower band (SMA minus 2 standard deviations) =G21-(2*J21)

Conclusions
Even though Bollinger Bands can help generate buy and sell signals, they are not designed to determine the future direction of a security.

Bollinger Bands serve two primary functions:
-To identify periods of high and low volatility
-To identify periods when prices are at extreme, and possibly unsustainable, levels.

Remember that buy and sell signals are not given when prices reach the upper or lower bands. Such levels merely indicate that prices are high or low on a relative basis.

A security can become overbought or oversold for an extended period of time.

Finally,the bands are just bands,not signals.A band of the upper Bollinger Band is NOT a sell signal. A bands of the lower Bollinger Band is NOT a buy signal.


13 comments:

Cactus said...

dude,

what if u sell on ub & buy at lb....in conjuction with rsi/stockhastic......?

niftyxl said...

cactus,u can buy at lower band and sell at upper band..and can make money :)

but problem is volatility in stks...which triggers SL..

if u r comfortable without SL...then go ahead and buy at lower band...

yes u can use rsi positive divergence as buy signal with Lower BB...

Cactus said...

dude, the continuation of tics in a particular direction define trend......i mean if the tics are in continuation with ub in uptrend....time to buy at lb or middle.if tics are at lb in continuation.....it is time to sell at middle band or above. stop is must.

btw, rsi/stockhastic really don't matter if u can consider continuation.

niftyxl said...

but u have to consider positive/negative divergences before taking(BUY/SELL) decision....

for eg. if the price is in lower band..and rsi is not going below previous low then..its strong buy signal...then no matter wat..one shud not short at that level...

for eg....chk rsi positive divergence and price on 27 oct-08.

its matter of time that price define the trend..

regarding continuation of trend...u know more EWT than me(i m NIL in EWT)..so no comment from me on trend...LOL

Cactus said...

hey genius,

I don't know EW......
for me ....any tool don't have much important except my own tool.

haa.....ha..

kriish said...

Thanks a lot !!!! really useful!!!!

R.Shabadi said...

Hi Jaggu,

Can this be applied to the commodities directly? I am mainly interested in precious metals. Can Bollinger bands, pivot point calculations be applied to the commodities directly?

best regards

niftyxl said...

R.shabadi,
i dont trade commodities, but BB works for index,equities..tats y i have incorporated it in my trading system...u can find the details here

http://geniusjaggu.blogspot.in/p/new-fail-safe-trade-indicator-by-jaggu.html

Dinesh Varma said...

Hey Jaggu!! Thanks for your effort..

Will you please tell me why do we need to multiply by number 2 and sqaure root for upper and lower band... can we use 1.5 or 2.5 instead of 2..and also what does number change will make difference... is number other than 2 is wrong??

EbizWorldWide said...

i tried using the formulas you provided and then compared the results - Upper/lower bollinger band data with the results obtained from stock site like http://bigcharts.marketwatch.com and the resulting values were radically different. Can you tell us which stock you used as an example in the excel image you provided nin your example? Thanks

EbizWorldWide said...

I think I see a part of the problem
Your SMA(20)=SUM(E2:E22)/20 should actually be =SUM(E2:E21)/20

E2:E22 means 21 points in time .. not 20

...although of you tell us the stock symbol you used to generate the excel spreadsheet we will know if all other formulae are correct to

BULLSTOCK.IN said...

CAN YOU PROVIDE ME REDYMADE MULTIPLE STOCK BOLLINGER BAND EXCEL WITH EDITABLE STADERD DEVIATION AND AVERAGE PERIOD? OR PZ SUGGEST WHERE I CAN FIND ABOVE THE SAME?

REGARD AND THANKS

Unknown said...

BULLSTOCK.IN, I can provide that. message me at manans2003@gmail.com