Python-for-Data-Science icon indicating copy to clipboard operation
Python-for-Data-Science copied to clipboard

Bollinger Band code needs some minor rework

Open RichardDale opened this issue 6 years ago • 1 comments

Inside Bollinger Bands Tutorial.py, there's some minor rework required.

item[’30 Day STD’] = item[‘Adj Close’].rolling(window=20).std()

should become

item[’30 Day STD’] = item[‘Adj Close’].rolling(window=20).std(ddof=0) (this is because the standard deviation is being calculated against a population, not a sample)

Hope that is of assistance.

Cheers, Richard.

RichardDale avatar Dec 03 '19 12:12 RichardDale

@RichardDale how about making a pull request with the fix? I will credit you in the post as soon as it is merged.

PyDataBlog avatar Jan 07 '20 12:01 PyDataBlog