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).