Class SabrExtrapolationRightFunction


  • public final class SabrExtrapolationRightFunction
    extends Object
    Pricing function in the SABR model with Hagan et al. volatility function and controlled extrapolation for large strikes by extrapolation on call prices.

    The form of the extrapolation as a function of the strike is \begin{equation*} f(K) = K^{-\mu} \exp\left( a + \frac{b}{K} + \frac{c}{K^2} \right). \end{equation*}

    Benaim, S., Dodgson, M., and Kainth, D. (2008). An arbitrage-free method for smile extrapolation. Technical report, Royal Bank of Scotland.

    OpenGamma implementation note: Smile extrapolation, version 1.2, May 2011.

    • Method Detail

      • of

        public static SabrExtrapolationRightFunction of​(double forward,
                                                        double timeToExpiry,
                                                        SabrFormulaData sabrData,
                                                        double cutOffStrike,
                                                        double mu)
        Obtains an instance with default volatility provider.

        The default volatility provider is SabrHaganVolatilityFunctionProvider.

        Parameters:
        forward - the forward
        timeToExpiry - the time to expiration
        sabrData - the SABR formula data
        cutOffStrike - the cut-off-strike
        mu - the mu parameter
        Returns:
        the instance
      • of

        public static SabrExtrapolationRightFunction of​(double forward,
                                                        SabrFormulaData sabrData,
                                                        double cutOffStrike,
                                                        double timeToExpiry,
                                                        double mu,
                                                        VolatilityFunctionProvider<SabrFormulaData> volatilityFunction)
        Obtains an instance with volatility provider specified.
        Parameters:
        forward - the forward
        sabrData - the SABR formula data
        cutOffStrike - the cut-off-strike
        timeToExpiry - the time to expiration
        mu - the mu parameter
        volatilityFunction - the volatility function
        Returns:
        the instance
      • price

        public double price​(double strike,
                            PutCall putCall)
        Computes the option price with numeraire=1.

        The price is SABR below the cut-off strike and extrapolated beyond.

        Parameters:
        strike - the strike of the option
        putCall - whether the option is put or call
        Returns:
        the option price
      • priceDerivativeStrike

        public double priceDerivativeStrike​(double strike,
                                            PutCall putCall)
        Computes the option price derivative with respect to the strike.

        The price is SABR below the cut-off strike and extrapolated beyond.

        Parameters:
        strike - the strike of the option
        putCall - whether the option is put or call
        Returns:
        the option price derivative
      • priceDerivativeForward

        public double priceDerivativeForward​(double strike,
                                             PutCall putCall)
        Computes the option price derivative with respect to the forward.

        The price is SABR below the cut-off strike and extrapolated beyond.

        Parameters:
        strike - the strike of the option
        putCall - whether the option is put or call
        Returns:
        the option price derivative
      • priceAdjointSabr

        public ValueDerivatives priceAdjointSabr​(double strike,
                                                 PutCall putCall)
        Computes the option price derivative with respect to the SABR parameters.

        The price is SABR below the cut-off strike and extrapolated beyond.

        Parameters:
        strike - the strike of the option
        putCall - whether the option is put or call
        Returns:
        the option and its derivative
      • getSabrData

        public SabrFormulaData getSabrData()
        Gets the underlying SABR data.
        Returns:
        the sabrData
      • getCutOffStrike

        public double getCutOffStrike()
        Gets the cut-off strike.

        The smile is extrapolated above that level.

        Returns:
        the cutOffStrike
      • getMu

        public double getMu()
        Gets the tail thickness parameter.
        Returns:
        the mu parameter
      • getTimeToExpiry

        public double getTimeToExpiry()
        Gets the time to expiry.
        Returns:
        the time to expiry
      • getParameter

        public double[] getParameter()
        Gets the three fitting parameters.
        Returns:
        the parameters
      • getParameterDerivativeForward

        public double[] getParameterDerivativeForward()
        Gets the three fitting parameters derivatives with respect to the forward.
        Returns:
        the parameters derivative
      • getParameterDerivativeSabr

        public double[][] getParameterDerivativeSabr()
        Gets the three fitting parameters derivatives with respect to the SABR parameters.
        Returns:
        the parameters derivative