Interface LocalVolatilityCalculator

    • Method Detail

      • localVolatilityFromPrice

        Surface localVolatilityFromPrice​(Surface callPriceSurface,
                                         double spot,
                                         Function<Double,​Double> interestRate,
                                         Function<Double,​Double> dividendRate)
        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 and dividendRate are functions from year fraction to zero rate.

        Parameters:
        callPriceSurface - the price surface
        spot - the spot
        interestRate - the interest rate
        dividendRate - the dividend rate
        Returns:
        the local volatility surface
      • localVolatilityFromImpliedVolatility

        Surface localVolatilityFromImpliedVolatility​(Surface impliedVolatilitySurface,
                                                     double spot,
                                                     Function<Double,​Double> interestRate,
                                                     Function<Double,​Double> dividendRate)
        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 and dividendRate are functions from year fraction to zero rate.

        Parameters:
        impliedVolatilitySurface - the implied volatility surface
        spot - the spot
        interestRate - the interest rate
        dividendRate - the dividend
        Returns:
        the local volatility surface