FinancePy

FinancePy API Reference

Equity Vol Surface

financepy.market.volatility.equity_vol_surface

Classes

EquityVolSurface

EquityVolSurface(anchor_dt: financepy.utils.date.Date, stock_price: float, discount_curve: financepy.market.curves.discount_curve.DiscountCurve, dividend_curve: financepy.market.curves.discount_curve.DiscountCurve, expiry_dts: List[financepy.utils.date.Date], strikes: numpy.ndarray, volatility_grid: numpy.ndarray, vol_func_type: financepy.utils.global_types.VolFuncTypes = <VolFuncTypes.CLARK: 0>, fin_solver_type: financepy.utils.global_types.SolverTypes = <SolverTypes.NELDER_MEAD: 1>) -> None
Class to perform a calibration of a chosen parametrised surface to the prices of equity options at different strikes and expiry tenors. There is a choice of volatility function from cubic in delta to full SABR and SSVI. Check out VolFuncTypes. Visualising the volatility curve is useful. Also, there is no guarantee that the implied pdf will be positive.

Methods

vol_from_strike_dt

vol_from_strike_dt(self, k: float, expiry_dt: financepy.utils.date.Date) -> float
Interpolates the Black-Scholes volatility from the volatility surface given call option strike and expiry date. Linear interpolation is done in variance space. The smile strikes at bracketed dates are determined by determining the strike that reproduces the provided delta value. This uses the calibration delta convention, but it can be overriden by a provided delta convention. The resulting volatilities are then determined for each bracketing expiry time and linear interpolation is done in variance space and then converted back to a lognormal volatility.

vol_from_delta_date

vol_from_delta_date(self, call_delta: float, expiry_dt: financepy.utils.date.Date, delta_method=None) -> Tuple[float, float]
Interpolates the Black-Scholes volatility from the volatility surface given a call option delta and expiry date. Linear interpolation is done in variance space. The smile strikes at bracketed dates are determined by determining the strike that reproduces the provided delta value. This uses the calibration delta convention, but it can be overriden by a provided delta convention. The resulting volatilities are then determined for each bracketing expiry time and linear interpolation is done in variance space and then converted back to a lognormal volatility.

check_calibration

check_calibration(self, verbose: bool) -> None
Compare calibrated vol surface with market and output a report which sets out the quality of fit to the ATM and 10 and 25 delta market strangles and risk reversals.

implied_dbns

implied_dbns(self, low_s: float, high_s: float, num_intervals: int) -> List[financepy.utils.distribution.FinDistribution]
Calculate the pdf for each tenor horizon. Returns a list of FinDistribution objects, one for each tenor horizon.

plot_vol_curves

plot_vol_curves(self) -> None
Generates a plot of each of the vol discount implied by the market and fitted.
Generated automatically from the FinancePy source code. Do not edit this file manually.