Hello everyone i just took a strategy from quantpedia where they apply pair trading using SMA, instead of using SMA i would like to replace it with a Boilinger band, the idea would be stock1-stock2=spread and initialize boilinger band as: self.Bolband = self.BB(self.spread, period_BB, 2, MovingAverageType.Simple, Resolution.Hour)
But im having some trouble to initialize the boilinger band any ideas on how to fix it??
Thanks
Louis Szeto
Hi Ro
We recommend you to use IndicatorExtension on setting up both the spread and the BB by:
Check out the docs for its usage.
Best
Louis
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Ro García G
Understood, And thanks so much for the answer but in which part of the code should i put it on, on the initalize part? or in the other functions i tryied running it but not working.
Vladimir
Ro García G
in which part of the code should i put it on, on the initalize part?
Try “Bollinger Bands of spread pair trading”
If you are satisfied with my answer, please accept it and don't forget to like it.
Ro García G
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!