Skip to main content
Forecasts often improve when the model sees more than the target’s own past — calendar effects, known interventions, related drivers. Every SynForecast generator can attach these as extra columns via the exogenous parameter, so you can build test panels that exercise a model’s covariate handling end to end, all reproducible from the seed.
Three kinds of covariate
  1. Datetime features — calendar and cyclical (sin/cos) time encodings, added frequency-aware.
  2. Pattern-injection flags — binary anomaly_flag / changepoint_flag / missing_flag columns marking exactly where each injected pattern landed (ground-truth labels for detectors).
  3. Correlated exogenous — numeric columns statistically tied to the target series.

Datetime features

Enable datetime_features for calendar columns (year, month, day_of_week, hour, etc.) and datetime_cyclical for sin/cos encodings. Features are frequency-aware: hourly data includes hour, hour_sin/cos; daily data omits them since they would be constant.

Pattern injection flags

When pattern injection is enabled (anomalies, changepoints, missing data), you can get binary flag columns indicating exactly where each pattern was injected. This is useful for training anomaly detectors or evaluating changepoint detection algorithms.

Correlated exogenous variables

Generate additional numeric columns that are statistically related to the target series. Three methods are available:
These are derived from the target Each correlated column is computed from y — a correlated draw, a lagged copy, or a smoothed trend — so it carries information about the target by construction. That is exactly what you want when testing whether a model can exploit covariates. But treat them accordingly: a lagged_copy with lag=7 is only a leak-free feature for a real forecast if the lag exceeds the forecast horizon.

Combined: all exogenous types

All exogenous types can be combined freely in a single generator call.