IndicatorVolatilityModel
QuantConnect.Securities.IndicatorVolatilityModel
IndicatorVolatilityModel(indicator: IIndicator)
IndicatorVolatilityModel(
indicator: IIndicator,
indicator_update: Callable[
[Security, BaseData, IIndicator], Any
],
)
Bases: BaseVolatilityModel
Provides an implementation of IVolatilityModel that uses an indicator to compute its value
Initializes a new instance of the IVolatilityModel using the specified indicator. The indicator is assumed to but updated externally from this model, such as being registered into the consolidator system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
indicator
|
IIndicator
|
The auto-updating indicator |
required |
indicator_update
|
Optional[Callable[[Security, BaseData, IIndicator], Any]]
|
Function delegate used to update the indicator on each call to update |
None
|
volatility
volatility: float
Gets the volatility of the security as a percentage
subscription_data_config_provider
subscription_data_config_provider: (
ISubscriptionDataConfigProvider
)
Provides access to registered SubscriptionDataConfig
This codeEntityType is protected.
update
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 |