Chapter 2 Introduction

The tsmodels framework provides a set of probabilistic time series forecasting models with common calling conventions and methods. Our objective was to provide a set of models which offer fast estimation, explainable decomposition and probabilistic predictions which can also be ensembled. Many of the models we have so far released are based on R. Hyndman et al. (2008), some of which are already implemented in the forecast package, but we have chosen to re-write the models from scratch based on our own design choices. Some of these choices include exclusive use of xts objects to represent time series data, data.table for certain outputs, probabilistic distributions for predictions via simulation as well as a feature rich set of methods to work with these models. Additionally, all of the our models benefit from automatic handling of missing data via the prediction step, and all models implement automatic differentiation during model estimation, making use of the TMB package. Some methods and features are still experimental and may change over time. Examples include the arguments and outputs as we work to unify and clean the codebase to be as consistent as possible across packages, and methods such as the empirical calibration of the predictive distribution.

We would be remiss if we were not to mention that alternative implementations exist within the single source of error (SEM) framework in R, including the forecast package of R. Hyndman et al. (2022) and smooth package of Svetunkov (2020), with their own design decisions. We make no representation as to what is likely to be more useful for a particular user, simply that our representation and framework is the right one for us. The set of packages we have released and plan to release may include bugs, and we encourage users to submit bug reports through the github issues system.

A summary of the currently available packages is given below:

Package Description
tsmethods Time Series S3 Methods, plotting functionality and ensembling
tsaux Auxilliary functions used by all packages
tsdatasets Datasets for benchmarking and examples
tsets ETS Models
tsissm Linear Innovations State Space Models with Multiple Seasonality
tsvets Vector Innovations Linear State Space Models
tsforeign Wrapper for other models [bsts (BSTS package), auto.arima (forecast package)]
tscausal Time Series Casual Inference
tsdistributions Time Series Parameterized Distributions

The following packages may be released in the future as time allows:

Package Description
tspyramid Hierarchical Probabilistic Reconcilitation using Tree Stuctures
tsssm Linear State Space Models
tslifecycle Models for Life Cycle Prediction
tsfactor Factor Models
tsgarch GARCH models (reimplementation of rugarch and rmgarch

See the News section for updates.

References

Hyndman, Rob, George Athanasopoulos, Christoph Bergmeir, Gabriel Caceres, Leanne Chhay, Kirill Kuroptev, Mitchell O’Hara-Wild, et al. 2022. Forecast: Forecasting Functions for Time Series and Linear Models. https://CRAN.R-project.org/package=forecast.
Hyndman, Rob, Anne B Koehler, J Keith Ord, and Ralph D Snyder. 2008. Forecasting with Exponential Smoothing: The State Space Approach. Springer Science & Business Media.
Svetunkov, Ivan. 2020. Smooth: Forecasting Using State Space Models. https://CRAN.R-project.org/package=smooth.