Académique Documents
Professionnel Documents
Culture Documents
Notation:
The use of time series has two main purposes: the analysis of the variations of the
phenomenon under study and the forecast of future situations from the available
information. In the current lesson we deal with the most basic questions related to
time series, as a detailed analysis requires the knowledge and the use of specific
techniques and methodologies that are beyond the scope of this subject.
The periodicity of a time series is the elapsed time between two observations of
the variable; thus, it can be daily, weekly, monthly, quarterly, four-monthly, six-
monthly, yearly, five-year, etc. We denote k the frequency that indicates the number
of observations of the variable each year:
Any time series analysis should start with its graphic representation:
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~2~
______________________________________________________________________
300000
250000
200000
150000
100000
50000
0
1995TIII
1996TIII
1997TIII
1998TIII
1999TIII
2000TIII
2001TIII
2002TIII
2003TIII
2004TIII
2005TIII
2006TIII
2007TIII
2008TIII
2009TIII
2010TIII
1995TI
1996TI
1997TI
1998TI
1999TI
2000TI
2001TI
2002TI
2003TI
2004TI
2005TI
2006TI
2007TI
2008TI
2009TI
2010TI
2011TI
Source: NSI.
This tool allows us for detecting features and characteristics of the phenomenon
under study, such as:
- Potential presence of a trend: long-run behaviour of the series.
- Potential presence of seasonality: periodic or regular behaviour of the series.
- Potential presence of heteroscedasticity: the variability of the series is not
constant over time (versus homoscedasticity, where it is constant)
The decomposition of a time series consists of calculating new time series - called
components -, as well as a scheme of relationship between them so that the original
time series Xt is obtained from its components by applying that scheme. The objective
of the decomposition process is that the individual analysis of the components (or the
series derived from them) provides additional information for understanding the
evolution of Xt.
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~3~
______________________________________________________________________
Each observation of a time series (each Xt) is the resultant of combining several
U U
It is the aggregate of two more basic sub-components: long-run trend and cycle.
We do not analyze them in this course because it requires a quite complex calculus. In
any case, their definitions are:
- Oscillations around the long-run trend, with a period greater than one year. Its
mean equals zero.
- These oscillations are related to the general level of activity in an economy, with
alternating periods of expansion and stagnation of the economic activity.
- The superposition of different cycles of this kind complicates the measurement of
this component.
In practice, it is quite difficult to separate the long-run trend from the cycle it is
usual to consider them jointly in the Pt component.
b. Seasonal component (St or Sij, with i-year and j-season of the t period)
- Oscillations with a period equal to or less than one year, and they are repeated
year after year in a recognizable manner. Its mean equals zero.
- They are usually related to climatological causes and the costumes they impose.
- This component verifies two basic hypotheses:
i) Seasonality associated to season j does not vary in the whole period under study
Sij = Sj, i.
ii) The mean of the seasonal components equals zero for each year in the additive
scheme and one in the multiplicative scheme.
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~4~
______________________________________________________________________
- Random movements which do not come from a given regular pattern; they are
caused by isolated factors that only affect the variable in precise moments.
- As they are purely transitory movements, its mean equals zero in the additive
scheme and one in the multiplicative scheme.
d. Calendar effect
- This component is not normally seen in books about general Statistics, but it has
great relevance in Economic Statistics, especially in situational analysis.
- It refers to the Easter effect, the number of days in a month, the number and
position of holidays, the leap years, etc.
- In this subject, we are not calculating this component.
a) Additive scheme
Cycle, seasonal and irregular components are quantities summed up to the trend
obtaining of the observed Xt.
Cycle, seasonal and irregular components are expressed so much for one of the
trend.
The scheme is selected from the data series, by means of analyzing the width of
the time series oscillations: if they are constant-width, we are in the case of
homoscedasticity; if they are non-constant width, we find heteroscedasticity. In this
lesson, the scheme will be decided by using the graph of the series (an alternative is to
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~5~
______________________________________________________________________
divide the series into groups containing q observations, calculate the mean and the
standard deviation, and analyze whether the SD depends on the mean or not).
In the homoscedastic case, the additive scheme is used; in the heteroskedastic
case, the multiplicative scheme is the one employed. Unless indicated otherwise, in this
course we will focus our attention on the additive scheme. In any case, the
multiplicative can be carried out by using the techniques applied for the additive
scheme and doing the following transformation:
This method consists of adjusting a function that links the variable as a function of
time, being a simple function but reflecting in a satisfactory manner the general
evolution of the phenomenon. Then, we should take two decisions: first, determine the
functional form and, second, determine the specific values for the parameters. In case
we assume a linear trend, = + , the usual equations are:
= +
= + 2
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~6~
______________________________________________________________________
The main advantages of this method are that we can obtain a goodness-of-fit
measure and that we do not lose observations when calculating the trend.
When seasonality exists, it is desirable not to use the original data; they should be
previously transformed so as to eliminate the seasonal component (it might distort the
estimation of the trend). For doing this, the advice is to calculate annual means and to
adjust the linear function to these means.
This method is based on the smoothness of the series through the repeated
calculation of arithmetic means for k consecutive values, that we denote moving
average of order k [MAk(Xt)]. In other words, this is a local approach where the
trend in t is obtained as a function of the observations close to t.
We select a value for k that reflects the period of the most important oscillations
(k=1 for annual series, k=2 for six-monthly series, k=3 for quarterly series, etc.).
When k is odd, we determine a new series in the following manner:
ki=1 yi k+1
i=2 yi k+2
i=3 yi
yk+1 = , yk+3 = , yk+5 = , etc.
2 k 2 k 2 k
When k is even, we repeat the previous process, but now we find the problem of
k+1 k+3 k+5
, , , etc. not being whole numbers; thus, the new series is displaced
2 2 2
and it is not possible to assign the moving average to a concrete period. In order to
center it, after calculating the previous moving-averages series, we average two of
them:
k+1 + y
y k+3 k+3 + yk+5
y k+5 + yk+7
y
yk+2 = 2 2
, yk+4 = 2 2
, yk+6 = 2 2
, etc.
2
2 2
2 2
2
+2 +4 +6
Now, , , , etc. are whole values.
2 2 2
Once the moving averages have been obtained, the trend will be the line that
connects these values.
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~7~
______________________________________________________________________
This procedure has two disadvantages; first, it is not presented along with a
reliability measure analogous to the coefficient of determination and, second, it
involves the loss of observations. At this respect, the number of data that are lost
depends on the value of k, as the larger k is, the higher the number of observations
that are lost; moreover, it also depends on whether k is even or odd (i.e., that the
series needs to be centered later or not), as values are lost in the new obtained series
each time moving averages are calculated. Then,
k+1
When k is odd, 1 first and last observations are lost.
2
k
When k is even, ahead observations and 1 back observations are lost in
2 2
k+2
the first moving-averages series; 1 ahead and back observations are lost in the
2
The next table summarizes the previous results for the different periodicities:
As an example of the k odd case, in the following table we show the four-monthly
time series Xt Number of travellers (in thousand people) accommodated in Galician
hotel establishments between 2011 and 2013, together with its trend.
Period Xt Pt=MA3(Xt)
2011.I 196
2011.II 390 268
2011.III 218 273.33
2012.I 212 275
2012.II 395 294
2012.III 275 289
2013.I 197 286.33
2013.II 387 292
2013.III 292
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~8~
______________________________________________________________________
As an example of the k even case, in the following table we report the values for
the quarterly time series Xt Quarterly sales of a heating appliances company (104 )
between 2014 and 2014, together with its trend.
The seasonal component of a time series can only be determined when that series
has a less than one year periodicity one. The notation in this case is:
i year i=1, , n
Xij observations with less than one year periodicity
j season j=1, , k
Following this notation, there are two hypotheses regarding the seasonal
component:
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~9~
______________________________________________________________________
Seasonal indexes represent the variation with respect to the trend that takes place
in each season, and the seasonal component is the time series that contains the
repetition of the seasonal indexes for every year in the study.
In order to calculate the seasonal indexes we have to carry out the following
steps:
1. We remove the trend from the original series and obtain the so-called series
without trend; it is denoted by Zij = Xij - Pij, i=1,,n; j=1,,k.
2. For each j season, we calculate (for the total number of years) the arithmetic
means for the Zij series previously obtained: Zj = =
, j=1,,k (be careful!, n does
3. For each j season, we calculate Z*, which is the arithmetic mean of the results
=
obtained in the previous section for the k seasons: = .
This step is carried out so as to obtain balanced seasonal coefficients (i.e., the
sum equals zero).
4. In the last step, we calculate Sj = Zj - Z* (both terms in the difference are the
outcomes from steps 2 and 3).
In many cases it is interesting to study the smoothed series, that is, to calculate
and analyze a new time series which does not reflect the periodic fluctuations that
occur every year. This series is known as seasonally adjusted series (SAt): it
removes the seasonality effect from the original series and its analysis is very helpful in
order to understand the evolution of the variable.
Under an additive scheme, it is calculated in the following manner:
= = +
It is the aggregate of the trend-cycle and the irregular component, that is, the
observed series without the seasonal component.
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~ 10 ~
______________________________________________________________________
Spanish Gross Domestic Product (supply; seasonal and calendar effects adjusted
data; current prices)
300000
250000
200000
150000
100000
50000
0
1995TIII
1996TIII
1997TIII
1998TIII
1999TIII
2000TIII
2001TIII
2002TIII
2003TIII
2004TIII
2005TIII
2006TIII
2007TIII
2008TIII
2009TIII
2010TIII
1995TI
1996TI
1997TI
1998TI
1999TI
2000TI
2001TI
2002TI
2003TI
2004TI
2005TI
2006TI
2007TI
2008TI
2009TI
2010TI
2011TI
Source: NSI.
For example, in the case of the time series Xt Quarterly sales of heating
appliances company (104 ) between 2010 and 2014, the seasonal indexes of the
seasonal component will be:
Seasonal indexes
5
0
1 2 3 4
-1
-2
-3
Once we have the seasonal indexes, we can obtain the irregular component.
In this case we should be careful, as not all the components are defined for all periods.
1. If we have the original series and we have calculated the trend and the seasonal
component, then Ut = Xt Pt St.
2. If we have the seasonally adjusted series and the trend, then Ut = SAt Pt.
For example, in the case of the time series X Quarterly sales of a heating
appliances company (104 ) between 2010 and 2014, we calculate the seasonally
adjusted series as well as the irregular component:
Period Xt Pt St SAt Ut
2010.QI 7.2 -0.100 7.300
2010.QII 5 -1.881 6.881
2010.QIII 4.6 6.650 -1.834 6.434 -0.216
2010.QIV 10 6.538 3.816 6.184 -0.353
2011.Q 6.8 6.388 -0.100 6.900 0.513
2011.QII 4.5 6.450 -1.881 6.381 -0.069
2011.QIII 3.9 6.538 -1.834 5.734 -0.803
2011.QIV 11.2 6.475 3.816 7.384 0.909
2012.QI 6.3 6.625 -0.100 6.400 -0.225
2012.QII 4.5 6.588 -1.881 6.381 -0.206
2012.QIII 5.1 6.488 -1.834 6.934 0.447
2012.QIV 9.7 6.463 3,816 5.884 -0.578
2013.Q1 7 6.325 -0.100 7.100 0.775
2013.QII 3.6 6.338 -1.881 5.481 -0.856
2013.QIII 4.9 6.150 -1.834 6.734 0.584
2013.QIV 10 6.150 3.816 6.184 0.034
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~ 12 ~
______________________________________________________________________
Quarter
In this case we have a short time series, with only twenty observations (over five
years). The graph for Xt does not show a clear trend, but presents seasonality and
homoscedasticity. The graph for the trend shows a slight decreasing trend. The graph
for the seasonal component reveals its remarkable influence in the last quarter. Last,
the irregular component exhibits important non-seasonal oscillations.
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~ 13 ~
______________________________________________________________________
EXAMPLE 1
Assuming an additive scheme, a) obtain the turnover trend through the moving
average method; b) calculate the seasonal component and the seasonally adjusted
series; c) calculate the irregular component.
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~ 14 ~
______________________________________________________________________
Seasonal coefficients
[mean - (sum/3)] -1169.13 1314.84 -145.71 Sum = 0
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~ 15 ~
______________________________________________________________________
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~ 16 ~
______________________________________________________________________
GRAPHS
Original series
5000
4500
4000
3500
3000
2500
2000
1500
1000
500
0
Trend-cycle series
3000
2900
2800
2700
2600
2500
2400
1500
1000
500
-500
-1000
-1500
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~ 17 ~
______________________________________________________________________
3500
3000
2500
2000
1500
1000
500
150
100
50
-50
-100
-150
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 5. Time series Statistics I ~ 18 ~
______________________________________________________________________
Date Original series MA order 12 (MA 12)2 Series witho. Seasonal Irregular SA
Fecha Serie original MM orden 12 Trend
(MM 12)2 trendsin Componente
Serie comp. comp.
Variaciones series
Serie
Tendencia tendencia estacional irregulares desestac.
0501 94.3 1.23 93.07
0502 97.7 1.04 96.66
0503 102.6 6.25 96.35
0504 104.5 -1.95 106.45
0505 104.4 7.08 97.32
0506 107.6 5.65 101.95
0507 104 99.99 100.28 3.73 4.58 -0.86 99.42
0508 74.1 100.56 100.73 -26.63 -27.71 1.09 101.81
0509 105.5 100.89 101.42 4.08 1.45 2.63 104.05
0510 102.3 101.95 101.54 0.76 4.75 -3.99 97.55
0511 108.3 101.13 101.43 6.87 6.47 0.41 101.83
0512 94.6 101.72 101.93 -7.33 -8.85 1.51 103.45
0601 101.1 102.15 102.31 -1.21 1.23 -2.43 99.87
0602 101.7 102.47 102.56 -0.86 1.04 -1.90 100.66
0603 115.3 102.65 102.68 12.63 6.25 6.37 109.05
0604 94.7 102.70 102.98 -8.28 -1.95 -6.34 96.65
0605 111.4 103.27 103.43 7.97 7.08 0.89 104.32
0606 112.8 103.59 103.63 9.18 5.65 3.52 107.15
0607 107.8 103.66 103.94 3.86 4.58 -0.72 103.22
0608 76.3 104.22 104.35 -28.05 -27.71 -0.33 104.01
0609 106.1 104.48 104.53 1.57 1.45 0.12 104.65
0610 109.1 104.58 104.78 4.32 4.75 -0.42 104.35
0611 112.2 104.98 105.13 7.07 6.47 0.60 105.73
0612 95.4 105.28 105.29 -9.89 -8.85 -1.04 104.25
0701 107.8 105.29 105.49 2.31 1.23 1.08 106.57
0702 104.8 105.69 105.77 -0.97 1.04 -2.01 103.76
0703 116.5 105.84 105.78 10.72 6.25 4.46 110.25
0704 99.5 105.73 105.97 -6.47 -1.95 -4.52 101.45
0705 115.1 106.21 106.17 8.93 7.08 1.85 108.02
0706 112.9 106.13 106.14 6.76 5.65 1.10 107.25
0707 112.6 106.15 106.11 6.49 4.58 1.90 108.02
0708 78.1 106.08 106.24 -28.14 -27.71 -0.43 105.81
0709 104.7 106.41 105.67 -0.97 1.45 -2.42 103.25
0710 114.9 104.93 105.42 9.48 4.75 4.73 110.15
0711 111.3 105.92 105.51 5.79 6.47 -0.68 104.83
0712 95.6 105.11 104.60 -9.00 -8.85 -0.15 104.45
0801 106.9 104.08 104.00 2.90 1.23 1.68 105.67
0802 108.8 103.91 103.53 5.27 1.04 4.23 107.76
0803 98.7 103.16 102.95 -4.25 6.25 -10.51 92.45
0804 111.4 102.75 102.17 9.23 -1.95 11.18 113.35
0805 105.4 101.58 100.73 4.67 7.08 -2.41 98.32
0806 100.6 99.88 99.25 1.35 5.65 -4.30 94.95
0807 110.5 98.61 4.58 105.92
0808 69.1 -27.71 96.81
0809 99.8 1.45 98.35
0810 100.9 4.75 96.15
0811 90.9 6.47 84.43
0812 80.3 -8.85 89.15
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 3. Time series Statistics I ~ 19 ~
______________________________________________________________________
SEASONAL
DETALLE COMPONENT DETAIL
DEL CLCULO DEL COMPONENTE ESTACIONAL
January
Enero February
Febrero March
Marzo April
Abril May
Mayo June
Junio JulyJulio August
AgostoSeptember October
Septiembre November
Octubre December
Noviembre Diciembre
2005 2005 3.73 -26.63 4.08 0.76 6.87 -7.33
2006 2006 -1.21 -0.86 12.63 -8.28 7.97 9.18 3.86 -28.05 1.57 4.32 7.07 -9.89
2007 2007 2.31 -0.97 10.72 -6.47 8.93 6.76 6.49 -28.14 -0.97 9.48 5.79 -9.00
2008 2008 2.90 5.27 -4.25 9.23 4.67 1.35
Mean
Media 1.33 1.15 6.36 -1.84 7.19 5.76 4.69 -27.60 1.56 4.85 6.58 -8.74 Suma
Sum 1.301.30
Sum/12
Suma/12 0.11 0.11 0.11 0.11 0.11 0.11 0.11 0.11 0.11 0.11 0.11 0.11
Seaso. comp.
Comp. estac. 1.23 1.04 6.25 -1.95 7.08 5.65 4.58 -27.71 1.45 4.75 6.47 -8.85 Sum
Suma 0.000.00
(Appr.
(Aproximacin decimales)
decimals)
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 3. Time series Statistics I ~ 20 ~
______________________________________________________________________
IPI
IPI
140
140
120
120
100
100
Serie original
Tendencia Serie desestacionalizada
80
80
60
60
40
40
0501 0506 0511 0604 0609 0702 0707 0712 0805 0810
0501 0506 0511 0604 0609 0702 0707 0712 0805 0810
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 3. Time series Statistics I ~ 21 ~
______________________________________________________________________
EXAMPLE 3. Wage-earners with temporary contract in the services sector: multiplicative scheme decomposition
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017
Lesson 3. Time series Statistics I ~ 22 ~
______________________________________________________________________
Year I II III IV
1997 0.02287 -0.00192
1998 -0.01592 -0.00958 0.02980 -0.02252
1999 -0.02054 0.00664 0.03936 -0.01010
2000 -0.03702 0.00504 0.04676 -0.00302
2001 -0.03653 -0.01087
Mean -0.02750 -0.00219 0.03469 -0.00939 Sum -0.00439
Correction -0.00110 -0.00110 -0.00110 -0.00110
Seaso. c. -0.02640 -0.00110 0.03579 -0.00829 Seaso. sum 0.00000
(Appr. decimals)
______________________________________________________________________
Degree in Economics / Estefana Mourelle Espasandn 2016/2017