Skip to main content

risk.StudentTCopula

The Student t copula with correlation matrix correlation and nu

Usage

Source

risk.StudentTCopula()

degrees of freedom: Gaussian-like correlation with joint extremes.

Parameters

correlation: list of list of float

Symmetric, unit diagonal, positive definite.

nu: float
Degrees of freedom, positive.

Raises

ValueError
If the matrix or nu is invalid.

Examples

>>> from prospicio.risk import StudentTCopula
>>> StudentTCopula([[1.0, 0.5], [0.5, 1.0]], 4.0).dim

2

Attributes

Name Description
dim Number of dimensions.
nu Degrees of freedom.

dim

Number of dimensions.

dim: int


nu

Degrees of freedom.

nu: float

Methods

Name Description
cdf() The copula’s distribution function at the point u, each
sample() n draws of uniforms; draw i uses stream i of seed.

cdf()

The copula’s distribution function at the point u, each

Usage

Source

cdf(u)

coordinate in [0, 1].

Parameters
u: list of float
One value per dimension.
Returns
float
Raises
ValueError

If u has the wrong length or a value outside [0, 1], or the copula has no closed-form distribution function here.

The t copula has none yet: this always raises ValueError.

sample()

n draws of uniforms; draw i uses stream i of seed.

Usage

Source

sample(n, seed)
Parameters
n: int
seed: int
Returns
list of list of float