Skip to main content

Covariates in time series forecasting

This document summarizes how different forecasting libraries define its covariates for forecasting

Libraries used thus far

GQC has used tsai, darts and some libraries from the Nixtla-verse

note

Nixtla is a start up from a CMU PhD student. They have created multiple time series forecasting libraries.

Covariates defined in the neuralforecast

Exogenous variables

https://nixtla.github.io/neuralforecast/examples/exogenous_variables.html

From the site Exogenous variables can provide additional information to greatly improve forecasting accuracy. Some examples include price or future promotions variables for demand forecasting, and weather data for electricity load forecast. In this notebook we show an example on how to add different types of exogenous variables to NeuralForecast models for making day-ahead hourly electricity price forecasts (EPF) for France and Belgium markets.

y^[t+1:t+H]=Fθ(  y[:t],x[:t](h),x[:t+H](f),x(s))\mathbf{\hat{y}}_{[t+1:t+H]} = F_\theta(\;\mathbf{y}_{[:t]}, \mathbf{x}^{(h)}_{[:t]}, \mathbf{x}^{(f)}_{[:t+H]}, \mathbf{x}^{(s)})

where the regressors are static exogenous x(s)\mathbf{x}^{(s)}, historic exogenous x[:t](h)\mathbf{x}^{(h)}_{[:t]}, exogenous available at the time of the prediction x[:t+H](f)\mathbf{x}^{(f)}_{[:t+H]} and autorregresive features y[:t]\mathbf{y}_{[:t]}

Covariates defined in the darts

https://unit8co.github.io/darts/userguide/covariates.html

darts has a notion of static, future and past covariates.

  • past covariates are (by definition) covariates known only into the past (e.g. measurements)
  • future covariates are (by definition) covariates known into the future (e.g., weather forecasts)
  • static covariates are (by definition) covariates constant over time (e.g., product IDs). Check out our static covariates example notebook here for more information.