Class DupireLocalVolatilityCalculator
- java.lang.Object
-
- com.opengamma.strata.pricer.impl.volatility.local.DupireLocalVolatilityCalculator
-
- All Implemented Interfaces:
LocalVolatilityCalculator
public class DupireLocalVolatilityCalculator extends Object implements LocalVolatilityCalculator
Local volatility computation based on the exact formula.Bruno Dupire, "Pricing with a Smile", Risk (1994).
-
-
Constructor Summary
Constructors Constructor Description DupireLocalVolatilityCalculator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeformedSurface
localVolatilityFromImpliedVolatility(Surface impliedVolatilitySurface, double spot, Function<Double,Double> interestRate, Function<Double,Double> dividendRate)
Computes local volatility surface from implied volatility surface.DeformedSurface
localVolatilityFromPrice(Surface callPriceSurface, double spot, Function<Double,Double> interestRate, Function<Double,Double> dividendRate)
Computes local volatility surface from call price surface.
-
-
-
Method Detail
-
localVolatilityFromImpliedVolatility
public DeformedSurface localVolatilityFromImpliedVolatility(Surface impliedVolatilitySurface, double spot, Function<Double,Double> interestRate, Function<Double,Double> dividendRate)
Description copied from interface:LocalVolatilityCalculator
Computes local volatility surface from implied volatility surface.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
anddividendRate
are functions from year fraction to zero rate.- Specified by:
localVolatilityFromImpliedVolatility
in interfaceLocalVolatilityCalculator
- Parameters:
impliedVolatilitySurface
- the implied volatility surfacespot
- the spotinterestRate
- the interest ratedividendRate
- the dividend- Returns:
- the local volatility surface
-
localVolatilityFromPrice
public DeformedSurface localVolatilityFromPrice(Surface callPriceSurface, double spot, Function<Double,Double> interestRate, Function<Double,Double> dividendRate)
Description copied from interface:LocalVolatilityCalculator
Computes local volatility surface from call price surface.The interest rate and dividend rate must be zero-coupon continuously compounded rates based on respective day count convention. Thus
interestRate
anddividendRate
are functions from year fraction to zero rate.- Specified by:
localVolatilityFromPrice
in interfaceLocalVolatilityCalculator
- Parameters:
callPriceSurface
- the price surfacespot
- the spotinterestRate
- the interest ratedividendRate
- the dividend rate- Returns:
- the local volatility surface
-
-