Hello guys,
I would like to thank QunatConnect developers for this amazing work und for making the framework open source.
I recently started working with it. Although I have some experience in OOP(Python, Java) I strugle to understand couple things.
I tested some simple strategies and they worked. So I desided to add some complexity and test more features of the QC Framework. I went through tutorials, and splitted my code into all core modules (Universe Selection, Alpha Creation, Portfolio Construction, Execution and Risk Management).
It is pretty hard to understand how the FramWork "breathes" in the background. Debugger is very rude as well.
I struggle to understand how consolidator works. Since self._openingBar is always None, it seems that it does not consolidate.
I had to instantiate SymbolData class in the main class, and pass instances to different modules where i need them.
If someone is ready to try to understand this mess, brave man, you are welcome to do so. Because I am at final point...
Shile Wen
Hi Sergej,
The problem is that self._openingBar is always None because the consolidator consolidates the data into 60 day bars instead of 60 minutes, so the if quoteBar.Time.hour == 9 condition is never met. To address this, we need to change
openRangeCons = algorithm.Consolidate(self.Symbol, timedelta(minutes), self.OnDataConsolidated)
toopenRangeCons = algorithm.Consolidate(self.Symbol, timedelta(minutes=minutes), self.OnDataConsolidated)
Please see the attached backtest/plot for reference.
Best,
Shile Wen
Sergej Gorev
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!