abaquant.derivatives.models.nig¶
Import path: abaquant.derivatives.models.nig
Domain: Derivative pricing, simulation, calibration, diagnostics, and strategy analysis.
Purpose¶
Normal-inverse-Gaussian 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:
NormalInverseGaussianModel— Normal-inverse-Gaussian process model for European option valuation. *NormalInverseGaussianModel.characteristic_function— Evaluate the model characteristic function at the supplied Fourier argument. *NormalInverseGaussianModel.call_price— Return the model price of a European call option. *NormalInverseGaussianModel.put_price— Return the model price of a European put option. *NormalInverseGaussianModel.implied_vol— Return the Black–Scholes–Merton implied volatility associated with the model price. *NormalInverseGaussianModel.vol_smile— Evaluate the model-implied volatility across the supplied strike grid. *NormalInverseGaussianModel.visualize— Return a backend-native visualization of this option-pricing model.
Detailed reference¶
Normal-inverse-Gaussian option pricing model.
Purpose¶
The module uses an NIG characteristic function and Fourier pricing to value European options and produce implied-volatility diagnostics.
Conventions¶
alpha, beta, and delta follow the implementation parameterization; maturity is in years and rates are decimal annual quantities.
References
[ 1 ] Barndorff-Nielsen, O. E. (1997), “Normal Inverse Gaussian Distributions and Stochastic Volatility Modelling”. [ 2 ] Carr, P., and D. B. Madan (1999), “Option Valuation Using the Fast Fourier Transform”.
- class abaquant.derivatives.models.nig.NormalInverseGaussianModel(spot_price, strike_price, maturity_years, risk_free_rate, tail_steepness, asymmetry_parameter, scale_parameter, dividend_yield=0.0)¶
Bases:
OptionDiagnosticsMixinNormal-inverse-Gaussian process model for European option valuation.
- 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.
tail_steepness (float) – NIG tail-steepness parameter \(\alpha\).
asymmetry_parameter (float) – NIG skewness parameter \(\beta\).
scale_parameter (float) – NIG scale parameter \(\delta\).
dividend_yield (float, default=0.0) – Continuous annual dividend or carry yield in decimal units.
Initialize the normal-inverse-Gaussian 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.
tail_steepness (float) – NIG tail-steepness parameter \(\alpha\).
asymmetry_parameter (float) – NIG skewness parameter \(\beta\).
scale_parameter (float) – NIG scale parameter \(\delta\).
dividend_yield (float, default=0.0) – Continuous annual dividend or carry yield in decimal units.
- characteristic_function(u)¶
Evaluate the model characteristic function at the supplied Fourier argument.
- Parameters:
u (float or array-like) – Fourier argument at which the characteristic function is evaluated.
- Returns:
Result of the characteristic function workflow.
- Return type:
object
- 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.
- implied_vol(option_type='call')¶
Return the Black–Scholes–Merton implied volatility associated with the model price.
- Parameters:
option_type (str, default='call') – Option type label, normally
"call"or"put".- Returns:
Result of the implied vol workflow.
- Return type:
object
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, option_type='call')¶
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.
option_type (str, default='call') – Option type label, normally
"call"or"put".
- 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