Lean
$LEAN_TAG$
|
To provide a base class for option indicator More...
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< IndicatorDataPoint > | Price [get] |
Gets the option price level More... | |
IndicatorBase< IndicatorDataPoint > | OppositePrice [get] |
Gets the mirror option price level, for implied volatility More... | |
IndicatorBase< IndicatorDataPoint > | UnderlyingPrice [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... | |
To provide a base class for option indicator
Definition at line 24 of file OptionIndicatorBase.cs.
|
protected |
Initializes a new instance of the OptionIndicatorBase class
name | The name of this indicator |
option | The option to be tracked |
riskFreeRateModel | Risk-free rate model |
dividendYieldModel | Dividend yield model |
mirrorOption | The mirror option for parity calculation |
period | The lookback period of volatility |
optionModel | The option pricing model used to estimate the Greek/IV |
Definition at line 116 of file OptionIndicatorBase.cs.
override void QuantConnect.Indicators.OptionIndicatorBase.Reset | ( | ) |
Resets this indicator and all sub-indicators
Definition at line 153 of file OptionIndicatorBase.cs.
|
protected |
Option's symbol object
Definition at line 29 of file OptionIndicatorBase.cs.
|
protected |
Underlying security's symbol object
Definition at line 39 of file OptionIndicatorBase.cs.
|
protected |
Option pricing model used to calculate indicator
Definition at line 44 of file OptionIndicatorBase.cs.
|
protected |
Risk-free rate model
Definition at line 49 of file OptionIndicatorBase.cs.
|
protected |
Dividend yield model, for continuous dividend yield
Definition at line 54 of file OptionIndicatorBase.cs.
DateTime QuantConnect.Indicators.OptionIndicatorBase.Expiry => _optionSymbol.ID.Date |
Gets the expiration time of the option
Definition at line 59 of file OptionIndicatorBase.cs.
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.
decimal QuantConnect.Indicators.OptionIndicatorBase.Strike => _optionSymbol.ID.StrikePrice |
Gets the strike price of the option
Definition at line 69 of file OptionIndicatorBase.cs.
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.
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.
|
getprotected |
Mirror option symbol (by option right), for implied volatility
Definition at line 34 of file OptionIndicatorBase.cs.
|
getset |
Risk Free Rate
Definition at line 79 of file OptionIndicatorBase.cs.
|
getset |
Dividend Yield
Definition at line 84 of file OptionIndicatorBase.cs.
|
get |
Gets the option price level
Definition at line 89 of file OptionIndicatorBase.cs.
|
get |
Gets the mirror option price level, for implied volatility
Definition at line 94 of file OptionIndicatorBase.cs.
|
get |
Gets the underlying's price level
Definition at line 99 of file OptionIndicatorBase.cs.
|
getset |
Required period, in data points, for the indicator to be ready and fully initialized.
Definition at line 148 of file OptionIndicatorBase.cs.