Skip to content

Derivatives API Reference

Bermudan Options (LSM)

bermudan_lsm

Bermudan option pricing via Longstaff-Schwartz Monte Carlo.

Implements backward induction with polynomial regression (degree 3) to estimate the continuation value at each exercise date.

References

Longstaff & Schwartz (2001), Valuing American Options by Simulation.

lsm_price(s0, k, r, sigma, T, n_steps=100, n_paths=50000, exercise_dates=None, is_call=False, seed=42)

Price a Bermudan option with Longstaff-Schwartz Monte Carlo.

Parameters

s0, k, r, sigma, T : float Standard option parameters. n_steps : int Number of time-steps in the GBM discretisation. n_paths : int Number of Monte Carlo paths. exercise_dates : list[float] | None Times (in years) when early exercise is allowed. If None, every step is an exercise opportunity (American). is_call : bool True for call, False for put. seed : int | None Random seed.

Returns

dict price, std_err, optimal_exercise_times.

Basket Options

basket

Multi-asset basket option pricing.

Classical Monte Carlo + QAE-ready problem construction for basket options on correlated assets.

References

Kashif et al., arXiv:2509.09432 — quantum basket option pricing.

BasketOptionSpec dataclass

Basket option specification.

Parameters

s0 : NDArray Initial prices, shape (n_assets,). k : float Strike price. r : float Risk-free rate. sigma : NDArray Volatilities, shape (n_assets,). corr : NDArray Correlation matrix, shape (n_assets, n_assets). T : float Time to expiry. weights : NDArray | None Asset weights in the basket (default: equal). is_call : bool True for call, False for put.

BasketResult dataclass

Result from basket option pricing.

basket_mc(spec, n_paths=100000, antithetic=True, seed=42)

Price a basket option via Monte Carlo.

Simulates correlated GBM paths using Cholesky decomposition.

Parameters

spec : BasketOptionSpec Option specification. n_paths : int Number of simulation paths. antithetic : bool Use antithetic variates. seed : int | None Random seed.

Returns

BasketResult

geometric_basket_closed_form(spec)

Closed-form price for geometric basket option.

The geometric basket follows a log-normal distribution.

Returns

float Option price.

Autocallable Notes

autocallable

Autocallable / TARF pricing and quantum resource estimates.

Monte Carlo pricer for autocallable structured notes, plus resource estimation following Chakrabarti et al. (arXiv:2012.03819), Table I.

References

Chakrabarti et al. (2021), A Threshold for Quantum Advantage in Derivative Pricing, arXiv:2012.03819.

AutocallableSpec dataclass

Autocallable structured note specification.

Parameters

s0 : float Initial spot price. k : float Strike / notional reference level. barrier : float Autocall barrier level (absolute, not relative). If spot >= barrier at any observation date the note is called. coupon : float Coupon paid (as fraction of notional) upon autocall. observation_dates : list[float] Observation times in years. r : float Risk-free rate. sigma : float Volatility. T : float Final maturity in years.

autocallable_mc(spec, n_paths=100000, seed=42)

Price an autocallable note via Monte Carlo.

At each observation date the spot is checked against the barrier. If S_t >= barrier the note is called and the holder receives k * (1 + coupon * t_index), discounted to t=0. If the note survives to maturity the holder receives min(S_T, k).

Parameters

spec : AutocallableSpec Note specification. n_paths : int Number of simulation paths. seed : int | None Random seed.

Returns

dict price (float), std_err (float), autocall_prob (float, fraction of paths called early).

resource_estimate_chakrabarti(n_qubits, n_timesteps)

Quantum resource estimate for derivative pricing.

Produces order-of-magnitude estimates consistent with Table I of Chakrabarti et al. (arXiv:2012.03819).

Parameters

n_qubits : int Number of qubits used per asset dimension. n_timesteps : int Number of discretised time-steps.

Returns

dict T_count, T_depth, logical_qubits — approximate gate-level resource requirements.

Path-Dependent Options

path_dependent

Path-dependent derivatives: floating-strike lookback and cliquet options.

Pricing is done via Monte Carlo simulation of GBM paths.

LookbackOptionSpec dataclass

Floating-strike lookback option specification.

Parameters

s0 : float Spot price. r : float Risk-free rate (annualised). sigma : float Volatility (annualised). T : float Time to expiry in years. is_call : bool True for call, False for put. n_steps : int Number of monitoring points for the path extremum.

lookback_mc(spec, n_paths=100000, seed=42)

Price a floating-strike lookback option via Monte Carlo.

For a call the payoff is S_T - min(S_t); for a put it is max(S_t) - S_T.

Parameters

spec : LookbackOptionSpec Option specification. n_paths : int Number of simulation paths. seed : int | None Random seed.

Returns

float Discounted Monte Carlo price.

cliquet_mc(s0, r, sigma, T, n_periods=12, cap=0.05, floor=-0.05, n_paths=100000, seed=42)

Price a cliquet (ratchet) option via Monte Carlo.

The cliquet pays the sum of capped-and-floored periodic returns over n_periods equal sub-periods spanning [0, T].

Parameters

s0 : float Spot price (used only for GBM drift/vol scaling). r : float Risk-free rate. sigma : float Volatility. T : float Total tenor in years. n_periods : int Number of reset periods. cap : float Maximum return per period. floor : float Minimum return per period. n_paths : int Number of Monte Carlo paths. seed : int | None Random seed.

Returns

float Discounted price of the cliquet.