FinancePy

FinancePy API Reference

Merton Jump Diffusion

financepy.models.merton_jump_diffusion

Classes

MertonCalibrationResult

MertonCalibrationResult(model, sigma, jump_intensity, jump_mean, jump_volatility, fitted_vols, market_vols, vol_errors, rmse, mae, max_abs_error, optimizer_result)
Container for a Merton volatility-surface calibration.

Methods

success

No description available.

jump_compensator

No description available.

expected_jump_size

Expected proportional jump E[J-1].

MertonJumpDiffusion

MertonJumpDiffusion(sigma, jump_intensity, jump_mean, jump_volatility, poisson_tolerance=1e-12, max_jumps=200)
Merton jump-diffusion model for European equity options. The risk-neutral stock-price process is dS/S_- = (r - q - lambda * kappa_j) dt + sigma dW + (J - 1) dN where log(J) ~ Normal(mu_j, delta_j^2) and kappa_j = E[J - 1] = exp(mu_j + 0.5 * delta_j^2) - 1. Parameters ---------- sigma : float Diffusive volatility. jump_intensity : float Poisson jump intensity lambda, in jumps per year. jump_mean : float Mean log jump size mu_j. jump_volatility : float Standard deviation delta_j of log jump sizes. poisson_tolerance : float Remaining Poisson probability below which the pricing summation is terminated. max_jumps : int Maximum number of jump terms in the pricing summation.

Methods

jump_compensator

Expected proportional jump: E[J - 1] = exp(mu_j + 0.5 delta_j^2) - 1.

expected_jump_multiplier

Return E[J].

value

value(self, stock_price, time_to_expiry, strike_price, risk_free_rate, dividend_yield, option_type=<OptionTypes.EUROPEAN_CALL: 1>)
Value a European option using Merton's Poisson-mixture solution. Conditional on N_T=n jumps, log(S_T) is Gaussian. Therefore the option value is a Poisson-weighted sum of Black-Scholes values.

implied_volatility

implied_volatility(self, stock_price, time_to_expiry, strike_price, risk_free_rate, dividend_yield, option_type=<OptionTypes.EUROPEAN_CALL: 1>)
Return Black-Scholes implied volatility of the Merton price.

volatility_smile

volatility_smile(self, stock_price, time_to_expiry, strikes, risk_free_rate, dividend_yield, option_type=<OptionTypes.EUROPEAN_CALL: 1>)
Generate the Merton Black-Scholes implied-volatility smile.

volatility_surface

volatility_surface(self, stock_price, strikes, expiries, risk_free_rates, dividend_yields, option_type=<OptionTypes.EUROPEAN_CALL: 1>)
Generate a matrix of Black-Scholes implied volatilities. Returns ------- vols : ndarray Shape = (number of expiries, number of strikes).

calibrate

calibrate(cls, stock_price, strikes, expiries, market_vols, risk_free_rates, dividend_yields, option_type=<OptionTypes.EUROPEAN_CALL: 1>, initial_guess=None, lower_bounds=None, upper_bounds=None, weights=None, calibration_type='VOL', max_nfev=3000)
Calibrate one global Merton parameter set to an entire implied-volatility surface. The calibrated parameters are sigma jump_intensity lambda jump_mean mu_j jump_volatility delta_j Parameters ---------- market_vols : ndarray Matrix of Black-Scholes implied volatilities with shape (len(expiries), len(strikes)) calibration_type : str "VOL" Minimise errors directly in Black-Scholes implied volatility. "VEGA" Minimise Black-Scholes vega-scaled price errors. weights : ndarray or None Optional calibration weights with the same dimensions as market_vols. Returns ------- MertonCalibrationResult
Generated automatically from the FinancePy source code. Do not edit this file manually.