Skip to content

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

security

security: Security

Gets the security

portfolio

Gets the algorithm's portfolio

direction

direction: OrderDirection

Gets the direction in which buying power is to be computed

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.