Sabr Shifted
financepy.models.sabr_shifted
Classes
SABRShifted
SABRShifted(alpha: float, beta: float, rho: float, nu: float, shift: float) -> None
SABR - Shifted Stochastic alpha beta rho model by Hagan et al. is a
stochastic volatility model where alpha controls the implied volatility,
beta is the exponent on the the underlying asset's process so beta = 0
is normal and beta = 1 is lognormal, rho is the correlation between the
underlying and the volatility process. The shift allows negative rates.
Methods
black_vol
black_vol(self, f: float | numpy.ndarray, k: float | numpy.ndarray, t: float | numpy.ndarray) -> float | numpy.ndarray
Black volatility from SABR model using Hagan et al. approx.
black_vol_with_alpha
black_vol_with_alpha(self, alpha: numpy.ndarray, f: float, k: float, t: float) -> float
No description available.
value
value(self, forward_rate: float, strike_rate: float, time_to_expiry: float, df: float, call_or_put: Any) -> float
Price an option using Black's model which values in the forward
measure following a change of measure.
set_alpha_from_black_vol
set_alpha_from_black_vol(self, black_vol: float, forward: float, strike: float, time_to_expiry: float) -> None
Estimate the valu normcdf(f the alpha coefficient of the SABR model
by solving for the value of alpha that makes the SABR black vol equal
to the input black vol. This uses a numerical 1D solver.
set_alpha_from_atm_black_vol
set_alpha_from_atm_black_vol(self, black_vol: float, atm_strike: float, time_to_expiry: float) -> None
We solve cubic equation for the unknown variable alpha for the
special ATM case of the strike equalling the forward following Hagan
and al. equation (3.3). We take the smallest real root as the preferred
solution. This is useful for calibrating the model when beta has been
chosen.
Generated automatically from the FinancePy source code.
Do not edit this file manually.