mafipy.calibrator.sabr_caibration_simple

mafipy.calibrator.sabr_caibration_simple(market_vols, market_strikes, option_maturity, beta, init_alpha=None, init_rho=0.1, init_nu=0.1, nu_lower_bound=1e-08, tol=1e-10)[source]

calibrates SABR parametes, alpha, rho and nu to market volatilities by simultaneously minimizing error of market volatilities.

Parameters:
  • market_vols (array) – market volatilities. Middle of elements in the array must be atm volatility.
  • market_strikes (array) – market strikes. Middle of elements in the array must be atm strike.
  • option_maturity (float) –
  • beta (float) – pre-determined beta. beta must be within [0, 1].
  • init_alpha (float) – initial guess of alpha. Default value is meaningless value, 0.1. alpha must be positive.
  • init_rho (float) – initial guess of rho. Default value is meaningless value, 0.1. rho must be within [-1, 1].
  • init_nu (float) – initial guess of nu. Default value is meaningless value, 0.1. nu must be positive.
  • nu_lower_bound (float) –
  • tol (float) – tolerance of minimization.
Returns:

alpha, beta, rho, nu.

Return type:

four float value.

Raises:
  • AssertionError – if length of market_vols is not odd.
  • AssertionError – if length of market_vols and market_strikes are not same.