Docs / nablatensor-quant / com.nablatensor.quant

final class

CorrelatedNormals

Turns independent standard-normal draws into correlated ones by a fixed Cholesky factor. The correlation matrix is a plain double[][] (a model parameter, not a risk factor), so the factor is computed once at record time and the per-step mixing is a handful of primitive nodes.

Methods

static CorrelatedNormals of(double[][] corr)

Lower-triangular Cholesky factor L with L Lᵀ = corr.

static CorrelatedNormals pair(double rho)

The 2×2 case: [[1, rho], [rho, 1]].

int size()
ADouble[] mix(AadRecorder rec, ADouble[] independent)

Mixes size() independent draws into size() correlated ones: y = L x.

ADouble[] draw(AadRecorder rec)

Draws size() fresh independent normals and mixes them.