# Periodic Fluctuations

 English Português Français ‎Español Italiano Nederlands

So far from the original observed time series only the trend has been estimated. Information about seasonal attributes was dealt with, smoothed out, by the selection of a suitable filter. Now the season components are also to be estimated. For a better understanding, we introduce some useful definitions first.

• Periods: ${\displaystyle p_{i},\ i=1,\dots ,P}$ Number of repetitions of one season.Example: Quarterly data over 10 years: ${\displaystyle P=10}$
• Time subintervals: ${\displaystyle k_{j},\ j=1,\dots ,k}$ Number of observations in a seasonal cycle.Example: Quarterly data: ${\displaystyle k=4}$
• Total number of observations: ${\displaystyle T=k\cdot P}$
• (Estimated) Trend values: ${\displaystyle {\widehat {x}}_{i,j}}$
• Observed values: ${\displaystyle x_{i,j}}$

One must distinguish between additive and multiplicative time series models: An additive relationship between trend, seasonal component and residuals is considered in the additive model while this relationship is multiplicative in multiplicative model. Accordingly the calculations of the estimated seasonal fluctuation components: ${\displaystyle s_{i,j}}$ One must distinguish between additive and multiplicative time series models: An additive relationship between trend, seasonal component and residuals is considered in the additive model while this relationship is multiplicative in multiplicative model. Accordingly the calculations of the estimated seasonal components differ.

• Additive time series model ${\displaystyle s_{i,j}=x_{i,j}-{\widehat {x}}_{i,j}\,,\quad {\bar {s_{j}}}={\frac {1}{P}}\sum \limits _{i=1}^{P}s_{i,j}}$ ${\displaystyle {\widehat {x}}_{i,j}^{ZRM}={\widehat {x}}_{i,j}+{\bar {s_{j}}}\ \;\;for\;i=1,\dots ,P\;\;\ j=1,\dots ,k}$ The forecasted value of the variable ${\displaystyle X}$ from the time series model (ZRM) consists of the estimated trend value ${\displaystyle {\widehat {x}}_{i,j}}$ added to the mean (estimated) seasonal coefficient ${\displaystyle {\bar {s_{j}}}}$.
• Multiplicative time series model ${\displaystyle s_{i,j}={\frac {x_{i,j}}{{\widehat {x}}_{i,j}}}\,,\quad {\bar {s_{j}}}={\frac {1}{P}}\sum \limits _{i=1}^{P}s_{i,j}}$ ${\displaystyle {\widehat {x}}_{i,j}^{ZRM}={\widehat {x}}_{i,j}\cdot {\bar {s_{j}}}\;\;for\;\;i=1,\dots ,P\;\;\ j=1,\dots ,k}$ The forecasted value of the variable ${\displaystyle X}$ from to the time series model (ZRM) consists of the estimated trend value ${\displaystyle {\widehat {x}}_{i,j}}$ multiplied by the mean (estimated) seasonal coefficient ${\displaystyle {\bar {s_{j}}}}$.

Example: Number of newly registered cars in Berlin - 1977:1 - 1989:4 Additive time series model:Filter: ${\displaystyle [1/8,\ 1/4,\ 1/4,\ 1/4,\ 1/8]}$red: Original time seriesblack: Smoothed series (estimated trend)blue: Trend and seasonal component (estimated time series)

${\displaystyle j}$ sum ${\displaystyle {\bar {s_{j}}}}$ ${\displaystyle P}$
1 2.934 0.244 12
2 30.424 2.535 12
3 -17.434 -1.453 12
4 -16.120 -1.343 12

Explanation This example is similar to the interactive example with the additional opportunity to edit the XploRe code directly. Explanation Here you can select a time series, which is then decomposed into estimated trend, seasonal component and residuals. Consider for alternative selections, which time frequency the data were observed (e.g. monthly). The trend is estimated by the moving average method. You can choose one of several available filters. Suggestion Step one select a filter, which seems reasonable to you. Check on the basis the generated figure whether the filter you selected was actually suitable to filter (smooth) the seasonal component from the data or not. Also you should pay attention to the residuals. Are there outliers? Do the fluctuations of the residuals change over the time? Repeat the calculations and pay attention to the consequences of the application of different filters. Data You can select one of the following time series

• Circulation of moneyAmount of circulating money in Germany. Time period: 1968:1 - 1998:3Periodicity (frequency): Monthly data
• M3Money supply M3: change in % relative to the preliminary periodTime period: 1956:1 - 1998:3Periodicity (frequency): Monthly data
• Balance of paymentsBalance of payments of Germany Time period: 1977 – 1995 Periodicity (frequency): Yearly data
• New car registrationsNumber of newly registered cars in Berlin Time period: 1977:1 - 1998 :4Periodicity (frequency): Quarterly data
• RainPrecipitation in Potsdam, GermanyTime period: 1984:1 - 1995:1Periodicity (frequency): Monthly data

This example shows, how one decomposes an observed time series ${\displaystyle x(t)}$ into estimates of the trend ${\displaystyle T(t)}$, the seasonal component ${\displaystyle S(t)}$ and a residual vector ${\displaystyle e(t)}$. The model considered has the additive form ${\displaystyle x(t)=T(t)+S(t)+e(t)}$. For illustration we apply the method to data on newly registered cars in Berlin.

### Trend

Two different procedures for estimation of the trend component were introduced above: The least squares and the moving average methods. Here the latter is used, where the trend is calculated according to ${\displaystyle T(t)=\sum _{i=-a}^{b}\lambda _{i}x_{t+i}\,,\ {\text{with}}\sum _{i=-a}^{b}\lambda _{i}=1\,.}$ In order to remove all seasonal variation, one applies the filter ${\displaystyle [1/8,1/4,1/4,1/4,1/8]}$ to the observed quarterly data. It gives an even consideration of past and future data (${\displaystyle a=b=2}$) and the same weighting of all seasons. Example: ${\displaystyle T(3)=1/8\cdot x(1)+1/4\cdot x(2)+1/4\cdot x(3)+1/4\cdot x(4)+1/8\cdot x(5)}$

### Seasonal variation

From the model ${\displaystyle x(t)=T(t)+S(t)+e(t)}$ it follows ${\displaystyle x(t)-T(t)=S(t)+e(t)}$. The left hand side of this equation is an estimated detrended series. Assuming that the seasonal variation in the respective quarters has the same value (thus e.g.: ${\displaystyle S(3)=S(7)=...=S(51)}$), an obvious procedure for the seasonal adjustment is the computation of the arithmetic means over all differences ${\displaystyle x(t)-T(t)}$, which belong to one season. Example: ${\displaystyle S(3)=S(7)=\dots =S(51)=[(x(3)-T(3))+(x(7)-T(7))+\dots +(x(51)-T(51))]/12}$ For this procedure it is not important which method was used to estimate the trend.

### Residuals

One calculates the estimated residuals via ${\displaystyle e(t)=x(t)-T(t)-S(t)}$.

### Results of the decomposition of car registration time series

You should check on the basis of the results for at least one period whether you can reconstruct the procedure described above or not.

quarter ${\displaystyle t}$ ${\displaystyle x(t)}$ ${\displaystyle T(t)}$ ${\displaystyle S(t)}$ ${\displaystyle e(t)}$
1977.1 1 15222
1977.2 2 17456
1977.3 3 12988 14897.9 -1909.9 -1452.8 -457.1
1977.4 4 13833 15127.8 -1294.8 -1343.3 48.5
1978.1 5 15407 15395.9 11.1 244.5 -233.4
1978.2 6 19110 15370.5 3739.5 2535.4 1204.1
1978.3 7 13479 15408.8 -1929.8 -1452.8 -477
1978.4 8 13139 15487.3 -2348.3 -1343.3 -1005
1979.1 9 16407 15246.3 1160.7 244.5 916.2
1979.2 10 18738 14891 3847 2535.4 1311.6
1979.3 11 11923 14663 -2740 -1452.8 -1287.2
1979.4 12 11853 14267.1 -2414.1 -1343.3 -1070.8
1980.1 13 15869 14058.5 1810.5 244.5 1566
1980.2 14 16109 14160.9 1948.1 2535.4 -587.3
1980.3 15 12883 13971.5 -1088.5 -1452.8 364.3
1980.4 16 11712 13707.8 -1995.8 -1343.3 -652.5
1981.1 17 14495 13298 1197 244.5 952.5
1981.2 18 15373 12905.1 2467.9 2535.4 -67.5
1981.3 19 10341 12641.3 -2300.3 -1452.8 -847.5
1981.4 20 11111 12205.5 -1094.5 -1343.3 248.8
1982.1 21 12985 11850.1 1134.9 244.5 890.4
1982.2 22 13397 11608.3 1788.7 2535.4 -746.7
1982.3 23 9474 11530.5 -2056.5 -1452.8 -603.7
1982.4 24 10043 11907.6 -1864.6 -1343.3 -521.3
1983.1 25 13431 12450.5 980.5 244.5 736
1983.2 26 15968 12824.3 3143.7 2535.4 608.3
1983.3 27 11246 13161.1 -1915.1 -1452.8 -462.3
1983.4 28 11261 13172.4 -1911.4 -1343.3 -568.1
1984.1 29 14908 12905.5 2002.5 244.5 1758
1984.2 30 14581 12736.5 1844.5 2535.4 -690.9
1984.3 31 10498 12182.3 -1684.3 -1452.8 -231.5
1984.4 32 10657 11738.1 -1081.1 -1343.3 262.2
1985.1 33 11078 11894.6 -816.6 244.5 -1061.1
1985.2 34 14858 12232.4 2625.6 2535.4 90.2
1985.3 35 11473 12788.6 -1315.6 -1452.8 137.2
1985.4 36 12384 13414.6 -1030.6 -1343.3 312.7
1986.1 37 13801 14047.3 -246.3 244.5 -490.8
1986.2 38 17143 14685.3 2457.7 2535.4 -77.7
1986.3 39 14249 14826.5 -577.5 -1452.8 875.3
1986.4 40 14712 14633.8 78.2 -1343.3 1421.5
1987.1 41 12603 14761 -2158 244.5 -2402.5
1987.2 42 16799 15038.3 1760.7 2535.4 -774.7
1987.3 43 15611 15204.5 406.5 -1452.8 1859.3
1987.4 44 15568 15301.1 266.9 -1343.3 1610.2
1988.1 45 7 13077 15157 -2080 244.5 -2324.5
1988.2 46 17098 14665.1 2432.9 2535.4 -102.5
1988.3 47 14159 14481.8 -322.8 -1452.8 1130
1988.4 48 13085 14514.5 -1429.5 -1343.3 -86.2
1989.1 49 14093 14155.9 -62.9 244.5 -307.4
1989.2 50 16344 13976.1 2367.9 2535.4 -167.5
1989.3 51 12044
1989.4 52 13762

Finally the result of the decomposition is graphically illustrated. Note that the estimated trend series ${\displaystyle T(t)}$ (the green series) actually contains no more seasonal variation. This acknowledges the adequacy of selecting the filter ${\displaystyle [1/8,1/4,1/4,1/4,1/8]}$ for smoothing time series with quarterly data. Note: In the diagram the black line represents our actual observed data series, green is the estimated trend component, the blue line is the estimated seasonal component and the red line is the estimated residuals.