17 using MathNet.Numerics.Distributions;
41 : base(name, option, riskFreeRateModel, dividendYieldModel, mirrorOption, optionModel, ivModel)
56 : this($
"Vega({option},{mirrorOption},{GetOptionModel(optionModel, option.ID.OptionStyle)})", option, riskFreeRateModel,
57 dividendYieldModel, mirrorOption, optionModel, ivModel)
71 public Vega(
string name,
Symbol option, PyObject riskFreeRateModel, PyObject dividendYieldModel,
Symbol mirrorOption =
null,
73 : base(name, option, riskFreeRateModel, dividendYieldModel, mirrorOption, optionModel, ivModel)
86 public Vega(
Symbol option, PyObject riskFreeRateModel, PyObject dividendYieldModel,
Symbol mirrorOption =
null,
88 : this($
"Vega({option},{mirrorOption},{GetOptionModel(optionModel, option.ID.OptionStyle)})", option, riskFreeRateModel,
89 dividendYieldModel, mirrorOption, optionModel, ivModel)
105 : base(name, option, riskFreeRateModel, dividendYield, mirrorOption, optionModel, ivModel)
120 : this($
"Vega({option},{mirrorOption},{GetOptionModel(optionModel, option.ID.OptionStyle)})", option, riskFreeRateModel,
121 dividendYield, mirrorOption, optionModel, ivModel)
135 public Vega(
string name,
Symbol option, PyObject riskFreeRateModel, decimal dividendYield = 0.0m,
Symbol mirrorOption =
null,
137 : base(name, option, riskFreeRateModel, dividendYield, mirrorOption, optionModel, ivModel)
150 public Vega(
Symbol option, PyObject riskFreeRateModel, decimal dividendYield = 0.0m,
Symbol mirrorOption =
null,
152 : this($
"Vega({option},{mirrorOption},{GetOptionModel(optionModel, option.ID.OptionStyle)})", option, riskFreeRateModel,
153 dividendYield, mirrorOption, optionModel, ivModel)
167 public Vega(
string name,
Symbol option, decimal riskFreeRate = 0.05m, decimal dividendYield = 0.0m,
Symbol mirrorOption =
null,
169 : base(name, option, riskFreeRate, dividendYield, mirrorOption, optionModel, ivModel)
182 public Vega(
Symbol option, decimal riskFreeRate = 0.05m, decimal dividendYield = 0.0m,
Symbol mirrorOption =
null,
184 : this($
"Vega({option},{mirrorOption},{GetOptionModel(optionModel, option.ID.OptionStyle)})", option, riskFreeRate, dividendYield,
185 mirrorOption, optionModel, ivModel)
195 var strike = (
double)
Strike;
196 var timeTillExpiryDouble = (double)timeTillExpiry;
208 var deltaSigma = 0.01;
223 result = (newPrice - price) / deltaSigma / 100d;
228 var norm =
new Normal();
231 result = underlyingPrice * Math.Sqrt(timeTillExpiryDouble) * norm.Density(d1) * Math.Exp(-dividendYield * timeTillExpiryDouble) / 100d;
235 return Convert.ToDecimal(result);