workshop advanced time series econometrics with...

99
WORKSHOP on Advanced Time Series Econometrics with EViews Asst. Prof. Dr. Kemal Bagzibagli Department of Economic Res. Asst. Pejman Bahramian PhD Candidate, Department of Economic Res. Asst. Gizem Uzuner MSc Student, Department of Economic

Upload: lequynh

Post on 18-Mar-2018

254 views

Category:

Documents


3 download

TRANSCRIPT

WORKSHOP on

Advanced Time Series Econometrics with EViews

Asst. Prof. Dr. Kemal Bagzibagli Department of Economic

Res. Asst. Pejman Bahramian PhD Candidate, Department of Economic

Res. Asst. Gizem Uzuner

MSc Student, Department of Economic

EViews Workshop Series Agenda 1.  Introductory Econometrics with Eviews 2. Advanced Time Series Econometrics with Eviews 3. Forecasting, and Volatility Models with EViews

a.  Forecasting b.  Volatility models c.  Regime Switching Models

2

Part 2 - Outline

1.  Unit root test and cointegration

2.  Vector Autoregressive (VAR) models

3.  Structural Vector Autoregressive (SVAR) models

4.  Vector Error Correction Models (VECM)

5.  Autoregressive Distributed Lag processes

3

1.1 Unit Root

Why do We Need the Unit Root Tests? All assumptions are made on stationary series, but time series are generally nonstationary.

In order to examine this issue, we can apply the following tests: ●  DICKEY-FULLER TEST ●  AUGMENTED DICKEY-FULLER ●  PHILIPS-PERRON ●  KPSS TEST

5

Dickey-Fuller Test ●  The simplest approach to test for the unit root ●  Begins with AR(1) model.

●  Hypothesis testing:

H0: δ = 0 (no unit root) H1: δ = 1 (unit root)

6

Augmented Dickey-Fuller Test Let Yt be a time series. Deriving from AR(p) representation, the ADF test involves the following regressions:

7

Comparing DF and ADF Tests ●  True model structure: AR(2) or AR(3) ●  We model it as AR(1)

⇒  Autocorrelation problem will occur

●  In order to avoid the autocorrelation problem: ADF test is suggested

●  The tests have the same hypothesis structure

8

Applications with EViews

1.0000

9

Applications with EViews (cont.)

0.2867

10

Applications with EViews (cont.)

0.8476

11

Applications with EViews (cont.) Remedy: First difference of the series

0.0000

12

Applications with EViews (cont.)

0.0000

13

Phillips Perron Test ●  A more comprehensive theory of unit root

nonstationarity. ●  Similar to ADF tests,

○  but incorporates an automatic correction to the DF procedure to allow for autocorrelated residuals.

14

Applications with EViews

1.0000

15

Applications with EViews (cont.)

0.1861

16

Applications with EViews (cont.)

0.8459

17

Applications with EViews (cont.)

0.0000

18

Applications with EViews (cont.)

0.0000

19

●  Power of the tests is low if o  the process is stationary o  but with a root close to the non-stationary

boundary (1):

Critics to the Dickey Fuller and Phillips Perron Tests

20

Hypotheses of the ADF/PP tests: H0 : Yt〜~ I (1) H1: Yt〜~ I (0)

●  According to the null hypothesis, a unit root should be a rejected.

●  The tests are poor at deciding, for example, whether φ = 1 or φ = 0.95, especially with small sample sizes.

Critics to the Dickey Fuller and Phillips Perron Tests (cont.)

21

KPSS Test ●  The aim of this test is to remove

deterministic trend of the series in order to make it stationary.

●  The hypotheses differ from that of the ADF test:

H0 : Yt〜~ I (0) H1: Yt〜~ I (1)

22

Applications with EViews

23

Applications with EViews (cont.)

24

Applications with EViews (cont.)

25

Summary

DICKEY FULLER

AUGMENTED DICKEY FULLER

PHILLIPS PERRON KPSS TEST

Modelling with AR(1) process

Modelling with AR(p) process

Developed nonparametric

test

Modelling with MA process

H0: Yt〜 I (1) H1: Yt〜 I (0)

H0 : Yt〜 I (1) H1 : Yt〜 I (0)

H0 : Yt〜 I (1) H1 : Yt〜 I (0)

H0 : Yt〜 I (0) H1 : Yt〜 I (1)

26

1.2 Cointegration

What is Cointegration? ●  Two nonstationary series may have the property that a

particular linear combination of them, e.g. Xt - aYt , is stationary

●  If such a property holds Xt and Yt are cointegrated

●  Two cointegrated series will not drift too far apart over the long run.

●  e.g. consumption-income, prices of two close substitutes, prices and wages in two related markets 28

●  The analysis of short run dynamics is often done by first eliminating trends in variables, usually by differencing.

●  This procedure, however, throws away potential valuable information o  e.g. long run relationships about which economic

theories have a lot to say.

What is Cointegration? (cont.)

29

What is Cointegration? (cont.) Lemma 1: Series Xt and Yt are I(1) if these series are cointegrated, then Xt and Yt+φ are also cointegrated.

Lemma 2: If two series are cointegrated, they also have a Granger causality ●  However, we cannot know the direction of

the causality. 30

Detection of Cointegration ●  Engle-Granger Approach (1987) ●  Johansen Approach (1990) ●  Autoregressive Distributed Lag (ARDL)

Approach (2001)

31

Granger Causality ●  Granger (1969): first attempt at testing for

the direction of causality ●  Suppose X Granger-causes Y

o  but Y does not Granger-cause X

●  Then past values of X should be able to help predict future values of Y o  but past values of Y should not be helpful in

forecasting X 32

Engle-Granger (1987) Test for Causality STEP 1: ●  Test the variables for stationarity. ●  If they are stationary, the conventional LS

estimation is appropriate. ●  If they are not stationary in the SAME

DEGREE, go to Step 2

33

STEP2: ●  Estimate the equation like,

(Command: ls y c x )

Engle-Granger Test for Causality (cont.)

34

Engle-Granger Test ( cont.) STEP 3: ●  If ut is stationary, i.e. I(0) ●  THEN the variables are cointegrated.

35

STEP 1

36

STEP 1 (cont.) For LNINF

0.2229

37

STEP 1 (cont.)

0.0592

38

STEP 1 (cont.)

0.4493

39

STEP 1 (cont.)

0.0000

40

STEP 1 (cont.) For LNUNEMP

0.7374

41

STEP 1 (cont.)

0.1509

42

STEP 1 (cont.)

0.2266

43

STEP 1 (cont.)

0.0010

44

Conclusion ★ Both lninflation and lnunemployment

series are stationary in the same degree, I(1)

★ THEN we can go to Step 2.

STEP 1 (cont.)

45

lninflation = β0+ β1lnunemployment + u (Command: ls lninf c lnu)

STEP 2

46

STEP 2

47

STEP 3

48

STEP 3 ❖ So, ut is stationary. ❖ According to the Engle-Granger test,

lnunemployment and lninflation series are cointegrated.

49

The Johansen Approach ●  If the model has more than two variables, then there

can be more than one cointegration relation.

●  Generally, for m number of observations, we could have m-1 number of cointegration vectors.

●  Assume that all variables are endogenous in the model and no need to choose any variables for normalization.

50

STEP 1: Determine the cointegration integrated degree for the number of m variables by the unit root test. ●  Most of the economic indicators are

nonstationary o  using the unit root test also prevents the spurious

regression problem.

The Johansen Approach (cont.)

51

STEP 2: Find the appropriate lag order via lag-length criteria using a vector autoregressive (VAR) model. ●  This step is important to ensure that the

error term comes from a white noise process.

The Johansen Approach (cont.)

52

STEP 3 : Model selection according to deterministic component. •  In general it is better to select number 6

The Johansen Approach (cont.)

53

Applications with EViews

54

Applications with EViews (cont.)

55

Applications with EViews (cont.)

56

Applications with EViews (cont.)

57

Applications with EViews (cont.)

58

Applications with EViews (cont.)

59

Enger-Granger vs. Johansen Approaches

●  Engle-Granger is manual method for the cointegration test. ○  Disadvantage:

■  It gives maximum one cointegration relation (even if there are more than one cointegration relations).

●  Johansen approach is very superior than the Engle-Granger o  Restriction:

§  variables have to be in the same integrated order. 60

2. Vector Autoregression (VAR) Models

Vector Autoregression (VAR) Models

●  The VAR is commonly used for forecasting systems of interrelated time series and for analyzing the dynamic impact of random disturbances on the system of variables

●  The mathematical representation of a VAR is

62

Vector Autoregression (VAR) Models (cont.)

●  As an example, suppose that industrial production (IP) and money supply (M1) are jointly determined by a VAR and let a constant be the only exogenous variable.

63

•  Create a VAR Object. Select Quick/Estimate VAR

•  Select the VAR type: Unrestricted VAR.

•  Set the estimation sample •  Enter the lag specification •  Enter the names of endogenous and

exogenous series

Estimating a VAR in Eviews

64

VAR Estimation Output

65

Once you have estimated a VAR, EViews provides various view to work with the estimated VAR. On the estimation output window select view

Views and Procs of a VAR

66

AR Roots Table

Lag Structure

67

Reports the inverse roots of the characteristic AR polynomial The estimated VAR is stable (stationary) if all roots have modulus less than one and lie inside the unit circle. If the VAR is not stable, certain results (such as impulse response standard errors) are not valid.

     

AR Roots Graph Inverse Roots of AR Characteristic Polynomial

68

Lag Length Criteria

69

Correlograms: Displays the pairwise crosscorrelograms (sample autocorrelations) for the estimated Residuals In the VAR for the specified number of lags.

Residual Tests

70

Computes the multivariate Box-Pierce/Ljung-Box Q-statistics for residual serial correlation up to the specified order

Portmanteau Autocorrelation Test

71

A shock to the i-th variable not only directly affects the i-th variable but is also transmitted to all of the other endogenous variables through the dynamic (lag) structure of the VAR. An impulse response function traces the effect of a one-time shock to one of the innovations on current and future values of the endogenous variables. Application: First estimate a VAR. Then select View/Impulse Response

Impulse Responses

72

Display Format: displays results as a table or graph. Display Information: you should enter the variables for which you wish to generate innovations (Impulses) and the variables for which you wish to observe the responses (Responses)

Impulse Responses (cont.)

73

Response Standard Errors: provides options for computing the response standard errors. Note that analytic and/or Monte Carlo standard errors are currently not available for certain Impulse options and for vector error correction (VEC) models

Residual—One Unit sets the impulses to one unit of the residuals. Residual—One Std. Dev. sets the impulses to one standard deviation of the residuals

Impulse Definition

Impulse Responses (cont.)

74

Cholesky uses the inverse of the Cholesky factor of the residual covariance matrix to orthogonalize the impulses Generalized Impulses constructs an orthogonal set of innovations that does not depend on the VAR ordering Structural Decomposition uses the orthogonal transformation estimated from the structural factorization matrices. User Specified allows you to specify your own impulses

Impulse Responses (cont.)

75

Impulse Responses (cont.)

76

Separates the variation in an endogenous variable into the component shocks to the VAR.

Variance Decomposition

Provides information about the relative importance of each random innovation in affect

77

Variance Decomposition (cont.)

78

3. Structural Vector Autoregression (SVAR)

Models

The main purpose of SVAR estimation is to obtain non-recursive orthogonalization of the error terms for impulse response analysis In order to estimate the orthogonal factorization matrices you need to provide additional identifying restrictions. Two types of identifying restrictions: short-run and long-run. For either type, the identifying restrictions can be specified either in text form or by pattern matrices.

Structural (Identified) VARs

80

you can specify the restrictions by creating a named “pattern” matrix. Any elements of the matrix that you want to be estimated should be assigned a missing value “NA”. For example, suppose you want to restrict to be a lower triangular matrix with ones on the main diagonal and to be a diagonal matrix. Then the pattern matrices (for a variable VAR) would be:

Short-run Restrictions by Pattern Matrices

81

To Create Two New Matrices, A and B (3*3), Use Object/New Object and Then Use The Spreadsheet View To Edit The Values. Or You can write the following on command window

matrix(3,3) pata ’ fill matrix in row major order pata.fill(by=r) 1,0,0, na,1,0, na,na,1 matrix(3,3) patb = 0 patb(1,1) = na patb(2,2) = na patb(3,3) = na

Applications with EViews

82

Applications with EViews matrix(3,3) pata pata.fill(by=r) 1,0,0, na,1,0, na,na,1

matrix(3,3) patb = 0 patb(1,1) = na patb(2,2) = na patb(3,3) = na

83

Select Proc/Estimate Structural Factorization from the VAR window menu. In the SVAR Options dialog, click the Matrix button and the Short-Run Pattern button and type in the name of the pattern matrices in the relevant edit boxes.

Applications with EViews (cont.)

84

Applications with EViews (cont.) Short-run Restrictions in Text Form In text form, write out the relation as a set of equations K=3, variable VAR you have where you want to restrict A to be a lower triangular matrix with ones on the main diagonal and to be a diagonal matrix.

85

To specify these restrictions in text form, select Proc/Estimate Structural Factorization from the VAR window and click the Text button. In the edit window, you should type the Following:

@e1= c1*@u1 @e2= -c2@*e1 +c3*@u2 @e3= -c4@*e1 –c5*@e2 + c6*@ u3

Applications with EViews (cont.)

86

The long run response C to structural innovations take the form: Suppose you have a variable VAR where you want to restrict the long-run response of the second endogenous variable to the first structural shock to be zero . Then the long-run response matrix will have the following pattern:

Matrix (2,2) patc= na Patc(2,1) = 0

Long-run Restrictions

𝑪=   𝜳↓∞     𝑨↑−𝟏   𝑩

87

Once you have created the pattern matrix, select Proc/Estimate Structural Factorization from the VAR window menu. In the SVAR Options dialog, click the Matrix button and the Long-Run Pattern button and type in the name of the pattern matrix in the relevant edit box. To specify the same long-run restriction in text form, select Proc/Estimate Structural Factorization from the VAR window and click the Text button. In the edit window, you would type the following: @lr2(@u1)=0 ‘ zero LR response of 2nd variable to 1st shock

Long-run Restrictions (cont.)

88

4. Vector Error Correction Models (VECMs)

VEC model (VECM) is a restricted VAR designed for use with nonstationary series that are known to be cointegrated Consider a two variable system with one cointegrating equation and no lagged Difference terms. The cointegrating equation is The corresponding VECM is:

Vector Error Correction (VEC) Models

90

To set up a VEC, click the Estimate button in the VAR toolbar and choose the Vector Error Correction specification from the VAR/VEC Specification tab.

Estimate VECM

91

The VEC estimation output consists of two parts. The first part reports the results from the first step Johansen procedure default The second part of the output reports results from the second step VAR in first differences, including the error correction terms estimated from the first step The error correction terms are denoted CointEq1 in the output. At the bottom of the VEC output table, you will see two log likelihood values reported for the system. The first value, labeled Log Likelihood (d.f. adjusted), is computed using the determinant of the residual covariance matrix.

VECM Estimation Output

92

VECM Estimation Output (cont.)

93

The Log Likelihood value is computed using the residual covariance matrix without correcting for degrees of freedom

VECM Estimation Output (cont.)

94

Cointegrating Relations To store these estimated cointegrating relations as named series in the workfile, use Proc/Make Cointegration Group

VECM Estimation Output (cont.)

95

5. Autoregressive Distributed Lag

processes

Autoregressive Distributed Lag (ARDL)

●  An ARDL process refers to a model with lags of both the dependent and explanatory variables.

●  An ARDL(1,1) model would have 1 lag on both variables:

97

Generalized ARDL(p, q); ❖ One condition:

➢  dependent variable is integrated 1, I(1), ➢  but independent variables can have different

integrated order except I(2).

Autoregressive Distributed Lag (cont.)

98

Bibliography ●  Brooks, C. (2008) Introductory Econometrics for Finance, ●  Gujarati D.N., Porter D.C. (2004), Basic Econometrics,The McGraw−Hill

Companies ●  Maddala, G.S. (2002). Introduction to Econometrics. ●  Ramanathan, R. (2002). Introductory econometrics with applications,

Thompson Learning. Mason, Ohio, USA. ●  Wooldridge,J. (2000) Introductory Econometrics: A modern Approach.

South-Western College Publishing

99