Lean  $LEAN_TAG$
QuantConnect.Indicators.OptionIndicatorBase Class Reference

To provide a base class for option indicator More...

Inheritance diagram for QuantConnect.Indicators.OptionIndicatorBase:
[legend]

Public Member Functions

override void Reset ()
 Resets this indicator and all sub-indicators More...
 

Public Attributes

DateTime Expiry => _optionSymbol.ID.Date
 Gets the expiration time of the option More...
 
OptionRight Right => _optionSymbol.ID.OptionRight
 Gets the option right (call/put) of the option More...
 
decimal Strike => _optionSymbol.ID.StrikePrice
 Gets the strike price of the option More...
 
OptionStyle Style => _optionSymbol.ID.OptionStyle
 Gets the option style (European/American) of the option More...
 
bool UseMirrorContract => _oppositeOptionSymbol != null
 Flag if mirror option is implemented for parity type calculation More...
 

Protected Member Functions

 OptionIndicatorBase (string name, Symbol option, IRiskFreeInterestRateModel riskFreeRateModel, IDividendYieldModel dividendYieldModel, Symbol mirrorOption=null, OptionPricingModelType optionModel=OptionPricingModelType.BlackScholes, int period=2)
 Initializes a new instance of the OptionIndicatorBase class More...
 

Protected Attributes

readonly Symbol _optionSymbol
 Option's symbol object More...
 
Symbol _underlyingSymbol => _optionSymbol.Underlying
 Underlying security's symbol object More...
 
OptionPricingModelType _optionModel
 Option pricing model used to calculate indicator More...
 
readonly IRiskFreeInterestRateModel _riskFreeInterestRateModel
 Risk-free rate model More...
 
readonly IDividendYieldModel _dividendYieldModel
 Dividend yield model, for continuous dividend yield More...
 

Properties

Symbol _oppositeOptionSymbol [get]
 Mirror option symbol (by option right), for implied volatility More...
 
Identity RiskFreeRate [get, set]
 Risk Free Rate More...
 
Identity DividendYield [get, set]
 Dividend Yield More...
 
IndicatorBase< IndicatorDataPointPrice [get]
 Gets the option price level More...
 
IndicatorBase< IndicatorDataPointOppositePrice [get]
 Gets the mirror option price level, for implied volatility More...
 
IndicatorBase< IndicatorDataPointUnderlyingPrice [get]
 Gets the underlying's price level More...
 
int WarmUpPeriod [get, set]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 
- Properties inherited from QuantConnect.Indicators.IIndicatorWarmUpPeriodProvider
int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 

Detailed Description

To provide a base class for option indicator

Definition at line 24 of file OptionIndicatorBase.cs.

Constructor & Destructor Documentation

◆ OptionIndicatorBase()

QuantConnect.Indicators.OptionIndicatorBase.OptionIndicatorBase ( string  name,
Symbol  option,
IRiskFreeInterestRateModel  riskFreeRateModel,
IDividendYieldModel  dividendYieldModel,
Symbol  mirrorOption = null,
OptionPricingModelType  optionModel = OptionPricingModelType.BlackScholes,
int  period = 2 
)
protected

Initializes a new instance of the OptionIndicatorBase class

Parameters
nameThe name of this indicator
optionThe option to be tracked
riskFreeRateModelRisk-free rate model
dividendYieldModelDividend yield model
mirrorOptionThe mirror option for parity calculation
periodThe lookback period of volatility
optionModelThe option pricing model used to estimate the Greek/IV

Definition at line 116 of file OptionIndicatorBase.cs.

Member Function Documentation

◆ Reset()

override void QuantConnect.Indicators.OptionIndicatorBase.Reset ( )

Resets this indicator and all sub-indicators

Definition at line 153 of file OptionIndicatorBase.cs.

Member Data Documentation

◆ _optionSymbol

readonly Symbol QuantConnect.Indicators.OptionIndicatorBase._optionSymbol
protected

Option's symbol object

Definition at line 29 of file OptionIndicatorBase.cs.

◆ _underlyingSymbol

Symbol QuantConnect.Indicators.OptionIndicatorBase._underlyingSymbol => _optionSymbol.Underlying
protected

Underlying security's symbol object

Definition at line 39 of file OptionIndicatorBase.cs.

◆ _optionModel

OptionPricingModelType QuantConnect.Indicators.OptionIndicatorBase._optionModel
protected

Option pricing model used to calculate indicator

Definition at line 44 of file OptionIndicatorBase.cs.

◆ _riskFreeInterestRateModel

readonly IRiskFreeInterestRateModel QuantConnect.Indicators.OptionIndicatorBase._riskFreeInterestRateModel
protected

Risk-free rate model

Definition at line 49 of file OptionIndicatorBase.cs.

◆ _dividendYieldModel

readonly IDividendYieldModel QuantConnect.Indicators.OptionIndicatorBase._dividendYieldModel
protected

Dividend yield model, for continuous dividend yield

Definition at line 54 of file OptionIndicatorBase.cs.

◆ Expiry

DateTime QuantConnect.Indicators.OptionIndicatorBase.Expiry => _optionSymbol.ID.Date

Gets the expiration time of the option

Definition at line 59 of file OptionIndicatorBase.cs.

◆ Right

OptionRight QuantConnect.Indicators.OptionIndicatorBase.Right => _optionSymbol.ID.OptionRight

Gets the option right (call/put) of the option

Definition at line 64 of file OptionIndicatorBase.cs.

◆ Strike

decimal QuantConnect.Indicators.OptionIndicatorBase.Strike => _optionSymbol.ID.StrikePrice

Gets the strike price of the option

Definition at line 69 of file OptionIndicatorBase.cs.

◆ Style

OptionStyle QuantConnect.Indicators.OptionIndicatorBase.Style => _optionSymbol.ID.OptionStyle

Gets the option style (European/American) of the option

Definition at line 74 of file OptionIndicatorBase.cs.

◆ UseMirrorContract

bool QuantConnect.Indicators.OptionIndicatorBase.UseMirrorContract => _oppositeOptionSymbol != null

Flag if mirror option is implemented for parity type calculation

Definition at line 104 of file OptionIndicatorBase.cs.

Property Documentation

◆ _oppositeOptionSymbol

Symbol QuantConnect.Indicators.OptionIndicatorBase._oppositeOptionSymbol
getprotected

Mirror option symbol (by option right), for implied volatility

Definition at line 34 of file OptionIndicatorBase.cs.

◆ RiskFreeRate

Identity QuantConnect.Indicators.OptionIndicatorBase.RiskFreeRate
getset

Risk Free Rate

Definition at line 79 of file OptionIndicatorBase.cs.

◆ DividendYield

Identity QuantConnect.Indicators.OptionIndicatorBase.DividendYield
getset

Dividend Yield

Definition at line 84 of file OptionIndicatorBase.cs.

◆ Price

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.OptionIndicatorBase.Price
get

Gets the option price level

Definition at line 89 of file OptionIndicatorBase.cs.

◆ OppositePrice

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.OptionIndicatorBase.OppositePrice
get

Gets the mirror option price level, for implied volatility

Definition at line 94 of file OptionIndicatorBase.cs.

◆ UnderlyingPrice

IndicatorBase<IndicatorDataPoint> QuantConnect.Indicators.OptionIndicatorBase.UnderlyingPrice
get

Gets the underlying's price level

Definition at line 99 of file OptionIndicatorBase.cs.

◆ WarmUpPeriod

int QuantConnect.Indicators.OptionIndicatorBase.WarmUpPeriod
getset

Required period, in data points, for the indicator to be ready and fully initialized.

Definition at line 148 of file OptionIndicatorBase.cs.


The documentation for this class was generated from the following file: