Skip to content

Time Series Decomposition: Classical Method

Last Update: June 1, 2022

Time Series Decomposition: Classical Method is used to estimate time series trend-cycle, seasonal and remainder components.

As example, we can delimit univariate time series y_{t} into training range y_{t(a)} for model fitting and testing range y_{t(b)} for model forecasting.

Then, we can do training range univariate time series classical additive seasonal decomposition by moving averages trend-cycle, seasonal and remainder components estimation. Notice that we have to evaluate whether time series classical additive or multiplicative seasonal decomposition is needed.

Next, we estimate trend-cycle component with formulas \hat{t}_{t(a)}=\frac{1}{2}\left ( sma_{m,t(a)}\left ( y_{t(a)} \right )+sma_{m,t(a)-1}\left ( y_{t(a)} \right ) \right )\;(1) when seasonal period m is an even number and \hat{t}_{t(a)}=sma_{m,t(a)}\left ( y_{t(a)} \right )\;(2) when seasonal period m is an odd number. As example, with monthly data, m=12. Training range trend-cycle component estimated values \hat{t}_{t(a)} are the two periods averages of univariate time series centered seasonal simple moving averages when seasonal period m is an even number and the univariate time series centered seasonal simple moving averages when seasonal period m is an odd number. Training range univariate time series centered seasonal simple moving averages sma_{m,t(a)}\left ( y_{t(a)} \right ) are the y_{t(a)} rolling averages with formulas sma_{m,t(a)}\left ( y_{t(a)} \right )=\frac{1}{m}\sum_{j=-k+1}^{k}y_{t(a)+j}\;(3) where k=\frac{m}{2}\;(4) when seasonal period m is an even number and sma_{m,t(a)}\left ( y_{t(a)} \right )=\frac{1}{m}\sum_{j=-k}^{k}y_{t(a)+j}\;(5) where k=\frac{m-1}{2}\;(6) when seasonal period m is an odd number. After that we estimate detrended univariate time series values with formula \hat{d}_{t(a)}=y_{t(a)}-\hat{t}_{t(a)}\;(7).

Later, we estimate seasonal component with formula \hat{s}_{t(a)}=\hat{si}_{t(a)}+\frac{1}{m}\left ( 0-\sum_{t(a)=1}^{m}\hat{si}_{t(a)} \right )\;(8). Training range seasonal component estimated values \hat{s}_{t(a)} are the estimated seasonal index values \hat{si}_{t(a)} adjusted so that they add to zero. As example, with monthly data, we estimate December seasonal index with formula \hat{si}_{d(a)}=\frac{1}{k}\sum_{j=1}^{k}\hat{d}_{d(a),j}\;(9) where k is the number of December detrended univariate time series values within training range. Training range December seasonal index value \hat{si}_{d(a)} is the average of all estimated December detrended univariate time series values.

Then we estimate remainder component with formula \hat{r}_{t(a)}=y_{t(a)}-\hat{t}_{t(a)}-\hat{s}_{t(a)}\;(10). Training range remainder component estimated values \hat{r}_{t(a)} are the y_{t(a)} values minus estimated trend-cycle component values \hat{t}_{t(a)} minus estimated seasonal component values \hat{s}_{t(a)}.

Below, we find example of training range univariate time series classical additive seasonal decomposition by moving averages using airline passengers data [1]. Training range as first ten years and testing range as last two years of data.

Figure 1. Microsoft Excel® training range univariate time series classical additive seasonal decomposition by moving averages using airline passengers data.

References

Data Description: Monthly international airline passenger numbers in thousands from 1949 to 1960.

Original Source: Box, G. E. P., Jenkins, G. M. and Reinsel, G. C. (1976). “Time Series Analysis, Forecasting and Control”. Third Edition. Holden-Day. Series G.

Source: datasets R Package AirPassengers Object. R Core Team (2021). “R: A language and environment for statistical computing”. R Foundation for Statistical Computing, Vienna, Austria.

My online courses are closed for enrollment.
+