Class SabrHaganNormalVolatilityFormula

  • All Implemented Interfaces:
    SabrVolatilityFormula

    public final class SabrHaganNormalVolatilityFormula
    extends Object
    implements SabrVolatilityFormula
    Formulas related to the SABR implied normal volatility function.

    Only the "beta = 0" versions take strike/forward with negative values. The other formulas have a barrier at 0.

    Reference: Hagan, P.; Kumar, D.; Lesniewski, A. & Woodward, D. "Managing smile risk", Wilmott Magazine, 2002, September, 84-108 Note: Formula references are related to the preprint version, e.g. available at https://www.researchgate.net/publication/235622441_Managing_Smile_Risk

    • Method Detail

      • volatility

        public double volatility​(double forward,
                                 double strike,
                                 double timeToExpiry,
                                 double alpha,
                                 double beta,
                                 double rho,
                                 double nu)
        Description copied from interface: SabrVolatilityFormula
        Calculates the volatility.
        Specified by:
        volatility in interface SabrVolatilityFormula
        Parameters:
        forward - the forward value of the underlying
        strike - the strike value of the option
        timeToExpiry - the time to expiry of the option
        alpha - the SABR alpha value
        beta - the SABR beta value
        rho - the SABR rho value
        nu - the SABR nu value
        Returns:
        the volatility
      • volatilityAdjoint

        public ValueDerivatives volatilityAdjoint​(double forward,
                                                  double strike,
                                                  double timeToExpiry,
                                                  double alpha,
                                                  double beta,
                                                  double rho,
                                                  double nu)
        Description copied from interface: SabrVolatilityFormula
        Calculates volatility and the adjoint (volatility sensitivity to forward, strike and model parameters).

        By default the derivatives are computed by central finite difference approximation. This should be overridden in each subclass.

        Specified by:
        volatilityAdjoint in interface SabrVolatilityFormula
        Parameters:
        forward - the forward value of the underlying
        strike - the strike value of the option
        timeToExpiry - the time to expiry of the option
        alpha - the SABR alpha value
        beta - the SABR beta value
        rho - the SABR rho value
        nu - the SABR nu value
        Returns:
        the volatility and associated derivatives
      • volatilityBetaNonZero

        public double volatilityBetaNonZero​(double forward,
                                            double strike,
                                            double timeToExpiry,
                                            double alpha,
                                            double beta,
                                            double rho,
                                            double nu)
        Returns the volatility using the generic formula with barrier at 0. Formula B.69a in the preprint version
        Parameters:
        forward - the forward value of the underlying
        strike - the strike value of the option
        timeToExpiry - the time to expiry of the option
        alpha - the SABR alpha value
        beta - the SABR beta value
        rho - the SABR rho value
        nu - the SABR nu value
        Returns:
        the volatility
      • volatilityBetaNonZeroAdjoint

        public ValueDerivatives volatilityBetaNonZeroAdjoint​(double forward,
                                                             double strike,
                                                             double timeToExpiry,
                                                             double alpha,
                                                             double beta,
                                                             double rho,
                                                             double nu)
        Returns the volatility using the generic formula with barrier at 0 at its derivatives. Formula B.69a in the preprint version
        Parameters:
        forward - the forward value of the underlying
        strike - the strike value of the option
        timeToExpiry - the time to expiry of the option
        alpha - the SABR alpha value
        beta - the SABR beta value
        rho - the SABR rho value
        nu - the SABR nu value
        Returns:
        the volatility
      • volatilityBeta0

        public double volatilityBeta0​(double forward,
                                      double strike,
                                      double timeToExpiry,
                                      double alpha,
                                      double rho,
                                      double nu)
        Calculates the normal implied volatility for the special case of beta=0.

        The case beta=0 removes the barrier for forward/strike at 0 and lead to significant simplification in the implementation.

        Formula B.70a in the preprint version. Note that the preprint version has a typo (missing the zeta/xhat term).

        Parameters:
        forward - the forward value of the underlying
        strike - the strike value of the option
        timeToExpiry - the time to expiry of the option
        alpha - the SABR alpha value
        rho - the SABR rho value
        nu - the SABR nu value
        Returns:
        the volatility
      • volatilityBeta0Adjoint

        public ValueDerivatives volatilityBeta0Adjoint​(double forward,
                                                       double strike,
                                                       double timeToExpiry,
                                                       double alpha,
                                                       double rho,
                                                       double nu)
        Calculates the normal implied volatility and its derivatives (w.r.t. to forward, strike and model parameters) for the special case of beta=0.

        The case beta=0 removes the barrier for forward/strike at 0 and lead to significant simplification in the implementation.

        Parameters:
        forward - the forward value of the underlying
        strike - the strike value of the option
        timeToExpiry - the time to expiry of the option
        alpha - the SABR alpha value
        rho - the SABR rho value
        nu - the SABR nu value
        Returns:
        the volatility and associated derivatives (forward, strike, alpha, beta, rho, nu)
      • zetaOverXhat

        protected double zetaOverXhat​(double zeta,
                                      double rho)
        Computes the ratio zeta over xHat. Special treatment is required for zeta close to 0 (ATM).
        Parameters:
        zeta - the zeta value
        rho - the rho parameter value
        Returns:
        the ratio
      • zetaOverXhatAdjoint

        protected ValueDerivatives zetaOverXhatAdjoint​(double zeta,
                                                       double rho)
        Computes the ratio zeta over xHat and its derivatives. Special treatment is required for zeta close to 0 (ATM).
        Parameters:
        zeta - the zeta value
        rho - the rho parameter value
        Returns:
        the ratio