Lean
$LEAN_TAG$
|
Implied Volatility indicator that calculate the IV of an option using Black-Scholes Model More...
Public Member Functions | |
ImpliedVolatility (string name, Symbol option, IRiskFreeInterestRateModel riskFreeRateModel, IDividendYieldModel dividendYieldModel, Symbol mirrorOption=null, OptionPricingModelType? optionModel=null) | |
Initializes a new instance of the ImpliedVolatility class More... | |
ImpliedVolatility (Symbol option, IRiskFreeInterestRateModel riskFreeRateModel, IDividendYieldModel dividendYieldModel, Symbol mirrorOption=null, OptionPricingModelType? optionModel=null) | |
Initializes a new instance of the ImpliedVolatility class More... | |
ImpliedVolatility (string name, Symbol option, PyObject riskFreeRateModel, PyObject dividendYieldModel, Symbol mirrorOption=null, OptionPricingModelType? optionModel=null) | |
Initializes a new instance of the ImpliedVolatility class More... | |
ImpliedVolatility (Symbol option, PyObject riskFreeRateModel, PyObject dividendYieldModel, Symbol mirrorOption=null, OptionPricingModelType? optionModel=null) | |
Initializes a new instance of the ImpliedVolatility class More... | |
ImpliedVolatility (string name, Symbol option, IRiskFreeInterestRateModel riskFreeRateModel, decimal dividendYield=0.0m, Symbol mirrorOption=null, OptionPricingModelType? optionModel=null) | |
Initializes a new instance of the ImpliedVolatility class More... | |
ImpliedVolatility (Symbol option, IRiskFreeInterestRateModel riskFreeRateModel, decimal dividendYield=0.0m, Symbol mirrorOption=null, OptionPricingModelType? optionModel=null) | |
Initializes a new instance of the ImpliedVolatility class More... | |
ImpliedVolatility (string name, Symbol option, PyObject riskFreeRateModel, decimal dividendYield=0.0m, Symbol mirrorOption=null, OptionPricingModelType? optionModel=null) | |
Initializes a new instance of the ImpliedVolatility class More... | |
ImpliedVolatility (Symbol option, PyObject riskFreeRateModel, decimal dividendYield=0.0m, Symbol mirrorOption=null, OptionPricingModelType? optionModel=null) | |
Initializes a new instance of the ImpliedVolatility class More... | |
ImpliedVolatility (string name, Symbol option, decimal riskFreeRate=0.05m, decimal dividendYield=0.0m, Symbol mirrorOption=null, OptionPricingModelType? optionModel=null) | |
Initializes a new instance of the ImpliedVolatility class More... | |
ImpliedVolatility (Symbol option, decimal riskFreeRate=0.05m, decimal dividendYield=0.0m, Symbol mirrorOption=null, OptionPricingModelType? optionModel=null) | |
Initializes a new instance of the ImpliedVolatility class More... | |
void | SetSmoothingFunction (Func< decimal, decimal, decimal > function) |
Set the smoothing function of IV, using both call and put IV value More... | |
void | SetSmoothingFunction (PyObject function) |
Set the smoothing function of IV, using both call and put IV value 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 => UseMirrorContract ? _isReady && Price.Current.Time == OppositePrice.Current.Time && OppositePrice.IsReady : _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 | |
override decimal | Calculate (IndicatorDataPoint input) |
Computes the next value More... | |
virtual decimal | CalculateIV (decimal timeTillExpiry) |
Computes the IV of the option More... | |
Protected Member Functions inherited from QuantConnect.Indicators.OptionIndicatorBase | |
OptionIndicatorBase (string name, Symbol option, IRiskFreeInterestRateModel riskFreeRateModel, IDividendYieldModel dividendYieldModel, Symbol mirrorOption=null, OptionPricingModelType? optionModel=null, int period=2) | |
Initializes a new instance of the OptionIndicatorBase class More... | |
override decimal | ComputeNextValue (IndicatorDataPoint input) |
Computes the next value of this indicator from the given state. This will round the result to 7 decimal places. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from QuantConnect.Indicators.OptionIndicatorBase | |
static OptionPricingModelType | GetOptionModel (OptionPricingModelType? optionModel, OptionStyle optionStyle) |
Gets the option pricing model based on the option style, if not specified More... | |
Protected Attributes inherited from QuantConnect.Indicators.OptionIndicatorBase | |
Symbol | _underlyingSymbol => OptionSymbol.Underlying |
Underlying security's symbol object More... | |
Properties inherited from QuantConnect.Indicators.OptionIndicatorBase | |
Symbol | OptionSymbol [get] |
Option's symbol object More... | |
Symbol | _oppositeOptionSymbol [get] |
Mirror option symbol (by option right), for implied volatility More... | |
OptionPricingModelType | _optionModel [get, set] |
Option pricing model used to calculate indicator More... | |
IRiskFreeInterestRateModel | _riskFreeInterestRateModel [get] |
Risk-free rate model More... | |
IDividendYieldModel | _dividendYieldModel [get] |
Dividend yield model, for continuous dividend yield 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... | |
Implied Volatility indicator that calculate the IV of an option using Black-Scholes Model
Definition at line 29 of file ImpliedVolatility.cs.
QuantConnect.Indicators.ImpliedVolatility.ImpliedVolatility | ( | string | name, |
Symbol | option, | ||
IRiskFreeInterestRateModel | riskFreeRateModel, | ||
IDividendYieldModel | dividendYieldModel, | ||
Symbol | mirrorOption = null , |
||
OptionPricingModelType? | optionModel = null |
||
) |
Initializes a new instance of the ImpliedVolatility 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 |
optionModel | The option pricing model used to estimate IV |
Definition at line 43 of file ImpliedVolatility.cs.
QuantConnect.Indicators.ImpliedVolatility.ImpliedVolatility | ( | Symbol | option, |
IRiskFreeInterestRateModel | riskFreeRateModel, | ||
IDividendYieldModel | dividendYieldModel, | ||
Symbol | mirrorOption = null , |
||
OptionPricingModelType? | optionModel = null |
||
) |
Initializes a new instance of the ImpliedVolatility class
option | The option to be tracked |
riskFreeRateModel | Risk-free rate model |
dividendYieldModel | Dividend yield model |
mirrorOption | The mirror option for parity calculation |
optionModel | The option pricing model used to estimate IV |
Definition at line 76 of file ImpliedVolatility.cs.
QuantConnect.Indicators.ImpliedVolatility.ImpliedVolatility | ( | string | name, |
Symbol | option, | ||
PyObject | riskFreeRateModel, | ||
PyObject | dividendYieldModel, | ||
Symbol | mirrorOption = null , |
||
OptionPricingModelType? | optionModel = null |
||
) |
Initializes a new instance of the ImpliedVolatility 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 |
optionModel | The option pricing model used to estimate IV |
Definition at line 92 of file ImpliedVolatility.cs.
QuantConnect.Indicators.ImpliedVolatility.ImpliedVolatility | ( | Symbol | option, |
PyObject | riskFreeRateModel, | ||
PyObject | dividendYieldModel, | ||
Symbol | mirrorOption = null , |
||
OptionPricingModelType? | optionModel = null |
||
) |
Initializes a new instance of the ImpliedVolatility class
option | The option to be tracked |
riskFreeRateModel | Risk-free rate model |
dividendYieldModel | Dividend yield model |
mirrorOption | The mirror option for parity calculation |
optionModel | The option pricing model used to estimate IV |
Definition at line 107 of file ImpliedVolatility.cs.
QuantConnect.Indicators.ImpliedVolatility.ImpliedVolatility | ( | string | name, |
Symbol | option, | ||
IRiskFreeInterestRateModel | riskFreeRateModel, | ||
decimal | dividendYield = 0.0m , |
||
Symbol | mirrorOption = null , |
||
OptionPricingModelType? | optionModel = null |
||
) |
Initializes a new instance of the ImpliedVolatility class
name | The name of this indicator |
option | The option to be tracked |
riskFreeRateModel | Risk-free rate model |
dividendYield | Dividend yield, as a constant |
mirrorOption | The mirror option for parity calculation |
optionModel | The option pricing model used to estimate IV |
Definition at line 123 of file ImpliedVolatility.cs.
QuantConnect.Indicators.ImpliedVolatility.ImpliedVolatility | ( | Symbol | option, |
IRiskFreeInterestRateModel | riskFreeRateModel, | ||
decimal | dividendYield = 0.0m , |
||
Symbol | mirrorOption = null , |
||
OptionPricingModelType? | optionModel = null |
||
) |
Initializes a new instance of the ImpliedVolatility class
option | The option to be tracked |
riskFreeRateModel | Risk-free rate model |
dividendYield | Dividend yield, as a constant |
mirrorOption | The mirror option for parity calculation |
optionModel | The option pricing model used to estimate IV |
Definition at line 137 of file ImpliedVolatility.cs.
QuantConnect.Indicators.ImpliedVolatility.ImpliedVolatility | ( | string | name, |
Symbol | option, | ||
PyObject | riskFreeRateModel, | ||
decimal | dividendYield = 0.0m , |
||
Symbol | mirrorOption = null , |
||
OptionPricingModelType? | optionModel = null |
||
) |
Initializes a new instance of the ImpliedVolatility class
name | The name of this indicator |
option | The option to be tracked |
riskFreeRateModel | Risk-free rate model |
dividendYield | Dividend yield, as a constant |
mirrorOption | The mirror option for parity calculation |
optionModel | The option pricing model used to estimate IV |
Definition at line 153 of file ImpliedVolatility.cs.
QuantConnect.Indicators.ImpliedVolatility.ImpliedVolatility | ( | Symbol | option, |
PyObject | riskFreeRateModel, | ||
decimal | dividendYield = 0.0m , |
||
Symbol | mirrorOption = null , |
||
OptionPricingModelType? | optionModel = null |
||
) |
Initializes a new instance of the ImpliedVolatility class
option | The option to be tracked |
riskFreeRateModel | Risk-free rate model |
dividendYield | Dividend yield, as a constant |
mirrorOption | The mirror option for parity calculation |
optionModel | The option pricing model used to estimate IV |
Definition at line 168 of file ImpliedVolatility.cs.
QuantConnect.Indicators.ImpliedVolatility.ImpliedVolatility | ( | string | name, |
Symbol | option, | ||
decimal | riskFreeRate = 0.05m , |
||
decimal | dividendYield = 0.0m , |
||
Symbol | mirrorOption = null , |
||
OptionPricingModelType? | optionModel = null |
||
) |
Initializes a new instance of the ImpliedVolatility class
name | The name of this indicator |
option | The option to be tracked |
riskFreeRate | Risk-free rate, as a constant |
dividendYield | Dividend yield, as a constant |
mirrorOption | The mirror option for parity calculation |
optionModel | The option pricing model used to estimate IV |
Definition at line 184 of file ImpliedVolatility.cs.
QuantConnect.Indicators.ImpliedVolatility.ImpliedVolatility | ( | Symbol | option, |
decimal | riskFreeRate = 0.05m , |
||
decimal | dividendYield = 0.0m , |
||
Symbol | mirrorOption = null , |
||
OptionPricingModelType? | optionModel = null |
||
) |
Initializes a new instance of the ImpliedVolatility class
option | The option to be tracked |
riskFreeRate | Risk-free rate, as a constant |
dividendYield | Dividend yield, as a constant |
mirrorOption | The mirror option for parity calculation |
optionModel | The option pricing model used to estimate IV |
Definition at line 198 of file ImpliedVolatility.cs.
void QuantConnect.Indicators.ImpliedVolatility.SetSmoothingFunction | ( | Func< decimal, decimal, decimal > | function | ) |
Set the smoothing function of IV, using both call and put IV value
function | the smoothing function |
Definition at line 209 of file ImpliedVolatility.cs.
void QuantConnect.Indicators.ImpliedVolatility.SetSmoothingFunction | ( | PyObject | function | ) |
Set the smoothing function of IV, using both call and put IV value
function | the smoothing function |
Definition at line 218 of file ImpliedVolatility.cs.
|
protectedvirtual |
Computes the next value
input | The input given to the indicator |
Implements QuantConnect.Indicators.OptionIndicatorBase.
Definition at line 235 of file ImpliedVolatility.cs.
|
protectedvirtual |
Computes the IV of the option
timeTillExpiry | the time until expiration in years |
Definition at line 298 of file ImpliedVolatility.cs.
override bool QuantConnect.Indicators.ImpliedVolatility.IsReady => UseMirrorContract ? _isReady && Price.Current.Time == OppositePrice.Current.Time && OppositePrice.IsReady : _isReady |
Gets a flag indicating when this indicator is ready and fully initialized
Definition at line 228 of file ImpliedVolatility.cs.