MaintenanceMarginParameters
QuantConnect.Securities.MaintenanceMarginParameters
MaintenanceMarginParameters(
security: Security,
quantity: float,
holdings_cost: float,
holdings_value: float,
)
Bases: Object
Parameters for IBuyingPowerModel.get_maintenance_margin
Initializes a new instance of the MaintenanceMarginParameters class
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
security
|
Security
|
The security |
required |
quantity
|
float
|
The quantity |
required |
holdings_cost
|
float
|
The holdings cost |
required |
holdings_value
|
float
|
The holdings value |
required |
quantity
quantity: float
Gets the quantity of the security
absolute_quantity
absolute_quantity: float
Gets the absolute quantity of the security
holdings_cost
holdings_cost: float
Gets the holdings cost of the security
absolute_holdings_cost
absolute_holdings_cost: float
Gets the absolute holdings cost of the security
holdings_value
holdings_value: float
Gets the holdings value of the security
absolute_holdings_value
absolute_holdings_value: float
Gets the absolute holdings value of the security
for_current_holdings
for_current_holdings(
security: Security,
) -> MaintenanceMarginParameters
Creates a new instance of the MaintenanceMarginParameters class to compute the maintenance margin required to support the algorithm's current holdings
for_quantity_at_current_price
for_quantity_at_current_price(
security: Security, quantity: float
) -> MaintenanceMarginParameters
Creates a new instance of the MaintenanceMarginParameters class to compute the maintenance margin required to support the specified quantity of holdings at current market prices
for_underlying
for_underlying(
quantity: float,
) -> MaintenanceMarginParameters
Creates a new instance of MaintenanceMarginParameters for the security's underlying