Skip to content

GetMaximumOrderQuantityForTargetBuyingPowerParameters

QuantConnect.Securities.GetMaximumOrderQuantityForTargetBuyingPowerParameters

GetMaximumOrderQuantityForTargetBuyingPowerParameters(
    portfolio: SecurityPortfolioManager,
    security: Security,
    target_buying_power: float,
    minimum_order_margin_portfolio_percentage: float,
    silence_non_error_reasons: bool = False,
)

Bases: Object

Defines the parameters for IBuyingPowerModel.get_maximum_order_quantity_for_target_buying_power

Initializes a new instance of the GetMaximumOrderQuantityForTargetBuyingPowerParameters class

Parameters:

Name Type Description Default
portfolio SecurityPortfolioManager

The algorithm's portfolio

required
security Security

The security

required
target_buying_power float

The target percentage buying power

required
minimum_order_margin_portfolio_percentage float

Configurable minimum order margin portfolio percentage to ignore orders with unrealistic small sizes

required
silence_non_error_reasons bool

True will not return GetMaximumOrderQuantityResult.reason set for non error situation, this is for performance

False

portfolio

Gets the algorithm's portfolio

security

security: Security

Gets the security

target_buying_power

target_buying_power: float

Gets the target signed percentage buying power

silence_non_error_reasons

silence_non_error_reasons: bool

True enables the IBuyingPowerModel to skip setting GetMaximumOrderQuantityResult.reason for non error situations, for performance

minimum_order_margin_portfolio_percentage

minimum_order_margin_portfolio_percentage: float

Configurable minimum order margin portfolio percentage to ignore bad orders, orders with unrealistic small sizes