Skip to main content
TCMGenerator samples a temporal structural causal model (SCM): variables are connected through randomly sampled lagged edges, then the system is rolled forward with nonlinear edge functions and stochastic innovations. xi[t]=epa(i)fe(xje[te])+εi[t]x_i[t] = \sum_{e \in \mathrm{pa}(i)} f_e\big(x_{j_e}[t - \ell_e]\big) + \varepsilon_i[t] The temporal-SCM framing follows the overview in Runge et al. (2023), Causal inference for time series. SynForecast’s graph sampler, edge-function mixture, stability rescaling, and rollout guards are original design choices; this is not a reproduction of a generator from that paper.

Independent SCM draws

In the default univariate mode, each output series comes from a separately sampled SCM. The observed series is one node; other nodes in that SCM act as latent drivers.

Nodes from one shared SCM

Set multivariate=True to return several observed nodes from one jointly rolled-out SCM. Because the sampled edges are lagged, dependence between nodes appears in lagged cross-correlations rather than in the contemporaneous correlation matrix — and its strength varies pair by pair with the sampled graph: nodes connected by a directed path co-move, nodes without one stay near the noise floor. Below we compare the maximum absolute cross-correlation over lags 0–12 for every node pair against the same statistic on independent SCM draws.
Related generators
  • TSI — trend/seasonal/irregular composition; KernelSynth — GP kernel compositions.
  • VAR — linear multivariate dynamics without a random causal graph.
Full parameters are in the generator reference.