Docs / nablatensor-quant / com.nablatensor.quant

class

GbmPath

Geometric Brownian motion as a composable model step (Seam 5).

Each step is the exact log-Euler solution of dS = rS dt + sigma S dW over that step's interval:

S_{i+1} = S_i * exp((r - sigma^2/2) dt_i + sigma sqrt(dt_i) Z)

with dt_i = maturity * grid.fraction(i). For a uniform(int) grid every dt_i is identical and the per-step drift and diffusion are a single shared tape node, so the recording matches the earlier fixed-dt form exactly.

Subclass and override drift(ADouble) or diffusion(ADouble) to get a displaced-diffusion or a term-structure variant without touching the driver or the engine.

Constructors

GbmPath(AadRecorder rec, ADouble rate, ADouble vol, int steps, ADouble maturity)

Uniform-grid convenience: n equal steps to maturity.

GbmPath(AadRecorder rec, ADouble rate, ADouble vol, TimeGrid grid, ADouble maturity)

Methods

protected ADouble drift(ADouble perStepDrift)

Hook: the deterministic per-step log-return. Identity for plain GBM.

protected ADouble diffusion(ADouble perStepVol)

Hook: the per-step volatility multiplier on Z. Identity for plain GBM.

ADouble step(ADouble spot, ADouble z, int i)

One step forward from step i given a standard-normal draw z.