73
Time Series Econometrics Lecture Notes (Bo˘gazi¸ci University Economics Department M.A. Program,) BurakSalto˘glu May 2017

Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

Embed Size (px)

Citation preview

Page 1: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

Time Series Econometrics Lecture Notes

(Bogazici University Economics Department M.A. Program,)

Burak Saltoglu

May 2017

Page 2: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

2

Page 3: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

Contents

1 Time Series Econometrics 51.1 Linear Time Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.1.1 Distributed Lag Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.1.2 Autoregressive Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.1.3 ARDL Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.1.4 Granger Causality Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.1.5 Linear Time Series Models: y(t) . . . . . . . . . . . . . . . . . . . . . . . . . 71.1.6 general interpretation of time series and autocorrelation graphs . . . . . . . . 181.1.7 Forecasting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

1.2 Testing for Stationarity and Unit Roots . . . . . . . . . . . . . . . . . . . . . . . . . 341.3 COINTEGRATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471.4 Multiple Equation Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

1.4.1 Seemingly Unrelated Regression Model . . . . . . . . . . . . . . . . . . . . . . 541.5 Vector Autoregression VAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601.6 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641.7 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

3

Page 4: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CONTENTS CONTENTS

4

Page 5: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

Chapter 1

Time Series Econometrics

We will discuss various topics in this course. We will mainly discuss linear time series throughoutin this course:

1. Linear Time Series

2. Non-stationary time series

3. Cointegration and Unit Roots

4. Vector Autoregression (VAR)

Main reference book for the course:Vance Martin, Stan Hurn and David Harris, 2013, Econometric Modellig with TimeSeries.

We will use R or Matlab codes.Other Time Series Books:Hamiton, J (1994); Time Series AnalysisEnders W (2014), Applied Time SeriesChatfield (2003), The Analysis of Time SeriesDiebold F (2006), Elements of Forecasting

1.1 Linear Time Series

One of the most popular analytical tools in econometrics/statistics is the linear time series models.We can basically summarize what we will be doing as follows.

Outline:

• Linear Time Series Models

ARDL ModelsGranger Causality Test

• AR and MA processes

• Diagnostics in Time SeriesCorrelogramBox-Pierce Q StatisticsLjung-Box (LB) Statistics

5

Page 6: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.1. LINEAR TIME SERIES CHAPTER 1. TIME SERIES ECONOMETRICS

• Forecasting

Time Series: Consists of a set of observations on a variable, y, taken at equally spaced intervalsover time.

Why do we study time series:2 reasons analysis and modelling

The aim of the analysis is to summarize the characteristic of time series. The aim of Modellingis forecasting for future values.

Why do we rely on time series?

• Psychological Reasons: People do not change their habits immediately

• Technological Reasons: Quantity of a resource needed or bought might not be so adaptive inmany cases.

1.1.1 Distributed Lag Models

In the distributed lag (DL) model we have not only current value of the explanatory variable butalso its past value(s). With DL models, the effect of a shock in the explanatory variable lasts more.We can estimate DL models (in principal) with OLS. Because the lags of X are also non-stochastic.

DL(0) : yt = β0 + β1xt + ut (1.1)

DL(1) : yt = β0 + β1xt + β2xt−1 + ut (1.2)

DL(q) : yt = β0 +

q∑i=0

βixt−i + ut (1.3)

1.1.2 Autoregressive Models

AR(0) : yt = β0 + ut (1.4)

AR(1) : yt = β0 + α1yt−1 + ut (1.5)

AR(p) : yt = β0 +

p∑i=1

αiyt−i + ut (1.6)

In the Autoregressive (AR) models, the past value(s) of the dependent variables becomes an ex-planatory variable. We can not esitmate an autoregressive model with OLS because:

1. Presence of stochastic explanatory variables

2. Posibility of serial correlation

1.1.3 ARDL Models

In the ARDL models, we have both AR and DL part in one regression.

ARDL(p, q) : yt = β0 +

p∑i=1

αiyt−i +

q∑j=0

βixt−i + ut (1.7)

6

Page 7: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.1. LINEAR TIME SERIES

1.1.4 Granger Causality Test

Let us consider the relation between GNP and money supply. A regression analysis can show us therelation between these two. But our regression analysis can not say the direction of the relation.

The granger causality test examines the causality between series, the direction of the relation.We can test whether GNP causes money supply to increase or a monetary expansion lead GNP torise, under conditions defined by Granger.

GNPt =m∑i=1

αiMt−i +m∑j=1

βjGNPt−j + ut (1.8)

Mt =m∑i=1

λiGNPt−i +m∑j=1

δjMt−j + ut (1.9)

Steps for testing M (Granger) causes GNP;

1. Regress GNP on all lagged GNP, obtain RSS1

2. Regress GNP on all lagged GNP and all lagged M, obtain RSS2

3. The null is all α’s are zero.

4. Test statistics;

F =(RSS1 −RSS2)/mRSS2/(n− k)

where m is the number of lags, k is the number of parameters in step-2. df(m,n-k).

Figure 1.1: Granger Causality Test

1.1.5 Linear Time Series Models: y(t)

Time series analysis is useful when the economic relationship is difficult to set. Even if there areexplanatory variables to express y, it is not possible to forecast y(t).

Stochastic Process

Any time series data can be thought of as being generated by a stochastic process. A stochasticprocess is said to be stationary if its mean and variance are constant over time . The value ofcovariance between two time periods depends only on the distance or lag between the two timeperiods and not on the actual time at which the covariance is computed.

7

Page 8: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.1. LINEAR TIME SERIES CHAPTER 1. TIME SERIES ECONOMETRICS

Times Series And White Noise

Suppose we have observed a sample of size T of some random variable Yt : y1, y2, y3, ....yT . Thisset of T numbers is only one possible outcome of the stochastic process. For example:

yt∞t=−∞ = ..., y−1, y0, y1, ..., yT , yT+1, ...yt∞t=−∞ would still be viewed as a single realization from a time series process.

White Noise

A process is said to be white noise if it follows the following properties.

1. εt∞t=−∞ = ..., ε−1, ε0, ε1, ..., εT , εT+1, ...

2. E[εt

]= 0

3. E[ε2t

]= σ2

4. E[εtετ

]= 0 for t 6= τ

If a time series is time invariant with respect to changes in time, then the process can be estimatedwith fixed coefficients.

Strict Sense Stationarity

If f(y1, ..., yT

)represents the joint probability density of yt is said to be strictly stationarity if

f(yt, ..., yt+k

)= f

(yt+m, ..., yt+k+m

)Wide Sense Stationarity

yt is said to be wide sense stationary if the mean, variance and covariance of a time series arestationary.

µy = E[yt]

E[yt] = E[yt+m]

σ2y = E[(yt − µy)2] = E[(yt+m − µy)2]

Covariance of the series must be stationary

γk = cov(yt, yt+k) = E[(yt − µy)(yt+k − µy)

]cov(yt, yt+k) = cov(yt+m, yt+k+m)

Strict sense stationarity implies wide sense stationarity but the reverse is not true.

Implication of stationarity: inference we obtain from a non-stationary series is misleading andwrong.

8

Page 9: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.1. LINEAR TIME SERIES

Basic ARMA Models

AR : yt = φ1yt−1 + δ + εt (1.10)

MA : yt = εt + θ1εt−1 (1.11)

AR(p) : yt = φ1yt−1 + φ2yt−2 + ....+ φpyt−p + δ + εt (1.12)

MA(q) : yt = εt + θ1εt−1 + θ2εt−2 + ....+ θqεt−q (1.13)

Lag Operators

Lyt = yt−1

L2 = LLyt = yt−2

or in general;

Lj = yt−j

L−j = yt+j

or we can use lag polynomials;

a(L) = (a0L0 + a1L

1 + a2L2)

AR : (1− φ1L)yt = δ + εt (1.14)

MA : yt = (1 + θ1L)εt (1.15)

AR(p) : (1− φ1L1 − φ2L2 − ...− φpLp)yt = δ + εt (1.16)

MA(q) : yt = (1 + θ1L1 + θ2L

2 + ...+ θqLq)εt (1.17)

AR vs MA Representation Wold Decomposition

yt = φ1yt−1 + εt

yt = φ1(φ1yt−2 + εt−1) + εt = φ21yt−2 + φ1εt−1 + εt

yt = φ1(φ21yt−3 + φ1εt−2 + εt−1) + εt = (φ31yt−3 + φ21εt−2 + φεt−1) + εt

yt = φk1yt−k + φk−11 yt−k+1 + ...+ φ21εt−2 + φεt−1 + εt

if |φ1| < 1 so that

limk→∞

φk1yt−k = 0

then;

yt =∞∑j=0

φj1εt−j

So AR(1) can be represented as MA(∞)

9

Page 10: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.1. LINEAR TIME SERIES CHAPTER 1. TIME SERIES ECONOMETRICS

Autocorrelations and Autocovariance Functions

yt =∞∑j=0

φjεt−j

var(yt) = E

[( ∞∑j=0

φjεt−j

)2]

var(yt) =∞∑j=0

φ2jE[ε2t−j ]

Note that;∑∞

j=0 φ2j = 1 + φ2 + ... = 1

1−φ2

var(yt) =1

1− φ2E[ε2t−j ] =

1

1− φ2σ2

Autocorrelation:

γj = cov(yt, yt−j)

cov(yt, yt−j) = E[(yt − E[yt])(yt−j − E[yt−j ])

]γ0 = cov(yt, yt) = var(yt)

Correlation of yt and yt−j given as

ρj =cov(yt, yt−j)

var(yt)=γjγ0

Sample Counterpart of AutoCovariance Function

γ0 =1

n− 1

T∑t=1

(yt − y)2 = σ2

γk =T∑t=1

(yt − y)(yt−k − y) k = 1, 2, ..

Because of stationarity:

γk = γ−k

ρk =γkγ0

Partial Autocorrelation Function

The PACF of a time series is a function of its ACF and is a useful tool for determining the orderp of an AR model. A simple,yet effective way to introduce PACF is to consider the following ARmodels in consecutive orders:

10

Page 11: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.1. LINEAR TIME SERIES

rt = φ0,1 + φ1,1rt−1 + e1t,

rt = φ0,2 + φ1,2rt−1 + φ2,2rt−2 + e2t,

rt = φ0,3 + φ1,3rt−1 + φ2,3rt−2 + φ3,3rt−3 + e3t,

rt = φ0,4 + φ1,4rt−1 + φ2,4rt−2 + φ3,4rt−3 + φ4,4rt−4 + e4t,

.

.

.

where φ0,j , φi,j and ejt are, respectively, the constant term, the coefficient of rt−i, and the errorterm of an AR(j) model. These models are in the form of a mulitple linear regression and canbe estimated by the least squares method. As a matter of fact, they are arranged in a sequentialorder that enables us to apply the idea of partial F test in multiple linear regression analysis. Theestimate φ1,1 of the first equation is called the lag-1 sample PACF of rt.The estimate φ2,2 of the

second equation is called the lag-2 sample PACF of rt.The estimate φ3,3 of the third equation iscalled the lag-3 sample PACF of rt, and so on.

From the definition, the lag-2 sample PACF φ2,2 shows the added contribution of rt−2 to rtover the AR(1) model rt = φ0 + φ1rt−1 + e1t. The lag-3 PACF shows the added contribution ofrt−3 to rt over an AR(2) model, and so on. Therefore, for an AR(p) mode, the lag-p sample PACF

should not be zero, but φj,j should be close to zero for all j > p. We make use of this property todetermine the order p.

Measures the correlation between an observation k periods ago and the current observation,after controling for intermediate lags. For The first lags pacf and acf are equal.

Linear Time Series-AR

yt = φ1yt−1 + δ + εt |φ1| ≥ 1 non-stationarity condition

E[yt] = µ =δ

1− φ1|φ1| ≤ 1 stationarity condition

Let δ = 0 then,

γ0 = E[(yt − µ)2] = E[(φ1yt−1 + εt)2]

γ0 = E[φ21y2t−1 + 2φ1yt−1εt + ε2t ]

From stationarity, note that E[y2t−1] = γ0;

γ0 = φ21γ0 + σ2ε

γ0 =σ2ε

1− φ21You can also see the above result directly from the equation, yt = φ1yt−1 + δ + εt by taking

the variance of both sides.

γ1 = E[(yt − µy)(yt−1 − µy)]

γ1 = E[(φ1yt−1 + εt)(yt−1)]

11

Page 12: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.1. LINEAR TIME SERIES CHAPTER 1. TIME SERIES ECONOMETRICS

γ1 = φ1γ0

γ1 =φ1σ

1− φ21, γ0 =

σ2ε1− φ21

ρ1 =γ1γ0

=

φ1σ2ε

1−φ21σ2ε

1−φ21

= φ1

For j = 2;

γ2 = E[(yt)(yt−2)]

γ2 = E[(φ1yt−1 + εt)(yt−2)]

γ2 = E[(φ1(φ1yt−2 + εt−1) + εt)(yt−2)] = E[(φ21yt−2 + φ1εt−1 + εt)(yt−2)]

γ2 = φ21σ2y = φ21γ0

ρ2 =φ21γ0γ0

,So if you have a data which is generated by an AR(1) process, it is correlogram will diminish

slowly (if it is stationary).

ρ1 =γkγ0

= φ1

ρ2 = φ21

.

.

ρk = φk1

Figure 1.2: Random Walk (No Drift)

12

Page 13: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.1. LINEAR TIME SERIES

Figure 1.3: AR(1) Process with φ1 = 0.95

Figure 1.4: AR(1) Process with φ1 = 0.99

13

Page 14: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.1. LINEAR TIME SERIES CHAPTER 1. TIME SERIES ECONOMETRICS

Figure 1.5: AR(1) Process with φ1 = 0.90

Figure 1.6: AR(1) Process with φ1 = 0.5

14

Page 15: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.1. LINEAR TIME SERIES

Figure 1.7: AR(1) Process with φ1 = 0.05 (Weak Predictable Part)

Figure 1.8: Turkish GDP Growth

Figure 1.9: Turkish GDP

15

Page 16: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.1. LINEAR TIME SERIES CHAPTER 1. TIME SERIES ECONOMETRICS

Figure 1.10: US GDP: 1947-2017 (Quarterly)

Figure 1.11: Turkish GDP quarterly: Autocorrelations

AR(1) Application on Turkish Growth Rate

Turkish GDP Estimate SE t-stat

Constant 0.93 0.46 2.05

AR(1) 0.80 0.07 11.99

Variance 11.86 1.87 6.33

Mean 4.6635

S. Deviation 5.6062

Skewness -1.3031

Kurtosis 4.3208

E[yt] =δ

1− φ2=

0.93

1− 0.82= 4.562

16

Page 17: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.1. LINEAR TIME SERIES

var(yt) =1

1− φ2σ2

Figure 1.12: Turkish Inflation

Figure 1.13: White Noise

17

Page 18: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.1. LINEAR TIME SERIES CHAPTER 1. TIME SERIES ECONOMETRICS

Figure 1.14: Correlograms with φ = 0.9 and φ = −0.8

Linear Time Series Models:AR(p)

Autoregressive :

yt =

k∑i=1

φiyt−i + δ + εt AR(k)

Expected value of Y:

E[Yt] =

k∑i=1

φiµ+ δ

µ =

k∑i=1

φiµ+ δ

µ =δ

1−∑k

i=1 φi

1.1.6 general interpretation of time series and autocorrelation graphs

As can be seen in various simulated graphs in previous chapters we notice that, correlogram ofstationary AR models tells a lot about the structure of the time series. First of all, white noisemodel produces time series realizations which are very difficult to predict. They produce rathererratic and unpredictable pattern. (see figure 1.13). For the AR process with φ1 = 0.05 showssimilar pattern to a white noise process (see figure 1.7). The predictive power of with higher ARcoefficients exhibit a totally different pattern. in the AR model the hgiher the persistence. Forinstance when φ1 = 0.9 (see figure 1.14) for an AR process we see more predictable patterns in the

18

Page 19: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.1. LINEAR TIME SERIES

original time series. In addition, we notice the correlogram regarding to this process has a slowlydecaying pattern unlike when φ1 = 0.5.

stationarity in the graphs

As can be seen in the graph 1.2 random walk depicts a very different picture than other stationaryAR processes. For instance, in a typical random walk realization, time series does not have a stablemean or variance. In general, random walk models are known with their unpredictable patterns.In some macro variables we notice random walk type features.

Linear Time Series Models:MA(k)

Moving average:

yt = µ+ εt + θ1εt−1 MA(1)

Note that in some texts yt = µ+ εt − θ1εt−1 is also considered as an MA process.

The term ‘moving average’ comes from the fact that y is constructed from a weighted sum ofthe two most recent error terms.

var(yt) = E[(yt − µ)(yt − µ)] = γ0 = E[(µ+ εt + θ1εt−1 − µ)(µ+ εt + θ1εt−1 − µ)]

By using white noise property,

var(yt) = σ2ε + θ21σ2ε

var(yt) = σ2ε(1 + θ21)

Covariance:

γ1 = E[(yt − µ)(yt−1 − µ)] = E[(µ+ εt + θ1εt−1 − µ)(µ+ εt−1 + θ1εt−2 − µ))]

E[(yt − µ)(yt−1 − µ)] = θ1σ2ε

Higher covariances, j=2;

γ2 = E[(yt − µ)(yt−2 − µ)] = E[(µ+ εt + θ1εt−1 − µ)(µ+ εt−2 + θ1εt−3 − µ))]⇒ 0

γj = 0 j = 2, 3, ...

correlation(yt, yt−j) =cov(yt, yt−j)

var(yt)=γjγ0

=γj√γ0√γ0

= ρj

ρ1 =θ1σ

2

(1 + θ21)σ2=

θ1(1 + θ21)

ρ2 = 0

.

.

ρk = 0

19

Page 20: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.1. LINEAR TIME SERIES CHAPTER 1. TIME SERIES ECONOMETRICS

MA(1) Correlogram

ρ1 =γ1γ0

ρ2 = 0

.

.

ρk = 0

ρk =γkγ0

=

θ1

(1+θ21), for k = 1

0, for k > 1

since

γk = E[(εt + θ1εt−1)(εt−k + θ1εt−k−1)] = 0 for k > 1

So if you have a data that is generated by MA(1) its correlogram will decline to zero quickly(afterone lag).

An MA(1) Example

yt = µ+ εt + 0.5εt−1 MA(1)

ρ1 =θ1

(1 + θ21)=

0.5

(1 + 0.52)= 0.4

.

.

ρk = 0

One major implication is the MA(1) process has a memory of only one Lag. i.e. MA(1) processforgets immediately after one term or only remembers just one previous realization.

Variance Covariance MA(2)

γ0 = E[(εt + θ1εt−1 + θ2εt−2)2] = E[(ε2t + θ21ε

2t−1 + θ22ε

2t−2)]

γ0 = σ2ε + θ21σ2ε + θ22σ

2ε = σ2ε(1 + θ21 + θ22)

For j = 1;γ1 = cov(yt, yt−1) = E[(yt − µ)(yt−1 − µ)] since E[yt] = µ

γ1 = E[(εt + θ1εt−1 + θ2εt−2)(εt−1 + θ1εt−2 + θ2εt−3)

]γ1 = θ1E[ε2t−1] + θ1θ2E[ε2t−2]

γ1 = θ1σ2ε + θ1θ2σ

γ1 = σ2ε(θ1 + θ1θ2)

For j = 2 ;

cov(yt, yt−2) = E[(yt − µ)(yt−2 − µ)] = E[(εt + θ1εt−1 + θ2εt−2)(εt−2 + θ1εt−3 + θ2εt−4)

]20

Page 21: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.1. LINEAR TIME SERIES

γ2 = θ2σ2ε

For j = 3;γ3 = 0

Summary;γ0 = σ2ε + θ21σ

2ε + θ22σ

2ε = σ2ε(1 + θ21 + θ22)

γ1 = θ1σ2ε + θ1θ2σ

γ2 = θ2σ2ε

γ3 = 0

Correlations;

ρ1 =γ1γ0

=θ1 + θ1θ2

1 + θ21 + θ22

ρ2 =γ2γ0

=θ2

1 + θ21 + θ22

ρk = 0 k>2

Moving Average MA(k) Process

yt = µ+ εt +k∑i=1

θiεt−i MA(k)

• Error term is white noise.

• MA(k) has k+2 parameters.

• Variance of y;

var(yt) = γ0 = var(µ+ εt + θ1εt−1 + θ2εt−2 + ...+ θkεt−k)

var(yt) = σ2ε + θ21σ2ε + θ22σ

2ε + ...+ θ2kσ

var(yt) = σ2ε(1 + θ21 + θ22 + ...+ θ2k)

Homework: Derive the autocorrelation function for MA(3),..MA(k).

ARMA Models: ARMA(1,1)

yt = φ1yt−1 + εt + θ1εt−1

γ0 = E[y2t ] = E[φ21y

2t−1 + 2φ1yt−1εt + 2φ1θ1yt−1εt−1 + ε2t + 2θ1εtεt−1 + θ21ε

2t−1]

γ0 = φ21γ0 + σ2ε + θ21σ2ε + 2φ1θ1σ

γ0 =σ2ε + θ21σ

2ε + 2φ1θ1σ

(1− φ21)

γ0 =σ2ε(1 + θ21 + 2φ1θ1)

(1− φ21)For j = 1;

γ1 = E[yt−1(φ1yt−1 + εt + θ1εt−1)]

21

Page 22: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.1. LINEAR TIME SERIES CHAPTER 1. TIME SERIES ECONOMETRICS

γ1 = E[yt−1(φ1yt−1) + yt−1εt + θ1yt−1εt−1]

γ1 = E[φ1y2t−1 + yt−1(εt + θ1εt−1)]

γ1 = E[φ1y2t−1 + (φ1yt−2 + εt−1 + θ1εt−2)(εt + θ1εt−1)]

Using white noise property,

γ1 = φ1γ0 + θ1σ2ε

For j = 2;

γ2 = E[yt−2(φ1yt−1 + εt + θ1εt−1)]

γ2 = φ1E[yt−2yt−1] since

[yt−2 = (φ1yt−3 + εt−2 + θ1εt−3)] no correlation between yt−2, εt and εt−1

γ2 = φ1γ1

..

..

γk = φ1γk−1

ρ1 =γ1γ0

So ARMA will have either oscilating or exponential decay depending on φ1 or θ1, but will bestationary and short memory(though we won’t cover long memory models in this course).

Maximum Likelihood Estimation ε1ε2..εt

∼ N(0;σ2ε)

fε(ε1, ...εT ) = (2πσ2ε)−T

2 exp

− 1

2σ2ε

T∑t=1

ε2t

Deriving the likelihood function:

L(θ; r) = f(εT , εT−1, ...., ε1, ε0) =

T∏t=1

f(εt|Ωt−1)

f(εT , εT−1, ...., ε1, ε0) =1√2πexp

(− 1

2.ε2Tσ2

)

L(θ; y) =1√

2πσ2.exp

(− 1

2.ε21σ2

)1√

2πσ2.exp

(− 1

2.ε22σ2

)...

1√2πσ2

.exp

(− 1

2.ε2Tσ2

)

L(θ; y) =√

2πσ2√

2πσ2...√

2πσ2e

(− 1

2.ε21σ2

)e

(− 1

2.ε22σ2

)...e

(− 1

2.ε2Tσ2

)

22

Page 23: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.1. LINEAR TIME SERIES

L(θ; y) =1√

(2πσ2)(2πσ2)..(2πσ2)e

(− 1

2

∑Ttε2tσ2

)

Estimation AR(1);Since T and other parameters are constant we can ignore them in optimization and use :

ln(L(θ)) = l(θ) = −1

2

T∑t=1

ln(σ2)− 1

2

T∑t=1

ε2tσ2

εt = yt − θ1yt−1θ = (θ1, σ

2)′

Likelihood function for ARMA(1,1) process

yt = φ1yt−1 + εt + θ1εt−1

εt = yt − φ1yt−1 − θ1εt−1

ln(L(θ)) = l(θ) = −1

2

T∑t=1

ln(σ2)− 1

2

T∑t=1

[yt − φ1yt−1 − θ1εt−1σ

]2θ = (φ1, θ1, σ

2)′

Model Selection

• How well does it fit the data?

• Adding additional lags for p and q will reduce the SSR.

• Adding new variables decrease the degrees of freedom

• In addition, adding new variables decreases the forecasting performance of the fitted model.

• Parsimonious model: optimizes this trade-off.

Two Model Selection Criteria

• Akaike Information Criterion

• Schwartz Bayesian Criterion

• AIC: k is the number of parameters estimated. If intercept term is allowed: k = (p + q + 1)else k = p+ q.

• T: number of observationsAIC = T ln(SSR) + 2k

SBC = T ln(SSR) + kln(T )

Choose the lag order which minimizes the AIC or SBC.AIC may be biased towards selecting overparametrized model wheras SBC is asymptotically

consistent.

23

Page 24: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.1. LINEAR TIME SERIES CHAPTER 1. TIME SERIES ECONOMETRICS

Characterization of Time Series

• Visual inspection

• Autocorrelation order selection

• Test for significance

– Barlett (individual)

– Box Ljung (joint)

Correlogram

One simple test of stationarity is based on autocorrelation function (ACF). ACF at lag k is;

ρk =E[(yt − µy)(yt+k − µy)

]√E[(yt − µy)2]E[(yt+k − µy)2]

ρk =cov(yt, yt+k)

σytσyt+k

Under stationarity, ρk =cov(yt, yt+k)

σ2y

ρk =γkγ0

Sample Autocorrelation

ρk =

∑T−kt=1 (yt − y)(yt+k − y)∑T

t=1(yt − y)2

Correlogram

−1 < ρk < 1

If we plot ρk against k, the graph is called as correlogram. As an example let us look at thecorrelogram of Turkey’s GDP.

24

Page 25: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.1. LINEAR TIME SERIES

Figure 1.15: Correlogram of Turkey’s GDP

Test for Autocorrelation

Barlett Test: to test for ρk = 0

H0 : ρk = 0

H1 : ρk 6= 0

ρk ∼ N(0,1√T

)

Figure 1.16: Turkish Monthly Interest Rates

25

Page 26: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.1. LINEAR TIME SERIES CHAPTER 1. TIME SERIES ECONOMETRICS

Figure 1.17: ISE30 Return Correlation

Box-Pierce Q Statistics

To test the joint hypothesis that all the autocorrelation coefficients are simultaneously zero, onecan use the Q statistics.

Q = Tm∑k=1

ρ2k where m= lag length, T=sample size

Q ∼asy χ2m

Ljung-Box Statistics

It is variant of Q statistics as;

LB = T (T + 2)m∑k=1

( ρk2

n− k

)

LB ∼asy χ2m

26

Page 27: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.1. LINEAR TIME SERIES

Figure 1.18: Box-Pierce Q Statistics

Are Residuals Clean?

Figure 1.19: Graph of residuals from an AR(1)

Are Residuals GAUSSIAN?

Figure 1.20:

27

Page 28: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.1. LINEAR TIME SERIES CHAPTER 1. TIME SERIES ECONOMETRICS

Optimal ARMA order level choice: Turkish GDP Growth

ARMA order to minimize BIC . ARMA(1,1),ARMA(1,2),. . . ARMA(4,4)

(p,q) 1 2 3 41 388.3247 387.5649 381.3381 383.45512 386.1168 381.3223 385.5452 384.76643 390.0506 385.5218 385.4699 377.45324 388.1361 386.6513 389.7934 381.5608

ARMA(3,4) minimizes the BIC. What is the maximum lag order to start with? No clear rulebut not more than the 10% of the whole sample should be left out. i.e. With 100 observations amaximum of 10 lag order is more or less the maximum AR level..

Box-Jenkins Approach to Time Series

Figure 1.21: Box-Jenkins Approach

28

Page 29: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.1. LINEAR TIME SERIES

1.1.7 Forecasting

Figure 1.22: Forecasting

Introduction to Forecasting

yt = φ0 + φ1yt−1 + εt

But if we want to project future realizations of y we may use

yT+1 = φ0 + φ1yT + εT+1

ET [yT+1] = φ0 + φ1yT

Formally;

ET [yT+h] = E(yT+h|yT , ..., εT , ..., ε1)

ET [yT+2] = φ0 + ET [φ1yT+1]

ET [yT+2] = φ0 + φ1(φ0 + φ1yT ) = φ0 + φ1φ0 + φ21yT

2 step ahead forecasts;

ET [yT+2] = φ0 + φ1(φ0 + φ1yT ) = φ0 + φ1φ0 + φ21yT

3 step ahead forecasts;

ET [yT+3] = φ0 + φ1(φ0 + φ1φ0 + φ21yT ) = φ0 + φ1φ0 + φ21φ0 + φ31yT

h step ahead forecasts;

ET [yT+h] = φ0(1 + φ1 + φ21 + ...+ φh−11 ) + φh1yT

29

Page 30: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.1. LINEAR TIME SERIES CHAPTER 1. TIME SERIES ECONOMETRICS

In Practice

yt = φ0 + φ1yt−1

But if we want to project the future realizations of y we may use

ET [yT+1] = φ0 + φ1yT

If we can consistently estimate the order via AIC then one can forecast the future values of y.

There are alternative measures to conduct forecast accuracy.

Mean Square Prediction Error Method (MSPE)

Choose model with the lowest MSPE. If there are observations in the holdback periods, the MSPEfor Model 1 is defined as:

MSPE =1

R

T+R∑t=T+1

e2t

where e is the prediction error(i.e. et = yT+1 − yT+1)

RMSPE =

√√√√ 1

R

T+R∑t=T+1

e2t

A Forecasting Example for AR(1)

Suppose we are given

t = 1, 2, .., 150

T = 151, ..., 160

R = 10

yt = 0.9yt−1 + εt

Figure 1.23: AR(1) series with φ1 = 0.9

30

Page 31: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.1. LINEAR TIME SERIES

Figure 1.24:

yt = φ1yt−1+εt for convenience we dropped the intercept after estimating we found: φ1 = 0.9

Suppose we want to forecast t = T + 1, T + 2, .., T +R

T = 150 : y150 = −7.16

ET [yT+1] = φ1yT

y150+1 = 0.9× (−7.16) = −6.45

y150+1 = −6.26 actual

e150 = 0.18 forecast error

2-step ahead forecast:

ET [y150+2] = φ1(φ1yT ) = φ21yT = 0.81× (−7.16)

and so forth.

Figure 1.25: Forecast of AR(1) Model

31

Page 32: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.1. LINEAR TIME SERIES CHAPTER 1. TIME SERIES ECONOMETRICS

Forecasting Performance

Figure 1.26:

MSPE =1

R

T+R∑t=T+1

e2t

where e is the prediction error(i.e. et = yT+1 − yT+1)

RMSPE =

√√√√ 1

R

T+R∑t=T+1

e2t

Figure 1.27: AR(1) Forecast

32

Page 33: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.1. LINEAR TIME SERIES

Figure 1.28: Forecast Error and Error Square

Forecast Performance Evaluation

If model A has less RMSE than Model B, then Model A is said to have a better forecasting power.Recently many papers are out to test whether A is better than B in terms of prediction power, butlooking to RMSE is a good starting point.

Seminal papers: Diebold and Mariano (1995) White (2000), Reality Check Econometrica pa-per..and many more recently

Forecast Combinations

Assume that there are 2 competing forecast models: a and b

yT+1 = wyaT+1 + (1− w)ybT+1

In addition, the forecast errors also has the same linear combination;

εT+1 = wεaT+1 + (1− w)εbT+1

σ2T+1 = w2aσ

2a,T+1 + (1− wa)2σ2b,T+1 Assuming no correlation between model a and b

∂σ2T+1

∂wa= 2waσ

2a,T+1 − 2(1− wa)σ2b,T+1

2waσ2a,T+1 − 2(1− wa)σ2b,T+1 = 0

2waσ2a,T+1 + 2waσ

2b,T+1 − 2σ2b,T+1 = 0

wa(σ2a,T+1 + σ2b,T+1) = σ2b,T+1

w∗a =σ2b,T+1

(σ2a,T+1 + σ2b,T+1)

So, if model a has greater prediction error than b we give more weights to a.

33

Page 34: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.2. TESTING FOR STATIONARITY AND UNIT ROOTSCHAPTER 1. TIME SERIES ECONOMETRICS

yT+1 =

[σ2b,T+1

(σ2a,T+1 + σ2b,T+1)

]yaT+1 +

[σ2a,T+1

(σ2a,T+1 + σ2b,T+1)

]ybT+1

Forecasting Combination ExampleVoting Behavior: Suppose company A forecasts the vote for party X: 40%, B forecasts 50%.

past survey performances:σ2a = 0.3

σ2b = 0.2

yT+1 =

[20

(20 + 30)

]yaT+1 +

[30

(20 + 30)

]ybT+1

yT+1 = 0.40× 40 + 0.6× 50 = 46%

Using Regression for Forecast Combinations

Run the following regression and then do the forecasts on the basis of estimated coefficients

yT+1 = β0 + βayaT+1 + βby

bT+1 + εT+1

Summary

• Find the AR, MA order via autocovariances, correlogram plots

• Use, AIC, SBC to choose orders

• Check LB stats

• Run a regression

• Do forecasting (use RMSE or MSE) to choose the best out-of-sample forecasting model.

1.2 Testing for Stationarity and Unit Roots

Outline

• What is unit roots?

• Why is it important?

• Spurious regression

• Test for unit roots

• Dickey Fuller

• Augmented Dickey Fuller tests

• Stationarity and random walk

• Can we test via ACF or Box Ljung?

• Why a formal test is necessary?

• Source: W Enders Chapter 4, chapter 6

34

Page 35: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS1.2. TESTING FOR STATIONARITY AND UNIT ROOTS

Spurious Regression

Regressions involving time series data include the possibility of obtaining spurious or dubious resultssignals the spurious regression. Two variables carrying the same trend makes two series to movetogether this does not mean that there is a genuine or natural relationship.

If both yt and xt are non-stationary,

yt = β1xt + εt

might display rather high R2 high t-stats.One of OLS assumptions was the stationarity of these series, we will call such regression as

spurious regression (Newbold and Granger (1974)).

Figure 1.29: Clive Granger

Figure 1.30: Robert Engle

The least squares estimates are not consistent and regular tests and inference do not hold. Asrule of thumb (Granger and Newbold,1974)

R2 > dw

Example Spurious Regression

Two simulated RW:Arl.xls

Xt = Xt−1 + ut ut ∼ N(0, 1)

35

Page 36: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.2. TESTING FOR STATIONARITY AND UNIT ROOTSCHAPTER 1. TIME SERIES ECONOMETRICS

Yt = Yt−1 + εt ε ∼ N(0, 1)

ut and εt are independent.

Figure 1.31: Random Walks

Figure 1.32: Yt = βXt + ut

Examples: Gozalo

1. Egyptian infant mortality rate (Y), 1971-1990, annual data on Gross Aggregate Income ofAmerican farmers (I) and Total Honduran Money Supply (M):

Yt = 179.9(16.63)

+−2.952(−2.32)

I − −4.26(−0.0439)

M

R2 = 0.918 D/W = 0.4752 F = 95.17 CORR. = 0.8858, −0.9113, −0.9445

2. Total crime rates in US (Y) 1971-1991, annual data, on life expactancy of South Africa(X),

Yt = −24569(−6.03)

+ 628.9(9.04)

X

R2 = 0.811 D/W = 0.5061 F = 81.72 CORR. = 0.9008

36

Page 37: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS1.2. TESTING FOR STATIONARITY AND UNIT ROOTS

Unit Roots: Stationarity

yt = β1yt−1 + εt

|β1| < 1⇒ AR(1)

β1 = 1⇒ Unit Roots!

Some Time Series Models: Random Walk Model

yt = yt−1 + εt εt ∼ i.i.d. N(0, σ2ε)

Where error term(εt) follows the white noise property with the following properties:

1. E[εt] = E[εt|εt−1, εt−2...] = E[εt|All information at t-1] = 0

2. E[εtεt−j ] = cov(εt, εt−j) = 0

3. var(εt) = var(εt|εt−1, εt−2...) = var(εt|All information at t-1) = σ2ε

Now let us look at the dynamics of such a model;

yt = yt−1 + εt

if y0 = 0

y1 = ε1

y2 = y1 + ε2 ⇒ y2 = ε1 + ε2

y3 = y2 + ε3 ⇒ y3 = ε1 + ε2 + ε3

.

.

.

yN = ε1 + ε2 + ε3 + ...+ εN =N∑t=1

εt

σ2(yt) = E[ε21 + ....ε2N ] = σ2 + ...+ σ2 = Nσ2

limN→∞

σ2(yt)→∞

37

Page 38: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.2. TESTING FOR STATIONARITY AND UNIT ROOTSCHAPTER 1. TIME SERIES ECONOMETRICS

Implications of Random Walk:

• Variance of yt diverges to infinity as N tends to infinity

• Usefulness of point forecast yt+1 diminishes as N increases

• Unconditional variance of yt is unbounded.

• Shocks in a random walk model does not decay over time.

• So shocks will have a permanent effect on the y series.

Figure 1.33: Random Walk with No Drift

Figure 1.34: Random Walk: BIST 30 Index

38

Page 39: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS1.2. TESTING FOR STATIONARITY AND UNIT ROOTS

Figure 1.35: Random Walk:ISE Percentage Returns

Figure 1.36: Turkish Export and Imports (in USD mio)

Why a Formal Test is Necessary?

yt = β1yt−1 + εt

To test for β1 = 1 through t-test is not feasible since var(yt)→∞ so that the standard t-testis not applicable

For instance, daily brent oil series given below graph shows non-stationarity time series.

39

Page 40: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.2. TESTING FOR STATIONARITY AND UNIT ROOTSCHAPTER 1. TIME SERIES ECONOMETRICS

Figure 1.37: Brent Oil Historical Data

How Instructive to Use ACF?

Figure 1.38: Correlogram of daili Brent Oil

Does Crude Oil data follow random walk? (or does it contain unit root)?

Neither Graph nor autocovariance functions can be formal proof of the existence of randomwalk series.How about standard t-test?

Testing for Unit Roots: Dickey Fuller

We estimated the daily crude oil data with the following spesification

yt = β1yt−1 + εt

Estimated regression model is;

yt = 1.000335yt−1SE=0.000305

40

Page 41: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS1.2. TESTING FOR STATIONARITY AND UNIT ROOTS

t− test statistic = 3277

But it would not be appropriate to use this information to reject the null of unit root. Thist-test is not appropriate under the null of a unit–root. Dickey and Fuller (1979,1981) developed aformal test for unit roots. Hypothesis tests based on non-stationary variables cannot be analyticallyevaluated. But non-standard test statistics can be obtained via Monte Carlo.

Dickey Fuller Test

yt = β1yt−1 + ut : Pure Random Walk Model

yt = β0 + β1yt−1 + ut : Random Walk with Drift

yt = β0 + β1yt−1 + β2t+ ut : Random Walk with Drift and Time trend

These are three versions of the Dickey-Fuller (DF) unit root tests. The null hypothesis for allversions is same whether β1 is one or not.

Now If we subtract yt−1 from each side

yt − yt−1 = β1yt−1 − yt−1 + ut

yt − yt−1 = β0 + β1yt−1 − yt−1 + ut

yt − yt−1 = β0 + β1yt−1 − yt−1 + β2t+ ut

The test involves to estimate any of the below specifications:

∆yt = γyt−1 + ut

∆yt = β0 + γyt−1 + ut

∆yt = β0 + β2t+ γyt−1 + ut

So we will run and test the slope to be significant or not So the test statistic is the same asconventional t-test.

∆yt = β0 + γyt−1 where γ = β1 − 1

Hence;

H0 : γ = 0

41

Page 42: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.2. TESTING FOR STATIONARITY AND UNIT ROOTSCHAPTER 1. TIME SERIES ECONOMETRICS

Figure 1.39: Running DF regression

Figure 1.40: Testing DF in E-views

42

Page 43: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS1.2. TESTING FOR STATIONARITY AND UNIT ROOTS

Figure 1.41: DF E-views

Figure 1.42: Testing for DF for other specifications: RW with trend

Dickey-Fuller F-test

∆yt = β0 + γyt−1 + ut H0 : β0 = γ = 0

∆yt = β0 + β2t+ γyt−1 + ut H0 : β0 = β2 = γ = 0

Now of course the test statistic is distributed under F test which can be found in Dickey Fullertables. They are calculated under conventional F tests.

ADF: Augemented Dickey Fuller Test

∆yt = β0 + γyt−1 + ut

Granger points out that if the above equation has serial correlation then the test can have nomeaning. He suggested that the lags of ∆yt’s should be used to remove the serial correlation. Thisaugmented test is known as Augmented Dickey Fuller test(ADF).

∆yt = β0 + γyt−1 +

p∑i=1

αi∆yt−i

43

Page 44: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.2. TESTING FOR STATIONARITY AND UNIT ROOTSCHAPTER 1. TIME SERIES ECONOMETRICS

∆yt = β1 + β2t+ γyt−1 +m∑i=1

αi∆yt−i + ut

With Dickey-Fuller (ADF) test we can handle with the autocorrelation problem. The m,number of lags included, should be big enough so that the error term is not serially correlated. Thenull hypothesis is again the same. Let us consider GDP example again

Figure 1.43: Augmented Dickey Fuller Test

Figure 1.44: Augmented Dickey Fuller Test

For above figure, at 99% confidence level, we can not reject the null.

44

Page 45: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS1.2. TESTING FOR STATIONARITY AND UNIT ROOTS

Figure 1.45: Augmented Dickey Fuller Test

For above figure, at 99% confidence level, we reject the null. This time we “augmented” theregression to handle with serial correlation. Note that, because GDP is not stationary at level andstationary at first difference,it is called integrated order one, I(1). Then a stationary serie is I(0).

∆yt = β1 + β2t+ γyt−1 +

p∑i=1

αi∆yt−i + ut

In order to handle the autocorrelation problem, Augmented Dickey-Fuller (ADF) test is pro-posed. The p, number of lags included, should be big enough so that the error term is not seriallycorrelated. So in practice we use either SBC or AIC to clean the residuals. The null hypothesis isagain the same.

∆yt = γyt−1 +

p∑i=1

αi∆yt−i + εt H0 : γ = 0

∆yt = δ + γyt−1 +

p∑i=1

αi∆yt−i + εt H0 : δ = γ = 0

∆yt = δ + γyt−1 + φt+

p∑i=1

αi∆yt−i + εt H0 : φ = δ = γ = 0

Example: Daily Brent Oil

45

Page 46: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.2. TESTING FOR STATIONARITY AND UNIT ROOTSCHAPTER 1. TIME SERIES ECONOMETRICS

Figure 1.46: Augmented Dickey Fuller Test Daily Brent Oil

We can not reject the null of unit root. So Crude levels may behave like RW.

Figure 1.47: Correlogram of Interest Rates

Figure 1.48: Short and Long rates: Trl30 and 360

46

Page 47: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.3. COINTEGRATION

I(1) and I(0) Series

If a series is stationary it is said to be I(0) series. If a series is not stationary but its first difference isstationary it is called to be difference stationary or I(1). Next section will investigate the stationaritybehaviour of more than one time series known as co-integration.

1.3 COINTEGRATION

Economic theory, implies equilibrium relationships between the levels of time series variables thatare best described as being I(1). Similarly, arbitrage arguments imply that the I(1) prices of certainfinancial time series are linked. (two stocks, two emerging market bonds etc). If two (or more)series are themselves non-stationary (I(1)), but a linear combination of them is stationary (I(0))then these series are said to be co-integrated. Examples:

• Inflation and interest rates,

• Exchange Rates and inflation rates,

• Money Demand: inflation, interest rates, income

Figure 1.49: Consumption and Income Logs

47

Page 48: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.3. COINTEGRATION CHAPTER 1. TIME SERIES ECONOMETRICS

Figure 1.50: Brent vs WTI

Figure 1.51: Crude oil Futures

48

Page 49: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.3. COINTEGRATION

Figure 1.52: Usd treasury 2 year vs 30 years

Money Demand

mdt = β0 + β1rt + β2yt + β3inft + εt r: interest rates, y: income, infl: inflation.

Each series in the above eqn may be nonstationary (i.e. I(1)) but the money demand re-lationship may be stationary. All of the above series may wander around individually but as anequilibrium relationship MD is stable. Or even though the series themselves may be non-stationary,they will move closely together over time and their difference will be stationary. Consider the mtime series variables y1,t, y2,t, . . . ym,t known to be non-stationary, ie. suppose

yi,t = I(1), i = 1, 2, 3, ...,m

Then, yt = (y1,t, y2,t, . . . , ym,t)′ are said to form one or more cointegrating relations if there are

linear combinations ofyi,t’s that are I (0)

Where, r denotes the number of cointegrating vectors.

Testing for Cointegration Engle – Granger Residual-Based Tests Econometrica, 1987

Step1 Run an OLS regression of y1,t (say) on the rest of the variables: namely y2,t, y3,t, . . . ym,t andsave the residual from this regression .

y1,t =

m∑i=2

βiyi,t + ut

Dickey Fuller Test

ut = β1ut−1 + εt

Dickey-Fuller unit root tests.

49

Page 50: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.3. COINTEGRATION CHAPTER 1. TIME SERIES ECONOMETRICS

Residual Based Cointegration test: Dickey Fuller test

∆ut = δ + γut−1 where γ = β1 − 1

Hence

H0 : γ = 0

Therefore, testing for co-integration yields to test whether the residuals from a combination of I(1)series are I(0). If u is an I(0) then we conclude. Even the individual data series are I(1) their linearcombination might be I(0). This means that there is an equilibrium vector and if the variablesdivert from equilibrium they will converge there at a later date. If the residuals appear to be I(1)then there does not exist any co-integration relationship implying that the inference obtained fromthese variables are not reliable.

Higher Order Integration

Higher order integration if two series are I(2) may be they might have an I(1) relationship.

Examples of Cointegration: Brent Wti Regression

Null Hypothesis: RESID01 has a unit root

Exogenous: Constant

Lag Length: 0 (Automatic - based on SIC, maxlag=12)

t-statistic Prob*Augmented Dickey-Fuller test statistic -4.226414 0.0009

Test Critical Values 1% level -3.4875505% level -2.88650910% level -2.580163

So we reject the null.

Example of ECM

The following is the ECM that can be formed,

∆yt = α+ β∆xt − λ(ut−1)

λ is the speed of adjustment towards equilibrium.

λ < 0 is expected since error can be correction it is expected to lie between 0 and 1

ut−1: is the equilibrium error

Estimation of ECM

ECM: λ: speed of adjustment coefficient

ut−1 = (yt−1 − βxt−1) equilibrium error

If the system hits a random shock the λ will push the system back to equilibrium. The signand the magnitude of the λ will be the main determinants of ECM. It is negative and the size showsthe speed with which error corrects.

50

Page 51: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.3. COINTEGRATION

Error Correction Term

The error correction term tells us the speed with which our model returns to equilibrium for a givenexogenous shock. It should have a negative sign, indicating a move back towards equilibrium, apositive sign indicates movement away from equilibrium. The coefficient should lie between 0 and1, 0 suggesting no adjustment one time period later, 1 indicates full adjustment.

An Example Are Turkish interest rates with different maturities (1 month versus 12 months)co-integrated ?

Step 1: Test for I(1) for each series.

Step 2: Test whether two of these series move together in the long-run. If yes then set upan Error Correction Mechanism.

Figure 1.53: TRLGOV30 TRLGOV360

Figure 1.54:

Figure 1.55:

So both of these series are non-stationary, i.e I(1). Now we test whether there exists a linearcombination of these two series which is stationary.

51

Page 52: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.3. COINTEGRATION CHAPTER 1. TIME SERIES ECONOMETRICS

r360t = βr30t + ut

Both r360t and r30t are I(1) and test is I(0)

Run another ADF on

∆ut = δ + γut−1 + εt

Test for Cointegration

Figure 1.56: Test for co-integration

Estimate the ECM

r360t = βr30t + ut

Both r360t and r30t are I(1) and εt is I(0). Then we have an equilibrium relationship which canbe given as ECM:

∆r360t = α+ λ(r360t−1 − βr30t−1) + εt

∆r360t = −0.0032− 0.099874(r360t−1 − 1.1r30t−1)

Figure 1.57: Residual Actual Fitted

52

Page 53: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.4. MULTIPLE EQUATION SYSTEMS

Figure 1.58: ECM Regression

Use of Cointegration in Economic and Finance

• Purchasing Power Parity: FX rate differences between two countries is equal to inflationdifferences. Big Mac etc. . .

• Uncovered Interest Rate Parity: Exchange rate can be determined with the interest ratedifferentials

• Interest Rate Expectations: Long and short rate of interests should be moving together.

• Consumption Income

• HEDGE FUNDS! (ECM can be used to make money!)

Conclusion

• Test for co-integration via ADF is easy but might have problems when the relationship ismore than 2-dimensional (Johansen is more suitable)

• Nonlinear co-integration, Near unit roots, structural breaks are also important.

• But stationarity and long run relationship of macro time series should be investigated indetail.

1.4 Multiple Equation Systems

Outline:

• Simultaneous Equations

• structural versus reduced for models

• Inconsistency of OLS

• Simultaneous Equations in Matrix Form

• VAR Models

53

Page 54: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.4. MULTIPLE EQUATION SYSTEMS CHAPTER 1. TIME SERIES ECONOMETRICS

1.4.1 Seemingly Unrelated Regression Model

y1,t = β1,0 + β1,1xt + u1,t

y2,t = β2,0 + β1,2xt + u1,t

ut = (u1,t, u2,t)T

ut : iidN

[(00

)(σ21 σ1,2σ2,1 σ22

)X’s are exogenous and disturbances are comptemporenously correlated.

y1,t = β1,0 + β1,1x1,t + β1,2y2,t + u1,t

y2,t = β2,0 + β2,1x2,t + β2,2y1,t + u2,t

ut = (u1,t, u2,t)T

ut : iidN

[(00

)(σ21 σ1,2σ2,1 σ22

)Here both endogenous variables are incorporated into the systems (y1 and y2).USTTEKI EQUATIONLARLA NOTATION FARKLI.

Recursive Systems

y1,t = β1,3x1,t + u1,t

y2,t = β2,2y1,t + β2, 3x2,t + u2,t

y3,t = β3,1y1,t + β3,2y2,t + β3, 3x3,t + u3,t

ABOVE EQ SYSTEMS?

ut : iidN

[000

σ21 0 00 σ22 00 0 σ23

Structural and Reduced Forms

y1,t − β1y2,t = u1,t

−β2y1,t + y2,t − α = u2,t

This model is known as the structural model which can be represented as

Byt +Axt = ut

yt =

(y1,ty2,t

), B =

(1 −β1−β2 1

), A =

(0−α

), ut =

(u1,tu2,t

)54

Page 55: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.4. MULTIPLE EQUATION SYSTEMS

Reduced Form

In order to express everything in terms of y:

yt = −B−1Axt +B−1ut

yt = Πxt + vt

Π = −B −−1A

vt = B−1ut

Why simultaneous equations matter? SLAYTLAR BOSTU.

Some Simultaneous Equation Models

Demand and Supply Model:

Qdt = α0 + α1Pt + u1,t α1 < 0

Qst = β0 + β1Pt + u2,t β1 > 0

Qdt = Qst

Figure 1.59: Some Simultaneous Equation Models

55

Page 56: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.4. MULTIPLE EQUATION SYSTEMS CHAPTER 1. TIME SERIES ECONOMETRICS

Figure 1.60: Some Simultaneous Equation Models

Figure 1.61: Some Simultaneous Equation Models

Keynesian Income Function

Yt = Ct + It

Ct = β0 + β1Yt + ut

56

Page 57: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.4. MULTIPLE EQUATION SYSTEMS

Figure 1.62: Some Simultaneous Equation Models

Inconsistency of OLS

OLS may not be applied to estimate a single equation embedded in a system of simultaneousequations if one or more of explanatory variables are correlated with the disturbance term in thatequation Result: the estimators thus obtained are inconsistent.

Let us consider the previous model.

By substituting C

Yt = β0 + β1Yt + It + ut

Yt =β0

1− β1+

It1− β1

+ut

1− β1

E[Yt] =β0

1− β1+

It1− β1

cov(Yt, ut) = E[(Yt − E[Yt])(ut − E[ut])

]cov(Yt, ut) = E[

u2t1− β1

]

Since Y − E[Yt] = ut1−β1 and ut − E[ut] = ut

cov(Yt, ut) =σ2

1− β1

β1 =

∑nt=1(Ct − C)(Yt − Y )∑n

t=1(Yt − Y )2

β1 =

∑nt=1Ctyt∑nt=1 y

2t

57

Page 58: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.4. MULTIPLE EQUATION SYSTEMS CHAPTER 1. TIME SERIES ECONOMETRICS

β1 =

∑nt=1(β0 + β1Yt + ut)yt∑n

t=1 y2t

β1 =β0∑n

t=1 yt∑nt=1 y

2t

+β1∑n

t=1 Ytyt∑nt=1 y

2t

+

∑nt=1 utyt∑nt=1 y

2t

β1 = β1 +

∑nt=1 utyt∑nt=1 y

2t

E[β1] = β1 + E

[∑nt=1 utyt∑nt=1 y

2t

]

We cannot evaluate it via E(.) operator since expectation operator is a linear one. But we alsoknow that u and Y are not independent.

plim(β1) = plim(β1) + plim

(∑nt=1 utyt∑nt=1 y

2t

)

plim(β1) = plim(β1) + plim

((∑n

t=1 utyt/n)

(∑n

t=1 y2t /n)

)

plim(β1) = β1 +σ2/1− β1

σ2Y

plim(β1) = β1 +1

1− β1σ2

σ2Y

So inconsistent.

cov(Yt, ut) =σ2

1− β1

By substituting C we obtained;

Yt =β0

1− β1+

It1− β1

+ut

1− β1

A reduced for equation is one that expresses an endogenous variable solely in terms of prede-termined variables and stochastic disturbance.

So if we re-write this as;

Yt = Π0 + Π1It + wt

where Π0 = β01−β1 ; Π1 = 1

1−β1 ; wt = ut1−β1

This is reduced form equation for Y. By applying same way we can derive reduced form for Ctoo.

58

Page 59: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.4. MULTIPLE EQUATION SYSTEMS

Underidentification

Consider the Demand & Supply model

Qst = β0 + β1Pt + u2,t β1 > 0

Qdt = α0 + α1Pt + u1,t α1 < 0

Qdt = Qst

α0 + α1Pt + u1,t = β0 + β1Pt + u2,t

Reduced forms;

(α1 − β1)Pt = β0 − α0 + u2t − u1t

Pt =β0 − α0

α1 − β1+u2,t − u1,tα1 − β1

Pt = Π0 + vt

Qt = α0 + α1

(β0 − α0

α1 − β1+u2,t − u1,tα1 − β1

)+ u1t

Qt =α1β0 − α1α0 + (α1 − β1)α0

α1 − β1+α1u2t − α1u1t + (α1 − β1)u1t

α1 − β1

Qt =α1β0 − α0β1α1 − β1

+α1u2t − β1u1tα1 − β1

Qt = Π1 + wt

Now we have 2 reduced form parameters which include all four structural parameters. So wehave 2 equations and 4 unknowns Then there is no unique solution If we regress reduced forms whatwe would have is only the mean values of price and quantity, nothing more! We can not identifythe demand or supply function.

Test for Simultaneity Problem

Hausman Specification Problem

Demand: Q = α0 + α1P + α2I + α3R+ u1

Supply: Q = β0 + β1P + u2

59

Page 60: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.5. VECTOR AUTOREGRESSION VAR CHAPTER 1. TIME SERIES ECONOMETRICS

Estimation of Simultaneous Equations

Figure 1.63: Estimation of Simultaneous Equations

Simultaneous Equations in Matrix Form

Full Information Maximum Likelihood(FIML) Estimation:

We have:

Γyt + Cxt = ut

or The likelihood function is given as

yt = Πxt + vt vt ∼ iidN(0,Ω) where Ω = Γ−1Σ(Γ−1)

L = (2π)−n|Ω|−n/2exp

[− 1/2

T∑t=1

(yt −Πxt)TΩ−1(yt −Πxt)

]

Consistent estimates are available with FIML, however FIML is very sensitive to correct spec-ification of the system.

1.5 Vector Autoregression VAR

In 1980’s proposed by Christopher Sims is an econometric model used to capture the evolution andthe interdependencies among multiple economic time series. Generalizes the univariate AR models.All the variables in the VAR system are treated symmetrically . (by own lags and the lags of allthe other variables in the model)

VAR models as a theory-free method to estimate economic relationships. They consitute analternative to the ”identification restrictions” in structural models .

60

Page 61: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.5. VECTOR AUTOREGRESSION VAR

Why VAR

Figure 1.64: Christoffer Sims, from Princeton (nobel prize winner 2011) First VAR paper in 1980

VAR Models

In Vector Autoregression specification, all variables are regressed on their and others lagged val-ues.For example a simple VAR model is

y1t = m1 + a11y1,t−1 + a12y2,t−1 + ε1t

y2t = m2 + a21y1,t−1 + a22y2,t−1 + ε2t

or (y1ty2t

)=

(m1

m2

)+

(a11 a12a21 a22

)(y1,t−1y2,t−1

)+

(ε1tε2t

)Which is called VAR(1) model with dimension 2

yt = m+Ayt−1 + εt

Generally VAR(p) model with k dimension is

yt = m+A1yt−1 +A2yt−2 + ...+Apyt−p + εt

Where each Aiis a k × k matrix of coefficients, m and εt is the k × 1 vectors.Furthermore,E[εt] = 0 for all t and E[εtε

Ts ] = ω for t = s

E[εtεTs ] = 0 for t 6= s→ No serial correlation but there can be contemporaneous correlations.

An Example VAR Models: 1 month 12 months TRY Interest rates monthly

DUPELICATEDGenerally VAR(p) model with k dimension is

yt = m+A1yt−1 +A2yt−2 + εt

where each Ai is a k × k matrix of coefficients, m and εt is the k × 1 vectors.Furthermore,E[εt] = 0 for all t and E[εtε

Ts ] = ω for t = s

E[εtεTs ] = 0 for t 6= s→ No serial correlation but there can be contemporaneous correlations.

ASAGIDAKI REGRESYON SONUCUNU DUZELT TABLO YAP

61

Page 62: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.5. VECTOR AUTOREGRESSION VAR CHAPTER 1. TIME SERIES ECONOMETRICS

Figure 1.65: Regression Output

A1 =

(0.78 −0.581.25 0.06

)

A2 =

(0.06 0.50−0.28 −0.03

)Akaike Information Criterion : −4.089038 Schwarz Criterion : −3.914965

Hypotesis Testing

To test whether a VAR with a lag order 8 is preferred to a log order 10.

(T − c)(log|∑r

| − |∑u

|) ∼ χ2 df: # of restrictions

T : number of observations

c: number of parameters estimated in each equation of unresticted system

log|∑

u | log of the determinant of∑

u

Inpulse Response Functions

Suppose we want to see the reaction of our simple initial VAR(1) model to a shock, say ε1 = [1, 0]T

and the rest is 0 where,

A =

(0.4 0.10.2 0.5

)

y0 = 0

y1 =

(10

)→ y2 = Ay1 + εt =

(0.4 0.10.2 0.5

)(10

)+

(00

)=

(0.40.2

)

→ y3 = Ay2 =

(0.4 0.10.2 0.5

)(0.40.2

)+

(00

)=

(0.180.18

)62

Page 63: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.5. VECTOR AUTOREGRESSION VAR

Figure 1.66: Response to Cholesky One S.D. Innovations ± 2 S.E.

63

Page 64: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.6. QUESTIONS CHAPTER 1. TIME SERIES ECONOMETRICS

1.6 Questions

Part A (True-False)1. In choosing the optimal lag order for a Vector Autoregression (VAR), minimizing the Akaike

Information Criterion (AIC) statistic from one equation will be sufficient.

2. if the auotcorrelation coefficient estimates of an AR(2) model ( yt = φ1yt−1+φ2yt−2+εt),aregiven as ρ1 = 0.6666, ρ2 = 0.16666, ρ3 = −0.16666, ρ4 = −0.25, ...

then it can be inferred that φ1 = 1, φ2 = 0.5.

64

Page 65: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.6. QUESTIONS

3. A time series with a given specification can be said to be stationary yt = 3yt−1−0.25yt−2+εt(One can reach this conclusion without any formal test.)

4. We can always establish a cointegration relationship based on various non-stationary vari-ables.

65

Page 66: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.6. QUESTIONS CHAPTER 1. TIME SERIES ECONOMETRICS

further questions1.) Suppose you are given the following AR(2) prcoess εt. is a white noise error term and you

would like to conduct a forecasting exercise.

yt = φ1yt−1 + φ2yt−2 + εt (1.18)

a. suppose you would like to conduct a forecasting exercise (assuming your time horizonis given as t = 1, 2, 3, .., T, T + 1, ..T + R where the last R observations are reserved for fore-casting purposes). Write down the 1st., 2.nd, and the 3rd.,...nth step ahead forecasting formulayT+1, yT+2, yT+3,...yT+n

b.) Suppose you have estimated the model yt = 0.63yt−1 + 0.17yt−2. where yT = 0.31, yT−1 =0.02, yT−2 = −0.16,find the forecast values of yT+1, yT+2, yT+3. Find RMSPE if yT+1 = 0.62,yT+2 = 0.19, yT+3 = −0.32.

66

Page 67: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.6. QUESTIONS

c.) The researcher also estimates an MA model wit the following specification yt = 0.38 +0.10εt−1,εT = −0.02, εT−1 = 0.13, εT−2 = 0.19.

Determine which alternative time series model produced the most accurate forecast.(i.e. ARor MA specification is performing better).

d.) Suppose now you are given the following ARMA(2,1) prcoess yt = φ1yt−1+φ2yt−2+ϕεt−1+εt where, εt. is a white noise error term and you would like to conduct a forecasting exercise. Write

down the formulas for the following Forecasts of: yT+1, yT+2, yT+3

67

Page 68: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.6. QUESTIONS CHAPTER 1. TIME SERIES ECONOMETRICS

e.) Suppose that the correlogram of a time series consisting of 100 observations has ρ1 =0.50, ρ2 = 0.63, ρ3 = −0.10, ρ4 = 0.08, ρ5 = −0.17, ρ6 = 0.13

ρ7 = 0.09, ρ8 = −0.05, ρ9 = 0.12, ρ10 = −0.05.Suggest an alternative ARMA model for thistime series. (Hint: use visual inspection, and some formal tests).

68

Page 69: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.6. QUESTIONS

3.) Suppose you are given a VAR Model as yt = Ayt−1 + et where y is (y1,t,y2,t, y3,t)′

A =

0.8 −0.38 −0.02−0.2 0.56 0.04−0.28 −0.28 0.72

a.) derive the impulse response functions (up to 4 periods) for a shock sourcing from the second

variable. What can be said about the policy prescription if y1,t,y2,t, y3,t are inflation, money suppyand exchange rate respectively.

b.) derive the forecasting formula for the vector of variables for this VAR(1) model.

True/False1. It can be said that heteroscedasticity is more of a cross-sectional problem (rather than time

series).2. Suppose you are given the following model yt = α+ β1yt−1 + β2xt + ut , and would like to

test for existence of autocorrelation by Durbin Watson test statistic. You estimated DW=1.87 andDL=1.89 and DU=2.32. We can conclude that we can not reject the null of no autocorrelation.

3. In estimating linear least squares it can be said that both OLS and Maximum Likelihoodestimators hold the same statistical properties.

1. Suppose that you are given the following nonlinear regression where εt. is a White noise errorterm.

Yt = β0 + exp(β1)Xβ21t + εt (1.19)

a. How would you go about and estimate the above regression via Gauss Newton regression?

b.How can you derive the log-likelihood for the above regression? Which numerical algorithmsyou may have used? Derive the information matrix.

c.) How can you compare the quality of the estimators that you have obtained in both a andb?

2. You are given the 3 equation model, where y1, y2, and y3 are endogenous, x1, x2 and x3 arestrictly exogeneous and u1, u2, and u3 are random disturbance terms.

y1 = β12y2 + γ12x2 + u1 (1.20)

y2 = β23y3 + γ21x1 + γ23x3 + u2 (1.21)

y3 = β31y1 + β32y2 + γ31x1 + γ33x3 + u3 (1.22)

69

Page 70: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.6. QUESTIONS CHAPTER 1. TIME SERIES ECONOMETRICS

Explain what is meant by saying that an equation is “not identified ”, and use the ordercondition to investigate the identification of each equation What would be the propertiesof OLS estimators if applied to Equation (1) and (2). Derive the reduced form equationsand compare them with the “stuructral equations” coefficients. Which method of estimationis appropriate to estimate these reduced forms: ILS,2SLS? Consider whether the two stageleast squares estimate of (1) would be affected if equation (3) was respecified to include x2

3. Suppose that you are given the following nonlinear regression where εt. is a White noise errorterm.

Yt = β0 +1

exp(β1X1t)+ εt (1.23)

a.) By using the initial values of β0 = 2, β1 = 1, X1,t = 1, 2, ....100, (and εt is normallydistributed error terms from 1..100) generate pseudo Y values and estimate the parametersby using Excel’s solver.

b.) How would you go about and estimate the above regression via Gauss Newton regression?Show each steps explicitly.

c.) Derive the loglikelihood function for the above specification under normality. Can yousolve Maximum Likelihood coefficients analytlically. Derive the score and Hessian of likelihoodfunction. Show the first steps of the Newton Raphson algorithm by using the starting valuesyou used in a.)

d.) test the null hypothesis of β0 = 2.

4. a. Derive the autocovariances of both ARMA(2,1) and ARMA(2,2) processes given below.

yt = θ1yt−1 + θ2yt−2 + εt + φ1εt−1 (1.24)

yt = θ1yt−1 + θ2yt−2 + εt + φ1εt−1 + φ2εt−2 (1.25)

b.) numerically generate both series by using θ1 = 0.2, θ2 = 0.5, φ1 = 0.1, φ2 = 0.3

c.) after you generate each these processes estimate their ρ1, ρ2, ...ρ10. How do they comparewith your results in a.)

3. You are given the 3 equation model, where y1, y2, and y3 are endogenous, x1, x2 and x3are strictly exogeneous and u1, u2, and u3 are random disturbance terms.

y1 = β12y2 + γ12x2 + u1 (1.26)

y2 = β23y3 + γ21x1 + γ23x3 + u2 (1.27)

y3 = β31y1 + β32y2 + γ31x1 + γ33x3 + u3 (1.28)

Explain what is meant by saying that an equation is “not identified ”, and use the ordercondition to investigate the identification of each equation What would be the propertiesof OLS estimators if applied to Equation (1) and (2). Derive the reduced form equationsand compare them with the “stuructral equations” coefficients. Which method of estimationis appropriate to estimate these reduced forms: ILS,2SLS? Consider whether the two stageleast squares estimate of (1) would be affected if equation (3) was respecified to include x2.How would you use maximum likelihood method to estimate the system parameters. Derivethe loglikelihood function.

70

Page 71: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.6. QUESTIONS

5. Suppose an individual maximixes his lifetime utility. He also has portfolio consisted of a stock.This individual either consumes or saves and invests in the financial market instruments Sohis optimization problem becomes

∞∑τ=0

δτEu(ct+τ) (1.29)

subject to

At =∞∑τ=0

(1 + r)−τ (ct+τ − wt+τ ) (1.30)

where A is the asset price valuation formula, c is consumption w is labour wage. How wouldyou use the econometric theory to form a test based on the avaialble information. Howwould you test the validity of the above maximization problem? What econometric modelsand testing structures you can use. What is the significance of consumer preferences in thiscontext?

6. You are given the folowing simultaneous equation model

Y1t = β10 + β12Y2t + γ11X1t + ε1t (1.31)

Y2t = β20 + β21Y1t + γ22X2t + ε2t (1.32)

a.) Derive the reduced form equations.

b.) Discuss whether the structural equations are identified or not

c.) How would you estimate such an equation system.

PartB

7. Suppose you are interested a given regression equation. of this form Y = β0+βXt+ε. Furthersuppose that you have estimated the coefficient vector β. How would you test the quality offinite sample properties of your estimators. What methods are available?

8. How would you estimate and test the following model.

Yt =√β0 + β1X

β22t + εt (1.33)

Part A (True-False)

[Answer the following questions very carefully. Be very clear on your answer show

formula to prove your claim where necessary. Your mark will be given on the quality of

your answer.]

True or false explain

A. 1 Convergence in mean square is a weaker condition than convergence in probability. (10Points)

A. 2 The Central Limit Theorem describes the result that the sequence (YT − µ) convergesin distribution to a Gaussian random variable. (10 points)

71

Page 72: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

1.7. QUESTIONS CHAPTER 1. TIME SERIES ECONOMETRICS

1.7 Questions

1. Descriptive ANALYSIS OF TIME SERIES (STYLIZED FACTS)

a In the following data set you are given US, and Turkish GDP growth rates and inflationdata.

b In addition, download both the GDP and ınflation for

i. EU as one country

ii. Germany

iii. South Korea, Soth Africa,Brasil, India and China

c GDP growth data are quarterly (like the one used in my data set Turkish and US, GDPgrowth series quarterly),

d Inflation data is monthly observed (so use monthly US, EU inflation rates (source: (ECBor Eurostat, OECD or any other source. (Year on Year)

e Similar credit rating countries such as (Brasil, South Africa, India) can constitute onegroup which is comparable with Turkey.

f Find the sample mean, sample variance, skewness, and excess kurtosis estimates on thesedata compare your findings on different years and US Turkey comparison.

g For Turkey divide the sample into two (after April 2001 and before).

h Sharp Ratio is given as E(X)/Variance(X) is a critical performance measure. Look atthe Turkish and US GDP and briefly comment on it.

i Calculate autocovariance and autocorrelations (autocorrelation between y(t) and y(t-i),i=1,...50, for quarterly and monthly series seperately). (use the Matlab code attachedor translate it into R or use Stata, EVIEWS)

j Fit an AR(1) for all of the four series (Brasil, South Africa, India and Turkey) andcompare your results.

k Compare the uncoditional mean of the Turkish GDP and inflation series.

l Compare the uncoditional mean of the Turkish GDP and inflation series.

m Compare the Turkish inflation series with respect to others (i.e try to answer for simi-larities and differences between emerging market countries and developed markets).

2. AR(1) simulation (Given the following model):

yt = φ0 + φ1yt−1 + εt

Simulate the AR(1) process when φ1 = 1, 0.95, 0.85, 0.5, 0.25, 0.10

for two cases with or without drift term (i.e. )

a for two cases with or without drift term (i.e. φ0 = 0, 1

b a. What are the differences and similarities of the time series behaviour of these ARseries?

c What can be said about the unconditional mean of each series. Compare your simulatedAR(1) sample average and the theoretical unconditional means of AR(1) model. (as wedid in our lab session)

72

Page 73: Time Series Econometrics Lecture Notes - boun.edu.tr Note-Ti… · Time Series Econometrics Lecture Notes ... One of the most popular analytical tools in econometrics ... TIME SERIES

CHAPTER 1. TIME SERIES ECONOMETRICS 1.7. QUESTIONS

d Draw autocovariances for each of the series you generate.

e Estimate the Turkish GDP as an AR(1) model and use the coefficients for simulation.Compare the actual GDP and simulated AR(1).

3. By using the above series: estimate the AR(1”

,p) MA(1”q) and find the most suitable

ARMA(p,q) combination. By using Akaike Information Criterion (AIC) and Bayesian In-formation Criterion.

4. On the basis of your optimal lag order choice above do a forecasting exercise for GDP andInflation for Turkey and US.

5. Testing with unit roots:

a Conduct the unit root tests (ADF) for the 5 of the (GDP or Inflation) data you haveused in PS1.

b State in a table which series are I(0) and I(1) or I(2) if any.

c If you find any of your series I(1) then conduct an ARIMA forecast.

6. 1. AR(1) simulation (Given the following model):

yt = φ0 + φ1yt−1 + εt

Simulate the AR(1) process when φ1 = 1, 0.99, 0.95, 0.90, 0.5

Note: In this question you need to simulate a total of 3× 5 = 15 time series.

a Without drift φ0 = 0

b With a drift φ0 = 1

c With drift and time trend

yt = φ0 + φ1yt−1 + φ2t+ εt

d Then conduct ADF tests each of these three specifications.

e In a table summarize your findings .

7. By using TUIK (or any other data source like TCMB) download total money supply, GDP(levels), exports and imports: (Use TL as the currency of GDP. )

a Test the existence of cointegration between money supply and gdp

b Test the existence of cointegration between exports and imports

c If there is co-integration relationship in the above case test the existence of error correc-tion mechanism.

d Clearly comment on the speed of adjustment coefficient.

73