mixle.stats.multivariate.student_t_copula module¶
Student-t copula: an elliptical copula like the Gaussian but with heavy, SYMMETRIC tail dependence.
The Gaussian copula is tail-INDEPENDENT: extreme joint moves are asymptotically as rare as independence would
predict – the flaw widely blamed for underpricing joint defaults in the 2008 crisis. The Student-t copula
keeps the Gaussian’s correlation matrix R but pulls each uniform back through a t_nu quantile instead
of a normal one, giving symmetric UPPER- and lower-tail dependence controlled by the degrees of freedom
nu (small nu = heavy joint tails; nu -> inf recovers the Gaussian copula). Its density on
(0,1)^d is the multivariate-t density at the t-scores z_i = t_nu^{-1}(u_i) divided by the
product of univariate-t densities:
c(u) = f_mvt(z; R, nu) / prod_i f_t(z_i; nu).
Fit by the elliptical inversion estimator (R = the correlation of the t-scores, consistent since a
multivariate t has correlation R) with nu chosen by a profile likelihood over a small grid.
Reference: Demarta & McNeil, “The t Copula and Related Copulas” (Int. Stat. Review, 2005).
- class StudentTCopulaDistribution(corr, df, name=None, keys=None)[source]
Bases:
SequenceEncodableProbabilityDistributionStudent-t copula on
(0,1)^dwith correlationcorrand degrees of freedomdf.- log_density(u)[source]
Return the log-density or log-mass at a single observation.
- seq_log_density(u)[source]
Return vectorized log-density values for sequence-encoded observations.
- sampler(seed=None)[source]
Return a sampler for drawing observations from this distribution.
- Parameters:
seed (int | None)
- Return type:
StudentTCopulaSampler
- estimator(pseudo_count=None)[source]
Return an estimator for fitting this distribution from data.
- Parameters:
pseudo_count (float | None)
- Return type:
StudentTCopulaEstimator
- dist_to_encoder()[source]
Return the data encoder used by this distribution for vectorized methods.
- Return type:
UScoreEncoder
- class StudentTCopulaSampler(dist, seed=None)[source]
Bases:
DistributionSamplerDraw
z ~ mvt(R, nu)(Gaussian scaled by a chi-square) then map through the univariatet_nuCDF.- Parameters:
dist (StudentTCopulaDistribution)
seed (int | None)
- sample(size=None)[source]
Draw observations.
Combinator samplers (mixture/sequence/…) accept
batched. Withbatched=True(the default) each child stream is drawn in one vectorized call instead of a per-draw Python loop – far faster. Because every child sampler owns an independentRandomState, batching consumes each stream in the same order as the loop, so the draws are identical to the legacy path.batched=Falseforces that legacy per-draw loop as a guaranteed- stable reference. Leaf samplers are already vectorized and ignore the flag.
- class StudentTCopulaEstimator(dim, min_eig=1.0e-8, name=None, keys=None)[source]
Bases:
ParameterEstimatorInversion for
R(correlation of thet-scores) + profile likelihood overnuon a grid.- accumulator_factory()[source]
Return the accumulator factory used to collect this estimator’s sufficient statistics.
- Return type:
BufferedUScoreAccumulatorFactory