Sunteți pe pagina 1din 32

Time Series Review Lecture

() 1 / 32
1 Introduction I

A time series data set consists of observations on one or more


variables taken at dierent points in time. For example, a data set
consisting of observations on Australian real GDP from 1990 to 2015
is a time series data set.
A time series data set consisting of observations on a single variable is
called a univariate time series.
A time series data set consisting of observations on several variables is
called a multivariate time series.
Time series data can be used to accomplish two important tasks for
which cross-sectional data are inadequate. These are:
Forecast future values of a variable.
Estimate the dynamic causal eect of one variable x on another variable
y. That is, estimate the causal eect on y over time of a change in x.

(ETC2410) 2 / 32
1 Introduction I
1.2 Properties of time series data

P1 Observations on time series data are ordered. That is, there is a


natural ordering in time in the sense that yt 1 precedes yt and yt
precedes yt +1 .
P2 Time series data is generally characterized by some form of temporal
dependence. That is, observations corresponding to dierent time
periods are often correlated.
P3 Because of temporal dependence, it is implausible to assume that the
random variables yt and yt j are i.i.d.

(ETC2410) 3 / 32
2 Stationary Time Series I

Denition (1.2)
The time series

fy t : t = ..... 2, 1, 0, 1, 2, ........g

is covariance stationary if
a) E(yt ) = < for all t.
b) Var(yt ) = E [(yt )2 ] = 0 < for all t.
c) Cov(yt , yt j ) = E [(yt )(yt j )] = j < for all t and j

Denition 1.2 states that the time series

fyt : t = 1, ......T g,

is weakly stationary if:

(ETC2410) 4 / 32
2 Stationary Time Series II

The mean of the time series is nite and time invariant.


The variance is nite and time invariant.
The covariance between any two observations depends only on the time
interval separating them and not on time itself. For example,

cov (y 1, y10 ) = cov (y 21, y30 ) = cov (y 101, y110 ).

(ETC2410) 5 / 32
3 Autocorrelation and Partial Autocorrelation Functions for
Stationary Time Series I

Two tools that are commonly used to assess the extent of temporal
dependence in a time series are the autocorrelation function (ACF)
and the partial autocorrelation function (PACF) of the time series.
The autocovariance coe cient between yt and yt j is dened as

j = E f[(yt E (yt )][[(yt j E (yt j )].

The correlation coe cient between yt and yt j is dened as


j
j = .
0

The parameter j measures the strength of the linear relationship


between yt and yt j .

(ETC2410) 6 / 32
3 Autocorrelation and Partial Autocorrelation Functions for
Stationary Time Series II

It can be shown that


1 j 18j .
The sign of j indicates the direction of the linear relationship
between yt and yt j and the absolute value of j measures the
strength of the linear relationship.
The ACF is obtained by plotting j against non-negative values of j.
Of course
j
j = (1)
0
is unobserved and in practise we use the sample correlation coe cient
_ _
bj

T
(yt y )(yt j y)
bj =
p = t =j +1 T _
b0
t =1 (y t y )2

(ETC2410) 7 / 32
3 Autocorrelation and Partial Autocorrelation Functions for
Stationary Time Series III

as an estimator of j , and we use the SAFC as an estimator of the


ACF.
A concept that is closely related to the ACF is the partial
autocorrelation function or PACF. The partial autocorrelation at
lag j, which we denote by jj , measures the correlation between yt
and yt j , when the intermediate values yt 1, ..., yt j +1 are considered
xed.
For example, 33 is the partial correlation coe cient at lag 3 in the
equation
yt = 31 yt 1 + 32 yt 2 + 33 yt 3 + ut . (2)
The sample partial correlation coe cient at lag 3 is the estimated
coe cient on yt 3 when (2) is estimated by OLS.

(ETC2410) 8 / 32
3 Autocorrelation and Partial Autocorrelation Functions for
Stationary Time Series IV

The sample partial autocorrelation function or sample PACF is


obtained by plotting b
jj against non-negative values of j.
In practise, we use the SACF and the SPACF as estimators of the
population ACF and PACF respectively.

(ETC2410) 9 / 32
4 Some Elementary Time Series Models I

yt i.i.d (0, 2 ).
The random variables yt and yt j have zero mean, constant variance
and are independently distributed. There is no relationship, linear or
nonlinear between yt and yt j .

yt WN (0, 2 ).
The random variables yt and yt j have zero mean, constant variance
and are serially uncorrelated. There is no linear relationship between
yt and yt j .

(ETC2410) 10 / 32
4 Some Elementary Time Series Models II

fyt g is a martingale dierence sequence if

E (yt jyt 1 , yt 2 , ....g =0

If fyt g is a mds,

Cov (yt , yt j) = 0 for all j > 0.

(ETC2410) 11 / 32
5 Stationary Autoregressive Time Series I
5.1 Properties of stationary autoregressions

Economic and nancial time series typically display autoregressive


behavior. That is, the value of the time series in the current period
depends on past values of itself.
A model for the time series yt which captures this autoregressive
behavior, and which is popular for short term forecasting, postulates
that yt is a linear function of lags of itself. That is,

yt = c + 1 yt 1 + 2 yt 2 + ....... + p yt p + ut , (3)

where
E (ut jyt 1 , yt 2, ....) = 0.
The model given by (3) is called a pth-order autoregression or
AR(p) model. For the AR(p) model:
The ACF declines exponentially.
(ETC2410) 12 / 32
5 Stationary Autoregressive Time Series II
5.1 Properties of stationary autoregressions

The PACF cuts o after p lags.


Lag length selection criteria:
M1 Inspection of the SACF and SPACF
M2 The general to specic rule
M3 Information criteria

(ETC2410) 13 / 32
5 Stationary Autoregressive Time Series I
5.2 Testing for autocorrelation

There are two tests for the presence of autocorrelation in a time series
that can be automatically performed using Eviews, both of which are
use the sample correlation coe cients of the time series.
The rst test we discuss exploits the fact that
p asy
T (b
j j ) N (0, 1). (4)

Under
H0 : j = 0,
a 95 % condence interval for b
j is given by

2 2
P p <bj < p = 0.95. (5)
T T

(ETC2410) 14 / 32
5 Stationary Autoregressive Time Series II
5.2 Testing for autocorrelation

If b
j lies outside the 95% condence interval given by (5) we reject

H0 : j = 0.

The second test for autocorrelation in a time series which can be


automatically performed using Eviews is the Ljung-Box test. Under

H0 : 1 = 2 = ..... = s = 0
H1 : j 6= 0 for at lease one j = 1,2,...s,

The test statistic


s 2j
b asy
Qs = T (T + 2) 2 (s ).
j =1 (T j)

(ETC2410) 15 / 32
5 Stationary Autoregressive Time Series III
5.2 Testing for autocorrelation

At the 5% signicance level we reject the null hypothesis if

Qscalc > Qscrit ,

where Qscrit is the 95th percentile of a chi-square variable with s


degrees of freedom.

(ETC2410) 16 / 32
6 Forecasting Stationary Autoregressive Time Series I
6.1 Point forecasts

Given a sample of T observations,

(y1 , y2 , ...., yT ),

on the time series fyt g there are two types of forecast we may wish
to make about the value of yT +1 :
A point forecast for yT +1 is a statement that yT +1 will assume a
particular value.
An interval forecast (or forecast interval) is a statement that yT +1
will lie in a specied interval with a specied probability.
In order to forecast future values of fyt g we need a rule which:
Species how forecasts are to be computed.
Uses only currently available information.
Leads to forecasts which are in some sense accurate.

(ETC2410) 17 / 32
6 Forecasting Stationary Autoregressive Time Series II
6.1 Point forecasts

Let FT +k jT denote rule for forecasting the value of yT +k in period T,


conditional on observing

(yT , yT 1, .....y1 ).

We argued that a sensible forecasting rule to adopt is to choose


FT +k jT to minimize

MSE (k ) = E [FE (k )2 ] = E [(yT +k FT + k j T ) 2 ] . (6)

(ETC2410) 18 / 32
6 Forecasting Stationary Autoregressive Time Series III
6.1 Point forecasts

We asserted that the forecasting rule which minimizes (6) is to set

FT +k jT = ET (yT +k ),

where
ET (yT +k ) = E (yT +k jyT , yT 1 , ..., y1 ).

Of course, we dont observe ET (yT +k ). In practise,

bT (yT +k ),
FT +k jT = E

bT (yT +k ) denotes the estimated value of ET (yT +k ).


where E

(ETC2410) 19 / 32
6 Forecasting Stationary Autoregressive Time Series IV
6.1 Point forecasts

We saw that for the AR(1) model

yt = c + 1 yt 1 + ut ,

forecasts could be obtained recursively as described in Table 1 below.

Table 1
c+b
FT + 1 j T = b 1 yT
c+b
FT + 2 j T = b 1 FT +1 jT
FT + 3 j T = b b
c + 1 FT +2 jT
.
.

(ETC2410) 20 / 32
6 Forecasting Stationary Autoregressive Time Series V
6.1 Point forecasts

We also saw that this logic generalized to higher order autoregressive


models. For example, for the AR(2) model we have

Table 2
FT +1 jT = b c+b1 yT + b 2 yT 1
c+b
FT + 2 j T = b 1 FT + 1 j T + b
2 yT 1
c+b
FT + 3 j T = b 1 FT +2 jT + b 2 FT + 1 j T
.
.

(ETC2410) 21 / 32
6 Forecasting Stationary Autoregressive Time Series I
6.2 Interval forecasts

In order to compute point forecasts we dont need to make any


assumption about the distribution of the errors other than that they
are
ut i.i.d.(0, 2 ).
However, in order to construct interval forecasts we need to assume
that
ut n.i.d (0, 2 ).
We saw that under this assumption, a 95% forecast interval for yT +k
is given by

P FT + K j T 1.96SEF (k ) < yT +K < FT +K + 1.96SEF (k ) = 0.95


(7)

(ETC2410) 22 / 32
7 Autoregressive Distributed Lag Models I

It may be possible to improve the forecasting performance of the


AR(p) model by adding additional variables as regressors. In general,
an autoregressive distributed lag model with p lags of the variable yt
and q lags of the variable xt , which we denote by ADL(p,q), is given
by

yt = c + 1 yt 1 + 2 yt 2 + .... + p yt p
+1 xt 1 + 2 xt 2 + .... + q xt q + ut . (8)

(ETC2410) 23 / 32
8 Finite Distributed Lag Models I

A time series model of the form

yt = c + 0 xt + 1 xt 1 + 2 xt 2 + .... + q xt q + ut (9)

is called a nite distributed lag model of order q or FDL(q).


In addition to the absence of any lags of the dependent variable on
the right-hand side, what distinguished the FDL model given by (9)
from the ADL model given by (8) is the presence of the regressor xt
in the FDL model.
The FDL model postulates that the variable x can have both a lagged
and a contemporaneous eect on the variable y .That is, a change
in x has both an immediate eect on y and an additional eect which
is distributed over several time periods.
FDL models can be used to estimate both the impact eect and the
long run eect on y of a change in x.
(ETC2410) 24 / 32
8 Finite Distributed Lag Models II

For example, in the FDL(2) model given by

yt = c + 0 xt + 1 xt 1 + 2 xt 2 + ut , (10)

Impact eect = yt yt 1= 0 .
One-period cumulative eect = yt +1 yt 1 = 0 + 1 .
Permanent eect = yt +2 yt 1 = 0 + 1 + 2 .

(ETC2410) 25 / 32
9 Inference with Time Series Data I

We distinguished between strictly exogenous and contemporaneously


exogenous regressors.
A regressor is strictly exogenous if it is uncorrelated with the error
term in all past, present and future time periods.
A regressor contemporaneously exogenous if it is uncorrelated with
the error term in the present time period.
Unbiasedness of the OLS estimator requires the very restrictive
condition that all of the regressors in the linear regression model are
strictly exogenous.
E ciency of the OLS estimator requires that the errors in the linear
regression model are homoskedastic and serially uncorrelated.
Consistency of the OLS estimator requires that the regressors in the
linear regression model are contemporaneously exogenous. This is a
much weaker requirement than that required for unbiasedness.
(ETC2410) 26 / 32
9 Inference with Time Series Data II

Serial correlation in the errors in the linear regression model has the
following consequences:
The OLS estimator is no longer e cient.
The standard t and F tests are no longer valid, even asymptotically.

(ETC2410) 27 / 32
9 Inference with Time Series Data I

We considered two tests for autocorrelation - a test for rst-order


autocorrelation and the Breusch-Godfrey test.
The t test suers from three major limitations;
The test is only valid if the regressors are strictly exogenous.
The test is a test for rst-order correlation in the errors. It does not
detect higher order autocorrelation in the errors.
The test is an asymptotic test. That is, only the asymptotic
distribution of the test statistic is known. Consequently, the test may
be unreliable in small samples.
The Breusch-Godfrey test overcomes the rst two of these
limitations.

(ETC2410) 28 / 32
9 Inference with Time Series Data I
9.3 Correcting for autocorrelation

If we detect autocorrelation in the errors we have three options:


Estimate by OLS and use HAC standard errors and test statistics.
Attempt to remove the autocorrelation by changing the specication of
the model.
Estimate by FGLS.
The most common strategy for dealing with autocorrelated errors is
to estimate the regression equation by OLS and use HAC standard
errors and test statistics.
The advantage of estimating by OLS and using HAC standard errors is
that it enables us to conduct hypothesis tests which are asymptotically
valid irrespective of the form of autocorrelation in the errors.
The disadvantage is that the OLS estimator is ine cient.
In order to use FGLS it is necessary to make a specic assumption
about the form of the autocorrelation in the errors.
(ETC2410) 29 / 32
9 Inference with Time Series Data II
9.3 Correcting for autocorrelation

If the assumption is correct, the FGLS estimator is e cient and the


usual hypothesis tests are asymptotically valid.
However, if the assumption about the form of the autocorrelation in
the errors is incorrect, the FGLS estimator is ine cient and hypothesis
tests based on FGLS are invalid.

(ETC2410) 30 / 32
10 Time Series Data with Deterministic Trends I

A time series which displays a strong tendency to increase is said to


exhibit a positive time trend, and a time series which exhibits a
strong tendency to decrease over time is said to exhibit a negative
time trend.
Since these trends are deterministic rather than stochastic or random,
they are called deterministic trends.
We considered two deterministic trend models:
The linear deterministic trend model

yt = 0 + 1 t + e t . (11)

The exponential deterministic trend model

Ln (yt ) = 0 + 1 t + et . (12)

(ETC2410) 31 / 32
10 Time Series Data with Deterministic Trends II

The linear deterministic trend model implies that the average level
of yt changes by a constant amount each time period.
The exponential deterministic trend model implies that the average
growth rate of yt changes by a constant amount each time period.
Caution must be exercised when estimating regressions in which the
dependent variables and one or more of the regressors contain
deterministic trends.
If one is not careful, the correlation caused by the fact that the
variables are trending can lead to the erroneous conclusion that the
variables are causally related when, if fact, they are not.
This phenomenon is called the spurious regression problem.
When attempting to estimate causal relationships between trending
variables one must detrend the variables. This can be done by
including a time trend in the regression equation.

(ETC2410) 32 / 32

S-ar putea să vă placă și