Lean  $LEAN_TAG$
QuantConnect.Securities.Positions.PositionGroupBuyingPowerModelExtensions Class Reference

Provides methods aimed at reducing the noise introduced from having result/parameter types for each method. These methods aim to accept raw arguments and return the desired value type directly. More...

Static Public Member Functions

static decimal GetMaintenanceMargin (this IPositionGroupBuyingPowerModel model, SecurityPortfolioManager portfolio, IPositionGroup positionGroup)
 Gets the margin currently allocated to the specified position group More...
 
static decimal GetInitialMarginRequirement (this IPositionGroupBuyingPowerModel model, SecurityPortfolioManager portfolio, IPositionGroup positionGroup)
 The margin that must be held in order to change positions by the changes defined by the provided position group More...
 
static decimal GetInitialMarginRequiredForOrder (this IPositionGroupBuyingPowerModel model, SecurityPortfolioManager portfolio, IPositionGroup positionGroup, Order order)
 Gets the total margin required to execute the specified order in units of the account currency including fees More...
 
static decimal GetReservedBuyingPowerForPositionGroup (this IPositionGroupBuyingPowerModel model, SecurityPortfolioManager portfolio, IPositionGroup positionGroup)
 Computes the amount of buying power reserved by the provided position group More...
 
static HasSufficientBuyingPowerForOrderResult HasSufficientBuyingPowerForOrder (this IPositionGroupBuyingPowerModel model, SecurityPortfolioManager portfolio, IPositionGroup positionGroup, List< Order > orders)
 Check if there is sufficient buying power for the position group to execute this order. More...
 
static PositionGroupBuyingPower GetPositionGroupBuyingPower (this IPositionGroupBuyingPowerModel model, SecurityPortfolioManager portfolio, IPositionGroup positionGroup, OrderDirection direction)
 Gets the buying power available for a position group trade More...
 

Detailed Description

Provides methods aimed at reducing the noise introduced from having result/parameter types for each method. These methods aim to accept raw arguments and return the desired value type directly.

Definition at line 25 of file PositionGroupBuyingPowerModelExtensions.cs.

Member Function Documentation

◆ GetMaintenanceMargin()

static decimal QuantConnect.Securities.Positions.PositionGroupBuyingPowerModelExtensions.GetMaintenanceMargin ( this IPositionGroupBuyingPowerModel  model,
SecurityPortfolioManager  portfolio,
IPositionGroup  positionGroup 
)
static

Gets the margin currently allocated to the specified position group

Definition at line 30 of file PositionGroupBuyingPowerModelExtensions.cs.

Here is the call graph for this function:

◆ GetInitialMarginRequirement()

static decimal QuantConnect.Securities.Positions.PositionGroupBuyingPowerModelExtensions.GetInitialMarginRequirement ( this IPositionGroupBuyingPowerModel  model,
SecurityPortfolioManager  portfolio,
IPositionGroup  positionGroup 
)
static

The margin that must be held in order to change positions by the changes defined by the provided position group

Definition at line 44 of file PositionGroupBuyingPowerModelExtensions.cs.

Here is the call graph for this function:

◆ GetInitialMarginRequiredForOrder()

static decimal QuantConnect.Securities.Positions.PositionGroupBuyingPowerModelExtensions.GetInitialMarginRequiredForOrder ( this IPositionGroupBuyingPowerModel  model,
SecurityPortfolioManager  portfolio,
IPositionGroup  positionGroup,
Order  order 
)
static

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

Definition at line 58 of file PositionGroupBuyingPowerModelExtensions.cs.

Here is the call graph for this function:

◆ GetReservedBuyingPowerForPositionGroup()

static decimal QuantConnect.Securities.Positions.PositionGroupBuyingPowerModelExtensions.GetReservedBuyingPowerForPositionGroup ( this IPositionGroupBuyingPowerModel  model,
SecurityPortfolioManager  portfolio,
IPositionGroup  positionGroup 
)
static

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

Definition at line 73 of file PositionGroupBuyingPowerModelExtensions.cs.

Here is the call graph for this function:

◆ HasSufficientBuyingPowerForOrder()

static HasSufficientBuyingPowerForOrderResult QuantConnect.Securities.Positions.PositionGroupBuyingPowerModelExtensions.HasSufficientBuyingPowerForOrder ( this IPositionGroupBuyingPowerModel  model,
SecurityPortfolioManager  portfolio,
IPositionGroup  positionGroup,
List< Order orders 
)
static

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

Definition at line 87 of file PositionGroupBuyingPowerModelExtensions.cs.

Here is the call graph for this function:

◆ GetPositionGroupBuyingPower()

static PositionGroupBuyingPower QuantConnect.Securities.Positions.PositionGroupBuyingPowerModelExtensions.GetPositionGroupBuyingPower ( this IPositionGroupBuyingPowerModel  model,
SecurityPortfolioManager  portfolio,
IPositionGroup  positionGroup,
OrderDirection  direction 
)
static

Gets the buying power available for a position group trade

Definition at line 102 of file PositionGroupBuyingPowerModelExtensions.cs.

Here is the call graph for this function:

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