Class SabrExtrapolationRightFunction
- java.lang.Object
-
- com.opengamma.strata.pricer.impl.option.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getCutOffStrike()
Gets the cut-off strike.double
getMu()
Gets the tail thickness parameter.double[]
getParameter()
Gets the three fitting parameters.double[]
getParameterDerivativeForward()
Gets the three fitting parameters derivatives with respect to the forward.double[][]
getParameterDerivativeSabr()
Gets the three fitting parameters derivatives with respect to the SABR parameters.SabrFormulaData
getSabrData()
Gets the underlying SABR data.double
getTimeToExpiry()
Gets the time to expiry.static SabrExtrapolationRightFunction
of(double forward, double timeToExpiry, SabrFormulaData sabrData, double cutOffStrike, double mu)
Obtains an instance with default volatility provider.static SabrExtrapolationRightFunction
of(double forward, SabrFormulaData sabrData, double cutOffStrike, double timeToExpiry, double mu, VolatilityFunctionProvider<SabrFormulaData> volatilityFunction)
Obtains an instance with volatility provider specified.double
price(double strike, PutCall putCall)
Computes the option price with numeraire=1.ValueDerivatives
priceAdjointSabr(double strike, PutCall putCall)
Computes the option price derivative with respect to the SABR parameters.double
priceDerivativeForward(double strike, PutCall putCall)
Computes the option price derivative with respect to the forward.double
priceDerivativeStrike(double strike, PutCall putCall)
Computes the option price derivative with respect to the strike.
-
-
-
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 forwardtimeToExpiry
- the time to expirationsabrData
- the SABR formula datacutOffStrike
- the cut-off-strikemu
- 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 forwardsabrData
- the SABR formula datacutOffStrike
- the cut-off-striketimeToExpiry
- the time to expirationmu
- the mu parametervolatilityFunction
- 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 optionputCall
- 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 optionputCall
- 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 optionputCall
- 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 optionputCall
- 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
-
-