Lean
$LEAN_TAG$
|
Class in charge of resolving option strategy groups which will use the OptionStrategyPositionGroupBuyingPowerModel More...
Public Member Functions | |
OptionStrategyPositionGroupResolver (SecurityManager securities) | |
Creates the default option strategy group resolver for OptionStrategyDefinitions.AllDefinitions More... | |
OptionStrategyPositionGroupResolver (SecurityManager securities, OptionStrategyMatcherOptions strategyMatcherOptions) | |
Creates a custom option strategy group resolver More... | |
bool | TryGroup (IReadOnlyCollection< IPosition > newPositions, PositionGroupCollection currentPositions, out IPositionGroup @group) |
Attempts to group the specified positions into a new IPositionGroup using an appropriate IPositionGroupBuyingPowerModel for position groups created via this resolver. More... | |
PositionGroupCollection | Resolve (PositionCollection positions) |
Resolves the position groups that exist within the specified collection of positions. More... | |
IEnumerable< IPositionGroup > | GetImpactedGroups (PositionGroupCollection groups, IReadOnlyCollection< IPosition > positions) |
Determines the position groups that would be evaluated for grouping of the specified positions were passed into the Resolve method. More... | |
Public Member Functions inherited from QuantConnect.Securities.Positions.IPositionGroupResolver | |
bool | TryGroup (IReadOnlyCollection< IPosition > newPositions, PositionGroupCollection currentPositions, out IPositionGroup group) |
Attempts to group the specified positions into a new IPositionGroup using an appropriate IPositionGroupBuyingPowerModel for position groups created via this resolver. More... | |
Class in charge of resolving option strategy groups which will use the OptionStrategyPositionGroupBuyingPowerModel
Definition at line 29 of file OptionStrategyPositionGroupResolver.cs.
QuantConnect.Securities.Positions.OptionStrategyPositionGroupResolver.OptionStrategyPositionGroupResolver | ( | SecurityManager | securities | ) |
Creates the default option strategy group resolver for OptionStrategyDefinitions.AllDefinitions
Definition at line 37 of file OptionStrategyPositionGroupResolver.cs.
QuantConnect.Securities.Positions.OptionStrategyPositionGroupResolver.OptionStrategyPositionGroupResolver | ( | SecurityManager | securities, |
OptionStrategyMatcherOptions | strategyMatcherOptions | ||
) |
Creates a custom option strategy group resolver
strategyMatcherOptions | The option strategy matcher options instance to use |
securities | The algorithms securities |
Definition at line 47 of file OptionStrategyPositionGroupResolver.cs.
bool QuantConnect.Securities.Positions.OptionStrategyPositionGroupResolver.TryGroup | ( | IReadOnlyCollection< IPosition > | newPositions, |
PositionGroupCollection | currentPositions, | ||
out IPositionGroup @ | group | ||
) |
Attempts to group the specified positions into a new IPositionGroup using an appropriate IPositionGroupBuyingPowerModel for position groups created via this resolver.
newPositions | The positions to be grouped |
currentPositions | The currently grouped positions |
group | The grouped positions when this resolver is able to, otherwise null |
Definition at line 62 of file OptionStrategyPositionGroupResolver.cs.
PositionGroupCollection QuantConnect.Securities.Positions.OptionStrategyPositionGroupResolver.Resolve | ( | PositionCollection | positions | ) |
Resolves the position groups that exist within the specified collection of positions.
positions | The collection of positions |
Implements QuantConnect.Securities.Positions.IPositionGroupResolver.
Definition at line 122 of file OptionStrategyPositionGroupResolver.cs.
IEnumerable<IPositionGroup> QuantConnect.Securities.Positions.OptionStrategyPositionGroupResolver.GetImpactedGroups | ( | PositionGroupCollection | groups, |
IReadOnlyCollection< IPosition > | positions | ||
) |
Determines the position groups that would be evaluated for grouping of the specified positions were passed into the Resolve method.
This function allows us to determine a set of impacted groups and run the resolver on just those groups in order to support what-if analysis
groups | The existing position groups |
positions | The positions being changed |
Implements QuantConnect.Securities.Positions.IPositionGroupResolver.
Definition at line 149 of file OptionStrategyPositionGroupResolver.cs.