Lean  $LEAN_TAG$
QuantConnect.Indicators.OptionGreeksIndicatorBase Class Reference

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

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

Public Member Functions

override void Reset ()
 Resets this indicator and all sub-indicators More...
 
- Public Member Functions inherited from QuantConnect.Indicators.OptionIndicatorBase
override void Reset ()
 Resets this indicator and all sub-indicators More...
 

Public Attributes

override bool IsReady => ImpliedVolatility.IsReady
 Gets a flag indicating when this indicator is ready and fully initialized More...
 
- Public Attributes inherited from QuantConnect.Indicators.OptionIndicatorBase
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

 OptionGreeksIndicatorBase (string name, Symbol option, IRiskFreeInterestRateModel riskFreeRateModel, IDividendYieldModel dividendYieldModel, Symbol mirrorOption=null, OptionPricingModelType optionModel=OptionPricingModelType.BlackScholes, OptionPricingModelType? ivModel=null, int period=2)
 Initializes a new instance of the OptionGreeksIndicatorBase class More...
 
 OptionGreeksIndicatorBase (string name, Symbol option, IRiskFreeInterestRateModel riskFreeRateModel, decimal dividendYield=0.0m, Symbol mirrorOption=null, OptionPricingModelType optionModel=OptionPricingModelType.BlackScholes, OptionPricingModelType? ivModel=null, int period=2)
 Initializes a new instance of the OptionGreeksIndicatorBase class More...
 
 OptionGreeksIndicatorBase (string name, Symbol option, decimal riskFreeRate=0.05m, decimal dividendYield=0.0m, Symbol mirrorOption=null, OptionPricingModelType optionModel=OptionPricingModelType.BlackScholes, OptionPricingModelType? ivModel=null, int period=2)
 Initializes a new instance of the OptionGreeksIndicatorBase class More...
 
 OptionGreeksIndicatorBase (string name, Symbol option, PyObject riskFreeRateModel, PyObject dividendYieldModel, Symbol mirrorOption=null, OptionPricingModelType optionModel=OptionPricingModelType.BlackScholes, OptionPricingModelType? ivModel=null, int period=2)
 Initializes a new instance of the OptionGreeksIndicatorBase class More...
 
 OptionGreeksIndicatorBase (string name, Symbol option, PyObject riskFreeRateModel, decimal dividendYield=0.0m, Symbol mirrorOption=null, OptionPricingModelType optionModel=OptionPricingModelType.BlackScholes, OptionPricingModelType? ivModel=null, int period=2)
 Initializes a new instance of the OptionGreeksIndicatorBase class More...
 
override decimal ComputeNextValue (IndicatorDataPoint input)
 Computes the next value of the option greek indicator More...
 
virtual decimal CalculateGreek (decimal timeTillExpiry)
 
- Protected Member Functions inherited from QuantConnect.Indicators.OptionIndicatorBase
 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

decimal _greekValue
 Cache of the current value of the greek More...
 
- Protected Attributes inherited from QuantConnect.Indicators.OptionIndicatorBase
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

ImpliedVolatility ImpliedVolatility [get, set]
 Gets the implied volatility of the option More...
 
- Properties inherited from QuantConnect.Indicators.OptionIndicatorBase
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 greeks indicator

Definition at line 26 of file OptionGreekIndicatorBase.cs.

Constructor & Destructor Documentation

◆ OptionGreeksIndicatorBase() [1/5]

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

Initializes a new instance of the OptionGreeksIndicatorBase 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
optionModelThe option pricing model used to estimate the Greek
ivModelThe option pricing model used to estimate IV
periodThe lookback period of historical volatility

Definition at line 49 of file OptionGreekIndicatorBase.cs.

◆ OptionGreeksIndicatorBase() [2/5]

QuantConnect.Indicators.OptionGreeksIndicatorBase.OptionGreeksIndicatorBase ( string  name,
Symbol  option,
IRiskFreeInterestRateModel  riskFreeRateModel,
decimal  dividendYield = 0.0m,
Symbol  mirrorOption = null,
OptionPricingModelType  optionModel = OptionPricingModelType.BlackScholes,
OptionPricingModelType ivModel = null,
int  period = 2 
)
protected

Initializes a new instance of the OptionGreeksIndicatorBase class

Parameters
nameThe name of this indicator
optionThe option to be tracked
riskFreeRateModelRisk-free rate model
dividendYieldDividend yield, as a constant
mirrorOptionThe mirror option for parity calculation
optionModelThe option pricing model used to estimate the Greek
ivModelThe option pricing model used to estimate IV
periodThe lookback period of historical volatility

Definition at line 69 of file OptionGreekIndicatorBase.cs.

◆ OptionGreeksIndicatorBase() [3/5]

QuantConnect.Indicators.OptionGreeksIndicatorBase.OptionGreeksIndicatorBase ( string  name,
Symbol  option,
decimal  riskFreeRate = 0.05m,
decimal  dividendYield = 0.0m,
Symbol  mirrorOption = null,
OptionPricingModelType  optionModel = OptionPricingModelType.BlackScholes,
OptionPricingModelType ivModel = null,
int  period = 2 
)
protected

Initializes a new instance of the OptionGreeksIndicatorBase class

Parameters
nameThe name of this indicator
optionThe option to be tracked
riskFreeRateRisk-free rate, as a constant
dividendYieldDividend yield, as a constant
mirrorOptionThe mirror option for parity calculation
optionModelThe option pricing model used to estimate the Greek
ivModelThe option pricing model used to estimate IV
periodThe lookback period of historical volatility

Definition at line 86 of file OptionGreekIndicatorBase.cs.

◆ OptionGreeksIndicatorBase() [4/5]

QuantConnect.Indicators.OptionGreeksIndicatorBase.OptionGreeksIndicatorBase ( string  name,
Symbol  option,
PyObject  riskFreeRateModel,
PyObject  dividendYieldModel,
Symbol  mirrorOption = null,
OptionPricingModelType  optionModel = OptionPricingModelType.BlackScholes,
OptionPricingModelType ivModel = null,
int  period = 2 
)
protected

Initializes a new instance of the OptionGreeksIndicatorBase 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
optionModelThe option pricing model used to estimate the Greek
ivModelThe option pricing model used to estimate IV
periodThe lookback period of historical volatility

Definition at line 104 of file OptionGreekIndicatorBase.cs.

◆ OptionGreeksIndicatorBase() [5/5]

QuantConnect.Indicators.OptionGreeksIndicatorBase.OptionGreeksIndicatorBase ( string  name,
Symbol  option,
PyObject  riskFreeRateModel,
decimal  dividendYield = 0.0m,
Symbol  mirrorOption = null,
OptionPricingModelType  optionModel = OptionPricingModelType.BlackScholes,
OptionPricingModelType ivModel = null,
int  period = 2 
)
protected

Initializes a new instance of the OptionGreeksIndicatorBase class

Parameters
nameThe name of this indicator
optionThe option to be tracked
riskFreeRateModelRisk-free rate model
dividendYieldDividend yield, as a constant
mirrorOptionThe mirror option for parity calculation
optionModelThe option pricing model used to estimate the Greek
ivModelThe option pricing model used to estimate IV
periodThe lookback period of historical volatility

Definition at line 122 of file OptionGreekIndicatorBase.cs.

Member Function Documentation

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.OptionGreeksIndicatorBase.ComputeNextValue ( IndicatorDataPoint  input)
protected

Computes the next value of the option greek indicator

Parameters
inputThe input given to the indicator
Returns
The input is returned unmodified.

Definition at line 139 of file OptionGreekIndicatorBase.cs.

Here is the call graph for this function:

◆ Reset()

override void QuantConnect.Indicators.OptionGreeksIndicatorBase.Reset ( )

Resets this indicator and all sub-indicators

Definition at line 193 of file OptionGreekIndicatorBase.cs.

Here is the call graph for this function:

Member Data Documentation

◆ _greekValue

decimal QuantConnect.Indicators.OptionGreeksIndicatorBase._greekValue
protected

Cache of the current value of the greek

Definition at line 31 of file OptionGreekIndicatorBase.cs.

◆ IsReady

override bool QuantConnect.Indicators.OptionGreeksIndicatorBase.IsReady => ImpliedVolatility.IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Definition at line 132 of file OptionGreekIndicatorBase.cs.

Property Documentation

◆ ImpliedVolatility

ImpliedVolatility QuantConnect.Indicators.OptionGreeksIndicatorBase.ImpliedVolatility
getset

Gets the implied volatility of the option

Definition at line 36 of file OptionGreekIndicatorBase.cs.


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