Skip to content

IndicatorBasedOptionPriceModelProvider

QuantConnect.Indicators.IndicatorBasedOptionPriceModelProvider

IndicatorBasedOptionPriceModelProvider(
    securities: SecurityManager,
)

Bases: Object, IOptionPriceModelProvider

Provides option price models for option securities based on Lean's Greeks indicators

Creates a new instance of the IndicatorBasedOptionPriceModelProvider class

securities

securities: SecurityManager

Gets the security manager instance to use

get_option_price_model

get_option_price_model(
    symbol: Union[Symbol, str, BaseContract, Security],
    pricing_model_type: Optional[
        OptionPricingModelType
    ] = None,
) -> IOptionPriceModel
get_option_price_model(
    option_model: Optional[OptionPricingModelType] = None,
    iv_model: Optional[OptionPricingModelType] = None,
    dividend_yield_model: IDividendYieldModel = None,
    risk_free_interest_rate_model: IRiskFreeInterestRateModel = None,
    use_mirror_contract: bool = True,
) -> IOptionPriceModel

Signature descriptions:

  • Gets the option price model for the specified option symbol

  • Gets the option price model with the specified configuration

Parameters:

Name Type Description Default
symbol Optional[Union[Symbol, str, BaseContract, Security]]

The symbol

None
pricing_model_type Optional[Optional[OptionPricingModelType]]

The option pricing model type to use

None
option_model Optional[Optional[OptionPricingModelType]]

The option pricing model type to be used by the indicators

None
iv_model Optional[Optional[OptionPricingModelType]]

The option pricing model type to be used by the implied volatility indicator

None
dividend_yield_model Optional[IDividendYieldModel]

The dividend yield model to be used by the indicators

None
risk_free_interest_rate_model Optional[IRiskFreeInterestRateModel]

The risk free interest rate model to be used by the indicators

None
use_mirror_contract Optional[bool]

Whether to use the mirror contract when possible

True

Returns:

Type Description
IOptionPriceModel

The option price model for the given symbol.