Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Create Bollinger Bands Indicator #3

Closed
jaredbroad opened this issue Jan 12, 2015 · 7 comments
Closed

[Feature] Create Bollinger Bands Indicator #3

jaredbroad opened this issue Jan 12, 2015 · 7 comments
Assignees
Labels

Comments

@jaredbroad
Copy link
Member

Create an "BollingerBand" indicator class and the associated "BB" helper method in the QCAlgorithm base class. See introduction to indicators - https://lean.quantconnect.com/docs#topic9.html

Add the associated tests to Tests project under /Indicators to confirm the Bollinger Bands match up with the data provided in Tests/TestData/spy_bollinger_bands.txt file.

@mourednik
Copy link
Contributor

I'm working on this now. I will also create a StandardDeviation indicator to be used by the BollingerBand indicator.

@mchandschuh
Copy link
Contributor

Wonderful! You'll be the first indicator contributor.

I couldn't agree more that making a StandardDeviation indicator is the way to go, and then using that in the BollingerBand indicator. Let me know if you have any questions about the design of the indicator system or anything else in Lean! Thanks!!

@mourednik
Copy link
Contributor

Thanks. So far, everything looks very sensible. I'll let you know if there's anything questionable.

@mourednik
Copy link
Contributor

@jaredbroad @mchandschuh
There is a problem with the test data.

spy_bollinger_bands.txt is missing the initial 50 rows, assuming that the moving average is a 50 period SMA. We need those 50 rows to initialize the SMA so that it matches the CSV. Are you able to easily generate a new CSV from somewhere?

Also, I added the en-US date format so that it can parse the CSV dates. That fixed two other failing tests.

@mchandschuh
Copy link
Contributor

b78398c updates the bollinger band data to be correct. The Bollinger Band (20, 2) uses a 20 period moving average and +- 2 standard deviations (also computed from 20 periods) from the mean for the upper and lower bands respectively. This data is generated using the FreeStockCharts.com desktop silverlight application's 'Export Chart' feature.

Thanks for fixing those tests! They were passing in Travis but, I suppose we need to be more aware of globalization concerns.

@mourednik
Copy link
Contributor

Thanks. Pull request submitted.

@jaredbroad
Copy link
Member Author

Closed by commit #1d912765, +5 kudos to @mourednik

@jaredbroad jaredbroad added this to the 100 Indicators milestone Mar 11, 2015
jaredbroad added a commit that referenced this issue Oct 8, 2015
StefanoRaggi pushed a commit to StefanoRaggi/Lean that referenced this issue Feb 25, 2021
…hange

Addition of the product type and trading segment configs
AlexCatarino pushed a commit to AlexCatarino/Lean that referenced this issue Nov 10, 2022
…reeks-with-iv

Fix Unit Test and Improve Comments
Martin-Molinero pushed a commit that referenced this issue Jul 24, 2023
* Adds IndicatorBatchUpdate

* Revert "Adds IndicatorBatchUpdate" (#3)

* Fixed minimum price variation for Futures ZL and HE
Martin-Molinero pushed a commit that referenced this issue Aug 8, 2023
* Adds IndicatorBatchUpdate

* Revert "Adds IndicatorBatchUpdate" (#3)

* Update symbol-properties-database.csv (#4)

Minimum price fluctuation for LE is supposed to be 0.00025 according to CME. (See also: https://www.cmegroup.com/markets/agriculture/livestock/live-cattle.contractSpecs.html)
Martin-Molinero added a commit that referenced this issue Apr 17, 2024
* raw pep8 conversion

* Minor fixes

---------

Co-authored-by: Martin Molinero <martin.molinero1@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants