Patterns › Time series

Decomposable forecast (trend + seasonality)

Decomposable additive forecast splits a series into a piecewise-linear trend with automatically placed rate changepoints plus a Fourier-series seasonal pattern, fits them jointly, and projects h steps ahead with a prediction band.

What is Decomposable forecast (trend + seasonality)?

The series is modelled as y(t) = trend(t) + seasonality(t) + noise. The trend is piecewise-linear: a base growth rate plus a set of candidate 'changepoints' (evenly spaced over the first 80% of history) where the rate is allowed to shift. A sparsity (Laplace) prior on those rate shifts keeps most of them at exactly zero, so only the changepoints the data really need stay active — this is the automatic changepoint selection. Seasonality is a sum of sine/cosine harmonics at the chosen period, entered as ordinary regressors. Everything is fit at once by penalised least squares (a MAP estimate).

The forecast interval reflects trend uncertainty: future rate changes are assumed to arrive at the same frequency and typical size as the changepoints seen in history, so the band widens with the horizon. With no changepoints and no seasonality the model reduces to an ordinary least-squares linear trend; with a flat trend it reduces to harmonic (Fourier) regression.

When should I use Decomposable forecast (trend + seasonality)?

  • Forecasting a single series with a trend that bends at a few points and a repeating seasonal cycle.
  • When you want the trend and seasonal pieces exposed separately, plus where the trend changed slope.
  • A robust automatic baseline for business-style series with strong seasonality.

What data does it need?

One numeric series (row order = time) + forecast horizon h + a seasonal period (or automatic detection) + the number of candidate trend changepoints + interval level.

What does it report?

A trend + seasonality component decomposition chart, a history-plus-forecast fan chart with the prediction band, a table of the active trend changepoints and their rate changes, and a table of point forecasts with lower/upper bounds.

What does it assume?

  • Series is regularly spaced and time-ordered.
  • The additive form holds (seasonal swing roughly constant in size over the level).
  • The chosen seasonal period matches the data's cycle length.
  • Future trend behaviour resembles the recent past — the band ignores regime change beyond changepoint-style rate drift.

How do I interpret the result?

The trend component shows the underlying level with season and noise removed; a changepoint with a large rate change marks where growth sped up or slowed. The seasonal component shows the repeating within-cycle pattern and integrates to about zero over a full period.

The point forecast drifts along the extrapolated trend with the seasonal pattern continued; the widening band shows how quickly trend uncertainty accumulates. Fit is by penalised least squares (no closed-form oracle), validated by synthetic recovery, exact component coherence, and its OLS reductions.

See also

References

  • Taylor, S. J. & Letham, B. (2018). Forecasting at scale. The American Statistician 72(1):37-45.