Class BlackScholesCalculator
- Namespace
- NanoQL.PricingEngines
- Assembly
- NanoQL.dll
The Black-Scholes (1973) calculator: BlackCalculator on the forward of a spot, its growth and discount factors, with the spot sensitivities at that spot.
public sealed class BlackScholesCalculator : BlackCalculator
- Inheritance
-
BlackScholesCalculator
- Inherited Members
Remarks
Immutable, as its base.
Constructors
BlackScholesCalculator(StrikedTypePayoff, double, double, double, double)
Initializes a new instance of the BlackScholesCalculator class for a striked payoff.
public BlackScholesCalculator(StrikedTypePayoff payoff, double spot, double growth, double stdDev, double discount)
Parameters
payoffStrikedTypePayoffThe payoff.
spotdoubleThe spot.
growthdoubleThe growth factor, the dividend discount to expiry.
stdDevdoubleThe standard deviation of the log of the underlying at expiry, σ√T.
discountdoubleThe discount factor.
Exceptions
- ArgumentNullException
payoffis null.- ArgumentException
The base's refusals, or the spot or the growth isn't positive.
BlackScholesCalculator(OptionType, double, double, double, double, double)
Initializes a new instance of the BlackScholesCalculator class for a plain vanilla payoff.
public BlackScholesCalculator(OptionType optionType, double strike, double spot, double growth, double stdDev, double discount)
Parameters
optionTypeOptionTypeThe option's type.
strikedoubleThe strike.
spotdoubleThe spot.
growthdoubleThe growth factor, the dividend discount to expiry.
stdDevdoubleThe standard deviation of the log of the underlying at expiry, σ√T.
discountdoubleThe discount factor.
Exceptions
- ArgumentOutOfRangeException
optionTypeisn't a member of its type.- ArgumentException
The base's refusals, or the spot or the growth isn't positive.
Methods
Delta()
The sensitivity to the spot.
public double Delta()
Returns
- double
The delta.
Elasticity()
The sensitivity in percent to a percent change in the spot.
public double Elasticity()
Returns
- double
The elasticity.
Gamma()
The second derivative in the spot.
public double Gamma()
Returns
- double
The gamma.
Theta(double)
The sensitivity to the time to maturity.
public double Theta(double maturity)
Parameters
maturitydoubleThe time to maturity.
Returns
- double
The theta.
ThetaPerDay(double)
The sensitivity to the time to maturity per day, a year of 365 days.
public double ThetaPerDay(double maturity)
Parameters
maturitydoubleThe time to maturity.
Returns
- double
The theta per day.