ReservedBuyingPowerImpact
QuantConnect.Securities.Positions.ReservedBuyingPowerImpact
ReservedBuyingPowerImpact(
current: float,
contemplated: float,
impacted_groups: Sequence[IPositionGroup],
contemplated_changes: Sequence[IPosition],
contemplated_groups: Sequence[IPositionGroup],
)
Bases: Object
Specifies the impact on buying power from changing security holdings that affects current IPositionGroup, including the current reserved buying power, without the change, and a contemplate reserved buying power, which takes into account a contemplated change to the algorithm's positions that impacts current position groups.
Initializes a new instance of the ReservedBuyingPowerImpact class
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
current
|
float
|
The current reserved buying power for impacted groups |
required |
contemplated
|
float
|
The reserved buying power for impacted groups after applying the contemplated changes |
required |
impacted_groups
|
Sequence[IPositionGroup]
|
The groups impacted by the contemplated changes |
required |
contemplated_changes
|
Sequence[IPosition]
|
The position changes being contemplated |
required |
contemplated_groups
|
Sequence[IPositionGroup]
|
The groups resulting from applying the contemplated changes |
required |
current
current: float
Gets the current reserved buying power for the impacted groups
contemplated
contemplated: float
Gets the reserved buying power for groups resolved after applying a contemplated change to the impacted groups
delta
delta: float
Gets the change in reserved buying power, current minus contemplated
impacted_groups
impacted_groups: Sequence[IPositionGroup]
Gets the impacted groups used as the basis for these reserved buying power numbers
contemplated_changes
contemplated_changes: Sequence[IPosition]
Gets the position changes being contemplated
contemplated_groups
contemplated_groups: Sequence[IPositionGroup]
Gets the newly resolved groups resulting from applying the contemplated changes to the impacted groups