Skip to main content
SynForecast generates synthetic time-series panels β€” validated, reproducible, and in the same long format as the rest of the Nixtlaverse. This guide goes from a one-line panel to explicitly controlled generators, injected real-world patterns, and mixed datasets.
Common uses
  • Testing a forecasting pipeline on data whose true process you know, before trusting it on real series.
  • Augmenting a small panel so a global model has more to learn from β€” see SynAugment.
  • Pretraining foundation models on a diverse corpus no single real dataset provides.
  • Sharing a reproducible example without exposing proprietary data.

1. Generate a panel in one line

generate_series draws from a balanced pool of generators spanning trends, seasonality, volatility clustering, counts, and more, then returns a panel you can hand straight to any Nixtla forecaster.
The Nixtla long format Every SynForecast output uses three columns β€” unique_id (series id), ds (timestamp), and y (value) β€” the schema statsforecast, mlforecast, and neuralforecast all expect, so no adapter is needed. The default engine="pandas" returns a pandas frame; pass engine="polars" (as here) for Polars.
Each line is a different data-generating process. Together they cover ARIMA dynamics, exponential smoothing, long memory, regime switching, volatility clustering, and irregular cycles. That diversity is what turns the panel into a stress test for a forecaster rather than one shape repeated six times. Don’t take that on trust β€” pass with_generator_col=True to record which generator produced each series:

2. Choose a generator when you need control

generate_series is the fast default. When you need a known process β€” for example, to confirm your model recovers an upward trend β€” instantiate a generator and set its parameters explicitly. Here, a random walk with positive drift and moderate volatility.
All four series share the same process but a different noise draw: the common upward pull is the drift, the jaggedness is the volatility. Change seed for fresh draws, or the parameters to reshape the process. Every generator’s full parameter set is listed in the generator reference.

3. Inject real-world patterns

Real series are rarely clean. Any generator can add anomalies, level shifts, and missing values, so you can measure how a model copes with them β€” and because everything is seeded, the messy series is reproducible.
Each pattern has its own guide The knobs above are the quick version. Fine-grained control lives in the capability guides: anomalies, changepoints, and missingness. To attach exogenous regressors, see exogenous.

4. Combine generators into one dataset

A realistic panel mixes behaviors. SynSet composes several generators into a single long-format dataset, with each generator contributing a batch of series under its own ids.
Reproducibility and the alpha API Generation is fully seeded: the same inputs produce the same panel across runs and regardless of n_jobs. SynForecast is in alpha, so seed-identical outputs may change between releases β€” pin a version if you depend on exact values.

Where to go next