17 using MathNet.Numerics.Distributions;
41 : base(name, option, riskFreeRateModel, dividendYieldModel, mirrorOption, optionModel, ivModel)
56 : this($
"Delta({option},{mirrorOption},{GetOptionModel(optionModel, option.ID.OptionStyle)})", option, riskFreeRateModel,
57 dividendYieldModel, mirrorOption, optionModel, ivModel)
71 public Delta(
string name,
Symbol option, PyObject riskFreeRateModel, PyObject dividendYieldModel,
Symbol mirrorOption =
null,
73 : base(name, option, riskFreeRateModel, dividendYieldModel, mirrorOption, optionModel, ivModel)
86 public Delta(
Symbol option, PyObject riskFreeRateModel, PyObject dividendYieldModel,
Symbol mirrorOption =
null,
88 : this($
"Delta({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($
"Delta({option},{mirrorOption},{GetOptionModel(optionModel, option.ID.OptionStyle)})", option, riskFreeRateModel,
121 dividendYield, mirrorOption, optionModel, ivModel)
135 public Delta(
string name,
Symbol option, PyObject riskFreeRateModel, decimal dividendYield = 0.0m,
Symbol mirrorOption =
null,
137 : base(name, option, riskFreeRateModel, dividendYield, mirrorOption, optionModel, ivModel)
150 public Delta(
Symbol option, PyObject riskFreeRateModel, decimal dividendYield = 0.0m,
Symbol mirrorOption =
null,
152 : this($
"Delta({option},{mirrorOption},{GetOptionModel(optionModel, option.ID.OptionStyle)})", option, riskFreeRateModel,
153 dividendYield, mirrorOption, optionModel, ivModel)
167 public Delta(
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 Delta(
Symbol option, decimal riskFreeRate = 0.05m, decimal dividendYield = 0.0m,
Symbol mirrorOption =
null,
184 : this($
"Delta({option},{mirrorOption},{GetOptionModel(optionModel, option.ID.OptionStyle)})", option, riskFreeRate, dividendYield,
185 mirrorOption, optionModel, ivModel)
196 var strike = (double)
Strike;
197 var timeTillExpiryDouble = (double)timeTillExpiry;
213 var sU = underlyingPrice * upFactor;
214 var sD = underlyingPrice / upFactor;
234 downFactor = 0.99999;
237 sU = underlyingPrice * upFactor;
238 sD = underlyingPrice * downFactor;
248 var norm =
new Normal();
251 double wholeShareDelta;
254 wholeShareDelta = norm.CumulativeDistribution(d1);
258 wholeShareDelta = -norm.CumulativeDistribution(-d1);
261 result = wholeShareDelta * Math.Exp(-dividendYield * timeTillExpiryDouble);
265 return Convert.ToDecimal(result);