abaquant.derivatives.models.merton¶
Import path: abaquant.derivatives.models.merton
Domain: Derivative pricing, simulation, calibration, diagnostics, and strategy analysis.
Purpose¶
Merton jump-diffusion option pricing model.
When to use it¶
This module implements or supports one derivative model. Read the parameter constraints, pricing measure, numerical method, and limiting cases before comparing outputs across models.
Public objects¶
class:
MertonJumpDiffusionModel— Merton jump-diffusion model for European vanilla options. *MertonJumpDiffusionModel.price— Return the model price of a call or put option. *MertonJumpDiffusionModel.call_price— Return the model price of a European call option. *MertonJumpDiffusionModel.put_price— Return the model price of a European put option. *MertonJumpDiffusionModel.vol_smile— Evaluate the model-implied volatility across the supplied strike grid. *MertonJumpDiffusionModel.visualize— Return a backend-native visualization of this option-pricing model.function:
merton_jump_statistics— Compute summary statistics implied by the Merton jump-diffusion parameters.
Detailed reference¶
Merton jump-diffusion option pricing model.
Purpose¶
The module values European calls and puts by a truncated Poisson mixture of Black–Scholes–Merton terms and generates an implied-volatility smile.
Conventions¶
lam is the jump intensity per year; mu_j and sigma_j parameterize log-jump size; n_terms controls truncation.
References
[ 1 ] Merton, R. C. (1976), “Option Pricing When Underlying Stock Returns Are Discontinuous”.
- class abaquant.derivatives.models.merton.MertonJumpDiffusionModel(spot_price, strike_price, maturity_years, risk_free_rate, volatility, dividend_yield=0.0, jump_intensity=1.0, mean_log_jump_size=0.0, jump_log_volatility=0.2, poisson_series_terms=50)¶
Bases:
OptionDiagnosticsMixinMerton jump-diffusion model for European vanilla options.
- Parameters:
spot_price (float) – Current underlying asset price in currency units.
strike_price (float) – Option exercise price in currency units.
maturity_years (float) – Time to expiration in years.
risk_free_rate (float) – Continuously compounded annual risk-free rate in decimal units.
volatility (float) – Diffusion volatility in annualized decimal units.
dividend_yield (float, default=0.0) – Continuous annual dividend or carry yield in decimal units.
jump_intensity (float, default=1.0) – Poisson jump arrival intensity in events per year.
mean_log_jump_size (float, default=0.0) – Mean jump size in log-price units.
jump_log_volatility (float, default=0.2) – Standard deviation of log jump sizes.
poisson_series_terms (int, default=50) – Number of terms retained in the Poisson-mixture approximation.
Initialize the Merton jump-diffusion model state.
- Parameters:
spot_price (float) – Current underlying asset price in currency units.
strike_price (float) – Option exercise price in currency units.
maturity_years (float) – Time to expiration in years.
risk_free_rate (float) – Continuously compounded annual risk-free rate in decimal units.
volatility (float) – Diffusion volatility in annualized decimal units.
dividend_yield (float, default=0.0) – Continuous annual dividend or carry yield in decimal units.
jump_intensity (float, default=1.0) – Poisson jump arrival intensity in events per year.
mean_log_jump_size (float, default=0.0) – Mean jump size in log-price units.
jump_log_volatility (float, default=0.2) – Standard deviation of log jump sizes.
poisson_series_terms (int, default=50) – Number of terms retained in the Poisson-mixture approximation.
- price(option_type='call')¶
Return the model price of a call or put option.
- Parameters:
option_type (str, default='call') – Option type label, normally
"call"or"put".- Returns:
Computed price in the units implied by the documented inputs.
- Return type:
float
Notes
Model inputs are interpreted according to the module-level rate, maturity, and volatility conventions. Numerical outputs depend on the validity of those assumptions.
- call_price()¶
Return the model price of a European call option.
- Returns:
Computed call price in the units implied by the documented inputs.
- Return type:
float
Notes
Model inputs are interpreted according to the module-level rate, maturity, and volatility conventions. Numerical outputs depend on the validity of those assumptions.
- put_price()¶
Return the model price of a European put option.
- Returns:
Computed put price in the units implied by the documented inputs.
- Return type:
float
Notes
Model inputs are interpreted according to the module-level rate, maturity, and volatility conventions. Numerical outputs depend on the validity of those assumptions.
- vol_smile(strikes)¶
Evaluate the model-implied volatility across the supplied strike grid.
- Parameters:
strikes (float or array-like) – Strike-price grid in the same currency units as the underlying or forward.
- Returns:
Numeric array ordered consistently with the supplied strikes, time grid, assets, or state labels.
- Return type:
numpy.ndarray
Notes
Model inputs are interpreted according to the module-level rate, maturity, and volatility conventions. Numerical outputs depend on the validity of those assumptions.
- visualize(*, option_type='call', chart='payoff', backend=None, theme=None, save_path=None, filename=None, lower_spot_multiple=0.5, upper_spot_multiple=1.5, grid_size=101, lower_volatility_multiple=0.5, upper_volatility_multiple=1.5, volatility_grid_size=31, greek_scale='raw')¶
Return a backend-native visualization of this option-pricing model.
- Parameters:
option_type ({"call", "put"}, default="call") – Vanilla option type used for payoff, price-profile, smile, or tree plots.
chart (str, default="payoff") – Visual diagnostic to create. Supported charts include payoff, price profile, extrinsic value, Greek curves, selected surfaces, volatility smile, and lattice tree when the model exposes a tree.
backend ({"matplotlib", "plotly"}, default="matplotlib") – Optional plotting backend. The returned figure is not shown automatically.
lower_spot_multiple (float, default=0.5, 1.5) – Price-grid bounds as multiples of the strike price.
upper_spot_multiple (float, default=0.5, 1.5) – Price-grid bounds as multiples of the strike price.
grid_size (int, default=101) – Number of spot-grid points for non-tree plots.
lower_volatility_multiple (float, default=0.5, 1.5) – Volatility-grid bounds expressed as multiples of the model’s base volatility.
upper_volatility_multiple (float, default=0.5, 1.5) – Volatility-grid bounds expressed as multiples of the model’s base volatility.
volatility_grid_size (int, default=31) – Number of volatility-grid points for surface plots.
greek_scale ({"raw", "standardized"}, default="raw") – Scaling mode for the multi-Greek curve chart.
- Returns:
Figure object created without mutating model state.
- Return type:
matplotlib.figure.Figure or plotly.graph_objects.Figure
- abaquant.derivatives.models.merton.merton_jump_statistics(lam, mu_j, sigma_j, sigma)¶
Compute summary statistics implied by the Merton jump-diffusion parameters.
- Parameters:
lam (float) – Jump intensity in expected jumps per year.
mu_j (float) – Mean log jump size in the Merton jump-diffusion model.
sigma_j (float) – Standard deviation of log jump size in decimal units.
sigma (float) – Annualized lognormal volatility in decimal units; for example,
0.20denotes 20%.
- Returns:
Dictionary of named model outputs, metrics, or workflow results defined by the current public schema.
- Return type:
dict[str, object]