abaquant.derivatives.simulation.gbm

Import path: abaquant.derivatives.simulation.gbm

Domain: Derivative pricing, simulation, calibration, diagnostics, and strategy analysis.

Purpose

Geometric-Brownian-motion path simulation.

When to use it

This module generates stochastic paths or returns. Reproducible analysis should set the random seed and record time-step, horizon, drift, and volatility conventions.

Public objects

  • function: simulate_gbm_paths — Simulate geometric-Brownian-motion price paths.

Detailed reference

Geometric-Brownian-motion path simulation.

Purpose

The module simulates risk-neutral or drift-specified GBM paths on a uniform time grid.

Conventions

Spot values use currency units. Rates, yields, and volatility are decimal annual values. T is in years.

References

[ 1 ] Glasserman, P. (2004), Monte Carlo Methods in Financial Mathematics. [ 2 ] Black, F., and M. Scholes (1973), “The Pricing of Options and Corporate Liabilities”; Merton, R. C. (1973), “Theory of Rational Option Pricing”.

abaquant.derivatives.simulation.gbm.simulate_gbm_paths(S, T, r, sigma, q=0.0, n_paths=30, n_steps=252, seed=99)

Simulate geometric-Brownian-motion price paths.

Parameters:
  • S (float) – Current underlying spot price in currency units.

  • T (float) – Time to maturity in years.

  • r (float) – Continuously compounded risk-free annual rate in decimal units.

  • sigma (float) – Annualized lognormal volatility in decimal units; for example, 0.20 denotes 20%.

  • q (float, default=0.0) – Continuous dividend or carry yield in decimal annual units.

  • n_paths (int, default=30) – Number of Monte Carlo paths.

  • n_steps (int, default=252) – Number of simulation or lattice time steps.

  • seed (int | None, default=99) – Optional pseudo-random seed for reproducible simulation.

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.