Rlgt: Bayesian Exponential Smoothing Models with Trend Modifications

Slawek Smyl, Christoph Bergmeir, Erwin Wibowo, To Wang Ng, Xueying Long, Alexander Dokumentov, Daniel F. SchmidtOpenalex Unknown 2019 · DOI · OpenAlex

Abstract

The Rlgt package implements a suite of Global Trend models for time series forecasting, representing Bayesian generalizations and extensions of traditional Exponential Smoothing (ETS) models. Key innovations include nonlinear global trends, Student-t error distributions for robustness, and heteroscedastic error modeling. These methods are particularly effective for short time series and have demonstrated superior performance against classical algorithms on the M3 competition dataset. Models are implemented using Markov Chain Monte Carlo (MCMC) via the rstan package.

Introduction

Time series forecasting has long been dominated by classical methods such as ARIMA and Exponential Smoothing (ETS). While these frameworks are robust, they often struggle with real-world data characteristics such as extreme outliers, changing variance over time (heteroscedasticity), and complex, non-linear long-term trends. Standard models typically assume Gaussian error distributions, which can lead to poor performance when "black swan" events occur.

The Rlgt package addresses these challenges by transitioning ETS models into a Bayesian framework. By utilizing MCMC sampling, Rlgt provides full posterior distributions for forecasts, offering a more nuanced understanding of uncertainty compared to traditional point estimates.

Methodology

The core of the Rlgt framework consists of the Local and Global Trend (LGT) model and its seasonal variants, SGT and S2GT. These models incorporate several critical enhancements:

  1. Nonlinear Global Trend: By adding a global trend component to the local trend, the model captures long-term trajectories that deviate from simple linear or damped patterns.
  2. Student-t Error Distribution: The use of a Student-t distribution provides "heavy tails," making the model naturally resilient to outliers that would otherwise skew a Gaussian-based model.
  3. Adaptive Error Size: Heteroscedasticity is handled by modeling error size as a function of the current level, allowing uncertainty to scale with the magnitude of the data.
Key parameters for the Rlgt model fitting process, including MCMC and parallelization settings.

As shown in the parameter definitions, the model fitting process allows for explicit control over MCMC sampling (e.g., n.samples, burnin) and supports parallel execution to mitigate the computational overhead inherent in Bayesian methods.

Datasets and Evaluation

The efficacy of the Rlgt package has been validated using several benchmark and real-world datasets:

  • M3 Competition Dataset: A standard benchmark where Rlgt models outperformed all original classical participants.
  • iclaims.example: This dataset combines economic indicators with search engine data to provide a complex forecasting challenge.
Description of the iclaims.example dataset used for demonstrating the model's capabilities.
  • umcsent.example: Monthly consumer sentiment scores paired with Google Trends data.
  • Lynx: A classic dataset of Canadian lynx trappings used for demonstrating non-seasonal model performance.

Key Insights

A primary advantage of the Rlgt approach is its performance on short time series. Bayesian methods allow for the incorporation of prior knowledge, which stabilizes forecasts when data is sparse—a common failure point for deep learning or complex ARIMA models. Furthermore, by decomposing trends into local momentum and global trajectories, the model avoids overreacting to short-term noise while maintaining the integrity of the long-term path.

Results and Discussion

Empirical results from the M3 competition highlight the package's strength, with LGT and SGT models consistently outperforming classical algorithms. Beyond point accuracy, the Bayesian nature of the models ensures high-quality probabilistic coverage. Prediction intervals generated by the package have been shown to align closely with theoretical targets in test scenarios.

However, the computational intensity of MCMC remains a limitation. Fitting these models is significantly slower than traditional ETS, making them less suitable for high-frequency, large-scale automated forecasting systems without significant hardware resources. Additionally, the introduction of hyperparameters like power coefficients requires a degree of statistical expertise for optimal tuning in specialized use cases.

Conclusion

Rlgt represents a significant step forward in making robust Bayesian forecasting accessible to the R community. By integrating nonlinear trends and adaptive error structures, it provides a flexible toolset for tackling the complexities of modern time series data, particularly when robustness and uncertainty quantification are paramount.

Summary updated

Abstract

An implementation of a number of Global Trend models for time series forecasting that are Bayesian generalizations and extensions of some Exponential Smoothing models. The main differences/additions include 1) nonlinear global trend, 2) Student-t error distribution, and 3) a function for the error size, so heteroscedasticity. The methods are particularly useful for short time series. When tested on the well-known M3 dataset, they are able to outperform all classical time series algorithms. The models are fitted with MCMC using the 'rstan' package.
BibTeX
@inproceedings{smyl2019rlgt,
  author = {Slawek Smyl and Christoph Bergmeir and Erwin Wibowo and To Wang Ng and Xueying Long and Alexander Dokumentov and Daniel F. Schmidt},
  title = {{Rlgt: Bayesian Exponential Smoothing Models with Trend Modifications}},
  booktitle = {Openalex Unknown},
  year = {2019},
  doi = {10.32614/cran.package.rlgt},
}
Figure