BuyingPowerParameters
QuantConnect.Securities.BuyingPowerParameters
BuyingPowerParameters(
portfolio: SecurityPortfolioManager,
security: Security,
direction: OrderDirection,
)
Bases: Object
Defines the parameters for IBuyingPowerModel.get_buying_power
Initializes a new instance of the BuyingPowerParameters class
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
portfolio
|
SecurityPortfolioManager
|
The algorithm's portfolio |
required |
security
|
Security
|
The security |
required |
direction
|
OrderDirection
|
The direction to compute buying power in |
required |
result
result(buying_power: float, currency: str) -> BuyingPower
Creates the result using the specified buying power
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
buying_power
|
float
|
The buying power |
required |
currency
|
str
|
The units the buying power is denominated in |
required |
Returns:
| Type | Description |
|---|---|
BuyingPower
|
The buying power. |
result_in_account_currency
result_in_account_currency(
buying_power: float,
) -> BuyingPower
Creates the result using the specified buying power in units of the account currency
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
buying_power
|
float
|
The buying power |
required |
Returns:
| Type | Description |
|---|---|
BuyingPower
|
The buying power. |