Hello Everyone, I am seeking a method to make changes or to extend the existing in OptionStrategyPositionGroupBuyingPowerModel. I want to use this to calculate my margin requirements for different types of combinations. For example if there is a strategy which requires you to have 6 legs then I am not sure how to get benefits (hedge) of margin with respect to that strategy. For now, as far as I have understood, the existing BuyingPowerModel calculates the margin on security level instead of the strategy level (individual security without considering another leg of the strategy for hedge benefit).
But what if I have some strategies which are not predefined in the Lean Engine and I want to utilize that functionality? Is there a way around to extend the OptionStrategyPositionGroupBuyingPowerModel class as per my own definition and requirements?
What I want to do is to define a Strategy with the predefined legs, and OptionStrategyPositionGroupBuyingPowerModel to calculate the margin and Buying Power for that particular strategy (exactly like it works in the existing model but with an ability to extend it).
Ashutosh
Hi Chetan TyagiÂ
You can employ the following basic fundamental framework to extend OptionStrategyPositionGroupBuyingPowerModel according to your specific logical requirements.
Â
Let me know if this gave you any direction in building your logic!
Best,
Ashutosh
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.
Chetan Tyagi
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!