Skip to main content

Module paths

Module paths 

Source
Expand description

Public path generation over the stochastic-process traits — the library’s sample_paths API (the TF-Quant-Finance idiom): give it a process, an initial state and a sampling configuration, get back the simulated paths as a dense matrix, generated in parallel with the same deterministic draw discipline the pricing engines use.

Two entry points:

Paths exclude the initial state (they start at the first step), the convention every payoff in the library assumes. Draws are per-path deterministic — path i under seed s is the same regardless of thread scheduling or how many other paths are requested alongside it.

Structs§

FactorScratch
Per-thread scratch for multi-factor draw generation.
MultiPaths
Simulated multi-state paths: path i, step j is a dim-long state vector at data[(i * steps + j) * dim ..][..dim].
Paths
Simulated scalar paths in dense row-major storage: path i occupies steps consecutive values, excluding the initial state.
SampleConfig
Sampling configuration shared by both entry points.

Enums§

MultiDraws
Per-path factor draws for multi-state processes, step-major: the increments of step j occupy dw[j * factors ..][..factors]. Public so streaming multi-asset engines can consume draws without materializing a MultiPaths matrix.
PathDraws
Deterministic per-path Brownian increment source. Pseudo-random paths come in antithetic pairs (2k, 2k+1) from independent per-pair streams; low-discrepancy paths are sequence points routed through the Brownian bridge.
Sampler
Draw sampler. Sobol selects the low-discrepancy family: true Sobol (van der Corput) in one dimension, a scrambled multi-dimensional sequence through a Brownian bridge for path-wise simulation. PseudoRandom uses seeded per-path PCG64 streams with antithetic pairing.

Functions§

sample_paths
Simulate paths of an N-state process from the state x0. The stepping scheme is the process’s own evolve (multi-factor schemes are process-owned — e.g. Heston full-truncation or QE); dw carries independent increments, any factor correlation lives inside the process.
sample_paths_1d
Simulate paths of a scalar process from x0 under the given discretization scheme.