Skip to main content

Module copula

Module copula 

Source
Expand description

Copulas: dependence between marginals, separate from the marginals.

A copula draws one vector of uniforms per simulation; marginals are applied by inverse transform (simulate). Simulation i uses only StreamRng::new(seed, i), so results do not depend on thread count and any simulation replays alone (see docs/design/risk.md).

Structs§

ArchimedeanCopula
An exchangeable d-dimensional Archimedean copula with generator ψ_θ, sampled by Marshall and Olkin’s frailty method: draw a frailty V (whose Laplace transform is ψ), then d unit exponentials E_j, and return u_j = ψ(E_j / V).
GaussianCopula
The Gaussian copula with correlation matrix R.
StudentTCopula
The Student t copula with correlation matrix R and nu degrees of freedom.

Enums§

Archimedean
An Archimedean copula family; see ArchimedeanCopula.

Traits§

Copula
A d-dimensional copula.

Functions§

iman_conover
Reorders each component’s draws so the components have (close to) the target correlation of normal scores, by Iman and Conover (1982). Every component keeps exactly its own draws; only their pairing across simulations changes.
simulate
Simulates marginals joined by a copula: in simulation i, draws u from copula with StreamRng::new(seed, i) and sets component j to marginals[j].quantile(u_j).