Lean  $LEAN_TAG$
QuantConnect.Securities.Positions.IPositionGroupBuyingPowerModel Interface Reference

Represents a position group's model of buying power More...

Inheritance diagram for QuantConnect.Securities.Positions.IPositionGroupBuyingPowerModel:
[legend]

Public Member Functions

MaintenanceMargin GetMaintenanceMargin (PositionGroupMaintenanceMarginParameters parameters)
 Gets the margin currently allocated to the specified holding More...
 
InitialMargin GetInitialMarginRequirement (PositionGroupInitialMarginParameters parameters)
 The margin that must be held in order to increase the position by the provided quantity More...
 
InitialMargin GetInitialMarginRequiredForOrder (PositionGroupInitialMarginForOrderParameters parameters)
 Gets the total margin required to execute the specified order in units of the account currency including fees More...
 
ReservedBuyingPowerImpact GetReservedBuyingPowerImpact (ReservedBuyingPowerImpactParameters parameters)
 Computes the impact on the portfolio's buying power from adding the position group to the portfolio. This is a 'what if' analysis to determine what the state of the portfolio would be if these changes were applied. The delta (before - after) is the margin requirement for adding the positions and if the margin used after the changes are applied is less than the total portfolio value, this indicates sufficient capital. More...
 
HasSufficientBuyingPowerForOrderResult HasSufficientBuyingPowerForOrder (HasSufficientPositionGroupBuyingPowerForOrderParameters parameters)
 Check if there is sufficient buying power for the position group to execute this order. More...
 
ReservedBuyingPowerForPositionGroup GetReservedBuyingPowerForPositionGroup (ReservedBuyingPowerForPositionGroupParameters parameters)
 Computes the amount of buying power reserved by the provided position group More...
 
GetMaximumLotsResult GetMaximumLotsForTargetBuyingPower (GetMaximumLotsForTargetBuyingPowerParameters parameters)
 Get the maximum position group order quantity to obtain a position with a given buying power percentage. Will not take into account free buying power. More...
 
GetMaximumLotsResult GetMaximumLotsForDeltaBuyingPower (GetMaximumLotsForDeltaBuyingPowerParameters parameters)
 Get the maximum market position group order quantity to obtain a delta in the buying power used by a position group. The deltas sign defines the position side to apply it to, positive long, negative short. More...
 
PositionGroupBuyingPower GetPositionGroupBuyingPower (PositionGroupBuyingPowerParameters parameters)
 Gets the buying power available for a position group trade More...
 

Detailed Description

Represents a position group's model of buying power

Definition at line 23 of file IPositionGroupBuyingPowerModel.cs.

Member Function Documentation

◆ GetMaintenanceMargin()

MaintenanceMargin QuantConnect.Securities.Positions.IPositionGroupBuyingPowerModel.GetMaintenanceMargin ( PositionGroupMaintenanceMarginParameters  parameters)

Gets the margin currently allocated to the specified holding

Parameters
parametersAn object containing the security
Returns
The maintenance margin required for the

Implemented in QuantConnect.Securities.Positions.PositionGroupBuyingPowerModel, QuantConnect.Securities.Option.OptionStrategyPositionGroupBuyingPowerModel, and QuantConnect.Securities.Positions.SecurityPositionGroupBuyingPowerModel.

Here is the caller graph for this function:

◆ GetInitialMarginRequirement()

InitialMargin QuantConnect.Securities.Positions.IPositionGroupBuyingPowerModel.GetInitialMarginRequirement ( PositionGroupInitialMarginParameters  parameters)

The margin that must be held in order to increase the position by the provided quantity

Parameters
parametersAn object containing the security and quantity

Implemented in QuantConnect.Securities.Option.OptionStrategyPositionGroupBuyingPowerModel, QuantConnect.Securities.Positions.PositionGroupBuyingPowerModel, and QuantConnect.Securities.Positions.SecurityPositionGroupBuyingPowerModel.

Here is the caller graph for this function:

◆ GetInitialMarginRequiredForOrder()

InitialMargin QuantConnect.Securities.Positions.IPositionGroupBuyingPowerModel.GetInitialMarginRequiredForOrder ( PositionGroupInitialMarginForOrderParameters  parameters)

Gets the total margin required to execute the specified order in units of the account currency including fees

Parameters
parametersAn object containing the portfolio, the security and the order
Returns
The total margin in terms of the currency quoted in the order

Implemented in QuantConnect.Securities.Option.OptionStrategyPositionGroupBuyingPowerModel, QuantConnect.Securities.Positions.SecurityPositionGroupBuyingPowerModel, and QuantConnect.Securities.Positions.PositionGroupBuyingPowerModel.

Here is the caller graph for this function:

◆ GetReservedBuyingPowerImpact()

ReservedBuyingPowerImpact QuantConnect.Securities.Positions.IPositionGroupBuyingPowerModel.GetReservedBuyingPowerImpact ( ReservedBuyingPowerImpactParameters  parameters)

Computes the impact on the portfolio's buying power from adding the position group to the portfolio. This is a 'what if' analysis to determine what the state of the portfolio would be if these changes were applied. The delta (before - after) is the margin requirement for adding the positions and if the margin used after the changes are applied is less than the total portfolio value, this indicates sufficient capital.

Parameters
parametersAn object containing the portfolio and a position group containing the contemplated changes to the portfolio
Returns
Returns the portfolio's total portfolio value and margin used before and after the position changes are applied

Implemented in QuantConnect.Securities.Positions.PositionGroupBuyingPowerModel.

◆ HasSufficientBuyingPowerForOrder()

HasSufficientBuyingPowerForOrderResult QuantConnect.Securities.Positions.IPositionGroupBuyingPowerModel.HasSufficientBuyingPowerForOrder ( HasSufficientPositionGroupBuyingPowerForOrderParameters  parameters)

Check if there is sufficient buying power for the position group to execute this order.

Parameters
parametersAn object containing the portfolio, the position group and the order
Returns
Returns buying power information for an order against a position group

Implemented in QuantConnect.Securities.Positions.PositionGroupBuyingPowerModel, and QuantConnect.Securities.Positions.SecurityPositionGroupBuyingPowerModel.

Here is the caller graph for this function:

◆ GetReservedBuyingPowerForPositionGroup()

ReservedBuyingPowerForPositionGroup QuantConnect.Securities.Positions.IPositionGroupBuyingPowerModel.GetReservedBuyingPowerForPositionGroup ( ReservedBuyingPowerForPositionGroupParameters  parameters)

Computes the amount of buying power reserved by the provided position group

Implemented in QuantConnect.Securities.Positions.PositionGroupBuyingPowerModel.

Here is the caller graph for this function:

◆ GetMaximumLotsForTargetBuyingPower()

GetMaximumLotsResult QuantConnect.Securities.Positions.IPositionGroupBuyingPowerModel.GetMaximumLotsForTargetBuyingPower ( GetMaximumLotsForTargetBuyingPowerParameters  parameters)

Get the maximum position group order quantity to obtain a position with a given buying power percentage. Will not take into account free buying power.

Parameters
parametersAn object containing the portfolio, the position group and the target signed buying power percentage
Returns
Returns the maximum allowed market order quantity and if zero, also the reason

Implemented in QuantConnect.Securities.Positions.PositionGroupBuyingPowerModel, and QuantConnect.Securities.Positions.SecurityPositionGroupBuyingPowerModel.

Here is the caller graph for this function:

◆ GetMaximumLotsForDeltaBuyingPower()

GetMaximumLotsResult QuantConnect.Securities.Positions.IPositionGroupBuyingPowerModel.GetMaximumLotsForDeltaBuyingPower ( GetMaximumLotsForDeltaBuyingPowerParameters  parameters)

Get the maximum market position group order quantity to obtain a delta in the buying power used by a position group. The deltas sign defines the position side to apply it to, positive long, negative short.

Parameters
parametersAn object containing the portfolio, the position group and the delta buying power
Returns
Returns the maximum allowed market order quantity and if zero, also the reason

Used by the margin call model to reduce the position by a delta percent.

Implemented in QuantConnect.Securities.Positions.PositionGroupBuyingPowerModel, and QuantConnect.Securities.Positions.SecurityPositionGroupBuyingPowerModel.

◆ GetPositionGroupBuyingPower()

PositionGroupBuyingPower QuantConnect.Securities.Positions.IPositionGroupBuyingPowerModel.GetPositionGroupBuyingPower ( PositionGroupBuyingPowerParameters  parameters)

Gets the buying power available for a position group trade

Parameters
parametersA parameters object containing the algorithm's portfolio, security, and order direction
Returns
The buying power available for the trade

Implemented in QuantConnect.Securities.Positions.PositionGroupBuyingPowerModel.

Here is the caller graph for this function:

The documentation for this interface was generated from the following file: