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

WORKSHOP Advanced Time Series Econometrics with EViews

  • Upload
    others

  • View
    34

  • Download
    4

Embed Size (px)

Citation preview

Page 1: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 2: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 3: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 4: WORKSHOP Advanced Time Series Econometrics with EViews

1.1 Unit Root

Page 5: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 6: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 7: WORKSHOP Advanced Time Series Econometrics with EViews

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

7

Page 8: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 9: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews

1.0000

9

Page 10: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews (cont.)

0.2867

10

Page 11: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews (cont.)

0.8476

11

Page 12: WORKSHOP Advanced Time Series Econometrics with EViews

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

0.0000

12

Page 13: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews (cont.)

0.0000

13

Page 14: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 15: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews

1.0000

15

Page 16: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews (cont.)

0.1861

16

Page 17: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews (cont.)

0.8459

17

Page 18: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews (cont.)

0.0000

18

Page 19: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews (cont.)

0.0000

19

Page 20: WORKSHOP Advanced Time Series Econometrics with EViews

●  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

Page 21: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 22: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 23: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews

23

Page 24: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews (cont.)

24

Page 25: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews (cont.)

25

Page 26: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 27: WORKSHOP Advanced Time Series Econometrics with EViews

1.2 Cointegration

Page 28: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 29: WORKSHOP Advanced Time Series Econometrics with EViews

●  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

Page 30: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 31: WORKSHOP Advanced Time Series Econometrics with EViews

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

Approach (2001)

31

Page 32: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 33: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 34: WORKSHOP Advanced Time Series Econometrics with EViews

STEP2: ●  Estimate the equation like,

(Command: ls y c x )

Engle-Granger Test for Causality (cont.)

34

Page 35: WORKSHOP Advanced Time Series Econometrics with EViews

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

35

Page 36: WORKSHOP Advanced Time Series Econometrics with EViews

STEP 1

36

Page 37: WORKSHOP Advanced Time Series Econometrics with EViews

STEP 1 (cont.) For LNINF

0.2229

37

Page 38: WORKSHOP Advanced Time Series Econometrics with EViews

STEP 1 (cont.)

0.0592

38

Page 39: WORKSHOP Advanced Time Series Econometrics with EViews

STEP 1 (cont.)

0.4493

39

Page 40: WORKSHOP Advanced Time Series Econometrics with EViews

STEP 1 (cont.)

0.0000

40

Page 41: WORKSHOP Advanced Time Series Econometrics with EViews

STEP 1 (cont.) For LNUNEMP

0.7374

41

Page 42: WORKSHOP Advanced Time Series Econometrics with EViews

STEP 1 (cont.)

0.1509

42

Page 43: WORKSHOP Advanced Time Series Econometrics with EViews

STEP 1 (cont.)

0.2266

43

Page 44: WORKSHOP Advanced Time Series Econometrics with EViews

STEP 1 (cont.)

0.0010

44

Page 45: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 46: WORKSHOP Advanced Time Series Econometrics with EViews

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

STEP 2

46

Page 47: WORKSHOP Advanced Time Series Econometrics with EViews

STEP 2

47

Page 48: WORKSHOP Advanced Time Series Econometrics with EViews

STEP 3

48

Page 49: WORKSHOP Advanced Time Series Econometrics with EViews

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

lnunemployment and lninflation series are cointegrated.

49

Page 50: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 51: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 52: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 53: WORKSHOP Advanced Time Series Econometrics with EViews

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

The Johansen Approach (cont.)

53

Page 54: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews

54

Page 55: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews (cont.)

55

Page 56: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews (cont.)

56

Page 57: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews (cont.)

57

Page 58: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews (cont.)

58

Page 59: WORKSHOP Advanced Time Series Econometrics with EViews

Applications with EViews (cont.)

59

Page 60: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 61: WORKSHOP Advanced Time Series Econometrics with EViews

2. Vector Autoregression (VAR) Models

Page 62: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 63: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 64: WORKSHOP Advanced Time Series Econometrics with EViews

•  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

Page 65: WORKSHOP Advanced Time Series Econometrics with EViews

VAR Estimation Output

65

Page 66: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 67: WORKSHOP Advanced Time Series Econometrics with EViews

AR Roots Table

Lag Structure

67

Page 68: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 69: WORKSHOP Advanced Time Series Econometrics with EViews

Lag Length Criteria

69

Page 70: WORKSHOP Advanced Time Series Econometrics with EViews

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

Residual Tests

70

Page 71: WORKSHOP Advanced Time Series Econometrics with EViews

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

Portmanteau Autocorrelation Test

71

Page 72: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 73: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 74: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 75: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 76: WORKSHOP Advanced Time Series Econometrics with EViews

Impulse Responses (cont.)

76

Page 77: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 78: WORKSHOP Advanced Time Series Econometrics with EViews

Variance Decomposition (cont.)

78

Page 79: WORKSHOP Advanced Time Series Econometrics with EViews

3. Structural Vector Autoregression (SVAR)

Models

Page 80: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 81: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 82: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 83: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 84: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 85: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 86: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 87: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 88: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 89: WORKSHOP Advanced Time Series Econometrics with EViews

4. Vector Error Correction Models (VECMs)

Page 90: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 91: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 92: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 93: WORKSHOP Advanced Time Series Econometrics with EViews

VECM Estimation Output (cont.)

93

Page 94: WORKSHOP Advanced Time Series Econometrics with EViews

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

VECM Estimation Output (cont.)

94

Page 95: WORKSHOP Advanced Time Series Econometrics with EViews

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

VECM Estimation Output (cont.)

95

Page 96: WORKSHOP Advanced Time Series Econometrics with EViews

5. Autoregressive Distributed Lag

processes

Page 97: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 98: WORKSHOP Advanced Time Series Econometrics with EViews

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

Page 99: WORKSHOP Advanced Time Series Econometrics with EViews

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