Skip to content

BaseVolatilityModel

QuantConnect.Securities.Volatility.BaseVolatilityModel

Bases: Object, IVolatilityModel

Represents a base model that computes the volatility of a security

subscription_data_config_provider

subscription_data_config_provider: (
    ISubscriptionDataConfigProvider
)

Provides access to registered SubscriptionDataConfig

This codeEntityType is protected.

volatility

volatility: float

Gets the volatility of the security as a percentage

get_history_requirements

get_history_requirements(
    security: Security, utc_time: Union[datetime, date]
) -> Iterable[HistoryRequest]
get_history_requirements(
    security: Security,
    utc_time: Union[datetime, date],
    resolution: Optional[Resolution],
    bar_count: int,
) -> Iterable[HistoryRequest]

Signature descriptions:

  • Returns history requirements for the volatility model expressed in the form of history request

  • Gets history requests required for warming up the greeks with the provided resolution

Parameters:

Name Type Description Default
security Security

The security of the request

required
utc_time Union[datetime, date]

The date/time of the request

required
resolution Optional[Optional[Resolution]]

Resolution of the security

None
bar_count Optional[int]

Number of bars to lookback for the start date

None

Returns:

Type Description
Iterable[HistoryRequest]

Depends on the signature used. Case 1: [History request object list, or empty if no requirements.]; Case 2: [Enumerable of history requests.]

set_subscription_data_config_provider

set_subscription_data_config_provider(
    subscription_data_config_provider: ISubscriptionDataConfigProvider,
) -> None

Sets the ISubscriptionDataConfigProvider instance to use.

Parameters:

Name Type Description Default
subscription_data_config_provider ISubscriptionDataConfigProvider

Provides access to registered SubscriptionDataConfig

required

update

update(security: Security, data: BaseData) -> None

Updates this model using the new price information in the specified security instance

Parameters:

Name Type Description Default
security Security

The security to calculate volatility for

required
data BaseData

The new data used to update the model

required