public class ImpliedTrinomialTreeLocalVolatilityCalculator extends Object implements LocalVolatilityCalculator
Emanuel Derman, Iraj Kani and Neil Chriss, "Implied Trinomial Trees of the Volatility Smile" (1996).
Constructor and Description |
---|
ImpliedTrinomialTreeLocalVolatilityCalculator()
Creates an instance with default setups.
|
ImpliedTrinomialTreeLocalVolatilityCalculator(int nSteps,
double maxTime)
Creates an instance with the number of steps and maximum time fixed.
|
ImpliedTrinomialTreeLocalVolatilityCalculator(int nSteps,
double maxTime,
SurfaceInterpolator interpolator)
Creates an instance by specifying the number of steps, maximum time, and 2D interpolator.
|
Modifier and Type | Method and Description |
---|---|
RecombiningTrinomialTreeData |
calibrateImpliedVolatility(Function<DoublesPair,Double> impliedVolatilitySurface,
double spot,
Function<Double,Double> interestRate,
Function<Double,Double> dividendRate)
Calibrate trinomial tree to implied volatility surface.
|
InterpolatedNodalSurface |
localVolatilityFromImpliedVolatility(Surface impliedVolatilitySurface,
double spot,
Function<Double,Double> interestRate,
Function<Double,Double> dividendRate)
Computes local volatility surface from implied volatility surface.
|
InterpolatedNodalSurface |
localVolatilityFromPrice(Surface callPriceSurface,
double spot,
Function<Double,Double> interestRate,
Function<Double,Double> dividendRate)
Computes local volatility surface from call price surface.
|
public ImpliedTrinomialTreeLocalVolatilityCalculator()
The number of time steps is 20, and the tree covers up to 3 years. The time square linear interpolator is used for time direction, whereas the linear interpolator is used for spot dimension. The extrapolation is flat for both the dimensions.
public ImpliedTrinomialTreeLocalVolatilityCalculator(int nSteps, double maxTime)
The default interpolators are used: the time square linear interpolator for time direction, the linear interpolator for spot dimension, and flat extrapolator for both the dimensions.
nSteps
- the number of stepsmaxTime
- the maximum timepublic ImpliedTrinomialTreeLocalVolatilityCalculator(int nSteps, double maxTime, SurfaceInterpolator interpolator)
nSteps
- number of stepsmaxTime
- the maximum timeinterpolator
- the interpolatorpublic InterpolatedNodalSurface localVolatilityFromImpliedVolatility(Surface impliedVolatilitySurface, double spot, Function<Double,Double> interestRate, Function<Double,Double> dividendRate)
LocalVolatilityCalculator
The implied volatility surface must be spanned by time to expiry and strike.
The interest rate and dividend rate must be zero-coupon continuously compounded rates based on
respective day count convention.
Thus interestRate
and dividendRate
are functions from year fraction to zero rate.
localVolatilityFromImpliedVolatility
in interface LocalVolatilityCalculator
impliedVolatilitySurface
- the implied volatility surfacespot
- the spotinterestRate
- the interest ratedividendRate
- the dividendpublic RecombiningTrinomialTreeData calibrateImpliedVolatility(Function<DoublesPair,Double> impliedVolatilitySurface, double spot, Function<Double,Double> interestRate, Function<Double,Double> dividendRate)
impliedVolatilitySurface
- the implied volatility surfacespot
- the spotinterestRate
- the interest ratedividendRate
- the dividend ratepublic InterpolatedNodalSurface localVolatilityFromPrice(Surface callPriceSurface, double spot, Function<Double,Double> interestRate, Function<Double,Double> dividendRate)
LocalVolatilityCalculator
The interest rate and dividend rate must be zero-coupon continuously compounded rates based on respective day
count convention.
Thus interestRate
and dividendRate
are functions from year fraction to zero rate.
localVolatilityFromPrice
in interface LocalVolatilityCalculator
callPriceSurface
- the price surfacespot
- the spotinterestRate
- the interest ratedividendRate
- the dividend rateCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.