Source-linked AI summary
MSTL: A Seasonal-Trend Decomposition Algorithm for Time Series with Multiple Seasonal Patterns
Kasun Bandara, Rob J Hyndman, Christoph Bergmeir
TL;DR
High-frequency time series often contain multiple seasonal patterns, while existing decomposition methods can be computationally inefficient or inaccurate. MSTL extends STL with iterative extraction of multiple seasonal components and achieves competitive results with lower computational cost on synthetic and perturbed real-world data.
Problem
High-frequency time series may contain multiple seasonal patterns, while existing methods can be computationally inefficient or inaccurate for decomposing them.
Method
MSTL is a fully automated additive decomposition algorithm that extends STL by iteratively estimating multiple seasonal components.
Results
MSTL provides competitive results with lower computational cost than other state-of-the-art decomposition algorithms on synthetic and perturbed real-world data.
Takeaways & Limitations
MSTL is presented as a fast decomposition algorithm for time series with multiple seasonal patterns.
Takeaways & Limitations
MSTL ignores frequencies smaller than half the series length because those frequencies cannot exhibit seasonal patterns.
Abstract
from arXiv · showhide
The decomposition of time series into components is an important task that helps to understand time series and can enable better forecasting. Nowadays, with high sampling rates leading to high-frequency data (such as daily, hourly, or minutely data), many real-world datasets contain time series data that can exhibit multiple seasonal patterns. Although several methods have been proposed to decompose time series better under these circumstances, they are often computationally inefficient or inaccurate. In this study, we propose Multiple Seasonal-Trend decomposition using Loess (MSTL), an extension to the traditional Seasonal-Trend decomposition using Loess (STL) procedure, allowing the decomposition of time series with multiple seasonal patterns. In our evaluation on synthetic and a perturbed real-world time series dataset, compared to other decomposition benchmarks, MSTL demonstrates competitive results with lower computational cost. The implementation of MSTL is available in the R package forecast.
1. Introduction
High-frequency time series can contain multiple seasonal cycles, motivating decomposition methods that are accurate and computationally efficient. MSTL extends STL to decompose multiple seasonal patterns through iterative seasonal extraction.
- Motivation: Accurate decomposition supports understanding contributing phenomena, short-term energy estimation, long-term planning, and decision-making.Daily and weekly patterns support short-term requirements, while yearly patterns support long-term energy planning.
- Motivation: High-frequency data can exhibit multiple seasonal patterns, such as daily, weekly, and potentially yearly cycles in energy-demand series.The Victoria example has daily period 48 and weekly period 336; longer observations may show yearly period 17532.
- Contribution: MSTL extends STL into a fully automated additive decomposition algorithm for time series with multiple seasonal cycles.It iteratively applies STL to estimate separate seasonal components.
- Contribution: MSTL orders identified seasonal cycles and controls each component’s smoothness, helping separate deterministic and stochastic seasonal variations.For non-seasonal series, it estimates only trend and remainder.
- Results: Competitive results with lower computational cost were reported for MSTL against other state-of-the-art decomposition algorithms on synthetic and perturbed real-world data.The authors characterize MSTL as fast, computationally efficient, and scalable to increasing time-series volumes.
2. Model Overview
MSTL produces an additive decomposition with one trend, multiple seasonal components, and a remainder. It identifies and orders seasonal frequencies, iteratively applies STL, and handles non-seasonal series with a smoother.
- Decomposition: MSTL extends additive STL decomposition by representing an observation as multiple seasonal components, trend, and remainder.The number of seasonal cycles is denoted by n.
- Seasonality identification: MSTL identifies seasonal frequencies, ignores frequencies smaller than half the series length, and sorts retained cycles in ascending order.The ordering is intended to reduce confounding in which lower-cycle components are absorbed by higher seasonal cycles.
- Preprocessing: MSTL imputes missing values and optionally applies a Box-Cox transformation before extracting seasonal components.The implementation uses na.interp for imputation and applies Box-Cox when λ ∈ [0, 1] is supplied.
- Seasonal extraction: For seasonal series, MSTL repeatedly fits STL to each selected frequency, then computes trend from the final STL iteration.An outer loop refines seasonal components, while s.window values control how quickly each seasonal pattern may vary.
- Non-seasonal handling: For non-seasonal series, MSTL estimates trend directly with Friedman’s Super Smoother and obtains the remainder by subtracting trend from the original series.For seasonal series, the remainder is obtained by subtracting trend from the seasonally adjusted series.
3. Experimental Setup
The evaluation compares MSTL with established decomposition and forecasting techniques on simulated daily/hourly series and perturbed hourly electricity-demand data. Across these settings, MSTL generally matches or improves benchmark RMSE while requiring the lowest execution time on the real-world data.
- Benchmarks and evaluation: The benchmark set includes STR, TBATS, and PROPHET, and decomposition accuracy is evaluated with RMSE between actual and estimated component values.The real-world study uses half-hourly Victoria electricity consumption aggregated to hourly data, with MSTL applied to series containing daily and weekly seasonality.
- Simulated Data: The experiments use deterministic and stochastic data-generating processes with time-invariant or time-varying components, respectively, across daily and hourly series.The simulated series contain trend, seasonal, and remainder components whose true values are known for component-level RMSE evaluation.
- Simulated Data: On daily simulations, MSTL outperforms TBATS on most Trend, Weekly, and Yearly seasonal components and has the best Weekly RMSE for stochastic processes.The evaluation averages RMSE over 150 simulations for each data-generating process.
- Simulated Data: On hourly simulations, MSTL achieves better RMSE on all components than PROPHET for both deterministic and stochastic data-generating processes, with the best Trend RMSE in one stochastic scenario.The highlighted scenario is (γ, σ2) = {(0.6, 0.075)}.
- Perturbed real-world data: MSTL significantly outperforms STR, TBATS, and PROPHET in estimating all components of perturbed hourly electricity-demand series, while also achieving the lowest execution time.The perturbed dataset contains 100 bootstrapped versions of the hourly electricity-demand series.
4. Conclusions
MSTL extends STL to decompose time series with multiple seasonal cycles, addressing the computational inefficiency of existing alternatives. Experiments on simulated and perturbed real-world data show competitive results at lower computational cost.
- Existing methods for multiple seasonal cycles are often based on complex procedures that can be computationally inefficient.
- MSTL extends STL, which extracts only one seasonality, to handle time series with multiple seasonal cycles.
- Experiments on simulated and perturbed real-world data show MSTL provides competitive results with lower computational cost than STR, TBATS, and PROPHET.
- MSTL is implemented as the mstl function in the forecast R package.
Appendix A. Results of seasonal window simulations
The appendix evaluates seasonal-window choices for MSTL using simulated daily and hourly time series. The results support defaults of 11 and 15, with the lower window preceding the higher one.
- The simulations use stochastic data-generating processes and examine daily and hourly series with multiple seasonal windows.S1.Window denotes the window for the lowest seasonal cycle, while S2.Window denotes the next highest cycle.
- The parameter search evaluates weekly and hourly datasets across window pairs drawn from S=(7,15,23,9999) and broader combinations satisfying S1.Window<S2.Window.
- S1.Window=11 and S2.Window=15 give the best median RMSE for weekly and hourly time series.These values correspond to C=7 and K=4 in the tested formula.
- Based on these simulations, MSTL uses the formula S=(C+K*i, C+K*i+1) with C=7 and K=4 for its default seasonal windows.
- Window combinations satisfying S1.Window < S2.Window produce the best median RMSE in Figure A.1.