CopulaGenerator
Bases: BaseGenerator
Generate correlated time series using Gaussian or t copulas.
Copulas model the dependence structure between variables independently
of their marginal distributions. Sampling proceeds in two steps:
- Draw correlated uniforms from the copula. Gaussian copula:
z ~ N(0, R),u_i = Phi(z_i). t copula:z ~ N(0, R),w ~ chi2(df),u_i = T_df(z_i * sqrt(df / w))(the chi-square mixing is shared across variables, which creates tail dependence). - Map each uniform through the inverse CDF of its marginal:
x_i = F_i^{-1}(u_i).
spearman = (6 / pi) * arcsin(rho / 2) and for both copulas
kendall_tau = (2 / pi) * arcsin(rho).
generate(n_series) creates n_series correlated variables sharing
one length; each variable is one unique_id in the long-format output.
Samples are i.i.d. over time (no serial dependence).
Parameters:
CopulaGenerator.generate_single_series
Returns:
CopulaGenerator.generate
Returns:
VARGenerator
Bases: BaseGenerator
Generate correlated time series using a Vector Autoregression model.
A VAR(p) process models each variable as a linear function of past
values of all variables:
(I - A_1 - ... - A_p)^{-1} c. Innovations are drawn from the
configured innovation distribution and correlated via the Cholesky
factor of Sigma. A burn-in of 100 steps is discarded.
generate(n_series) creates n_series correlated variables sharing
one length; each variable is one unique_id in the long-format output.
Parameters:
VARGenerator.generate_single_series
Returns:
VARGenerator.generate
Returns:
GaussianProcessGenerator
Bases: BaseGenerator
Generate time series by sampling from a Gaussian Process.
Samples f ~ GP(mean, k) on the integer grid t = 0..length-1, so the
marginal distribution is N(mean, amplitude^2 + noise_variance) and
the correlation at lag r is k(r) / k(0).
Kernels (r = |t - t’|, l = length_scale, a = amplitude):
- rbf:
a^2 exp(-r^2 / (2 l^2))— infinitely differentiable, very smooth paths - matern_0.5:
a^2 exp(-r/l)— rough, Ornstein-Uhlenbeck-like - matern_1.5:
a^2 (1+s) exp(-s), s = sqrt(3) r / l — once-differentiable - matern_2.5:
a^2 (1+s+s^2/3) exp(-s), s = sqrt(5) r / l — twice-differentiable - periodic:
a^2 exp(-2 sin^2(pi r / period) / l^2)— exact periodicity
GaussianProcessGenerator.generate_single_series
Returns:

