abaquant.derivatives.numerics.carr_madan_fft¶
Import path: abaquant.derivatives.numerics.carr_madan_fft
Domain: Derivative pricing, simulation, calibration, diagnostics, and strategy analysis.
Purpose¶
Carr–Madan fast-Fourier-transform option pricing.
When to use it¶
Use this package when valuing contingent claims, calculating Greeks, building option strategies, simulating stochastic processes, or fitting models to market observations.
Public objects¶
function:
carr_madan_call_price— Compute a European call price from a characteristic function using Carr–Madan FFT.function:
carr_madan_option_price— Compute a European call or put price through the Carr–Madan Fourier routine.
Detailed reference¶
Carr–Madan fast-Fourier-transform option pricing.
Purpose¶
The module evaluates damped Fourier transforms of characteristic functions to obtain European option prices.
Conventions¶
Characteristic functions must follow the implementation convention. Grid size is normally a power of two; eta controls Fourier-grid spacing.
References
[ 1 ] Carr, P., and D. B. Madan (1999), “Option Valuation Using the Fast Fourier Transform”.
- abaquant.derivatives.numerics.carr_madan_fft.carr_madan_call_price(characteristic_function, spot, strike, maturity, rate, dividend_yield=0.0, *, alpha=1.5, n_grid=4096, eta=0.25)¶
Compute a European call price from a characteristic function using Carr–Madan FFT.
- Parameters:
characteristic_function (Callable[[complex | np.ndarray], complex | np.ndarray]) – Callable returning the model characteristic function at a Fourier argument.
spot (float) – Current underlying or asset spot price in currency units.
strike (float) – Option strike price in the same currency units as the underlying.
maturity (float) – Time to option expiry in years.
rate (float) – Interest rate in decimal units under the stated compounding convention.
dividend_yield (float, default=0.0) – Continuous dividend yield in decimal annual units.
alpha (float, default=1.5) – Model-specific alpha parameter; consult the module convention.
n_grid (int, default=4096) – Number of points in the Fourier grid, typically a power of two.
eta (float, default=0.25) – Fourier-grid spacing in the Carr–Madan implementation.
- Returns:
Computed carr madan call price as a scalar in the units implied by the input values.
- 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.
- abaquant.derivatives.numerics.carr_madan_fft.carr_madan_option_price(characteristic_function, spot, strike, maturity, rate, dividend_yield=0.0, option_type='call', *, alpha=1.5, n_grid=4096, eta=0.25)¶
Compute a European call or put price through the Carr–Madan Fourier routine.
- Parameters:
characteristic_function (Callable[[complex | np.ndarray], complex | np.ndarray]) – Callable returning the model characteristic function at a Fourier argument.
spot (float) – Current underlying or asset spot price in currency units.
strike (float) – Option strike price in the same currency units as the underlying.
maturity (float) – Time to option expiry in years.
rate (float) – Interest rate in decimal units under the stated compounding convention.
dividend_yield (float, default=0.0) – Continuous dividend yield in decimal annual units.
option_type (str, default='call') – Option type label, normally
"call"or"put".alpha (float, default=1.5) – Model-specific alpha parameter; consult the module convention.
n_grid (int, default=4096) – Number of points in the Fourier grid, typically a power of two.
eta (float, default=0.25) – Fourier-grid spacing in the Carr–Madan implementation.
- Returns:
Computed carr madan option price as a scalar in the units implied by the input values.
- 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.