Time-Series Analysis II Vector Autoregressive (VAR) and Vector Error-Correction Model (VECM)
Time-Series Analysis II Vector Autoregressive (VAR) and Vector Error-Correction Model (VECM)
Time-Series Analysis II
Vector Autoregressive (VAR) and
Vector Error-Correction Model (VECM)
Siong Hook Law, Ph.D
School of Business and Economics
Universiti Putra Malaysia
Email: [email protected]
1
Preview
• Vector Autoregressive (VAR) Model
• Johansen Multivariate Cointegration
• Vector-error Correction Model
(VECM)
2
Learning Objectives
- Set up a bivariate VAR model, where the variables are output (y)
and money supply (M3)
- Monthly data from 2015:M1 to 2024:M6 6
Bivariate VAR Example
7
Bivariate VAR Example – Lag-length and
Stability
• Importance of an appropriate lag-length
– If lag length is too small, the model is mispecified
– If lag length is too large, degrees of freedom are wasted
• Lag-length criteria
– Decision: Akaike, Schwartz, Hannan-Quinn
• Note: There should be no autocorrelation / serial
correlation problem at the selected lag
• Decision: If p-value is
– < 0.05, reject H0. “X” Granger causes “Y” at the 5%
significance level
– > 0.05, failed to reject H0. “X” does not Granger causes “Y”
at the 5% significance level
9
Impulse Response Function (IRF)
10
Variance Decomposition (VD) /
Forecast Error Decomposition
• The VD displays in the percentage of the error made
forecasting a variable over time due to a specific shock.
– How much of the variability in the dependent variable is
explained by its “own shocks” vs the “shocks in the other
variables in the systems”.
– As in the IRF, the VD applies the Cholesky Decomposition
for identification purpose.
11
Vector Erorr-Correction Model
(VECM)
12
More Practical Issues in Cointegration
Testing
• Note: we have focussed on two variables, Y and X.
• In practice, you may have many more variables.
• Example: consider the three variables: income (Y),
consumption (C) and investment (I).
• Some macroeconomists claim that the ratios C/Y
and I/Y are roughly stable in the long-run.
• Common to take logs, so
ln(C) – ln(Y) constant
and
ln(I) – ln(Y) constant
There are two separate tests for cointegration, which can
give different results. 13
More Practical Issues in Cointegration
Testing
• If ln(C), ln(Y) and ln(I) all contain unit roots,
reasoning above suggests that two cointegrating
relationships might occur.
• The variables in the model might form several
equilibrium relationships governing the joint
evolution of all the variables.
14
More Practical Issues in Cointegration
Testing
• [Note: Engle-Granger test (based on a cointegrating
regression involving all three variables), would only
find whether cointegration is/is not present (not tell
you how many cointegrating relationships)]
and
21
Differences Between the Two Test Statistics
• The Trace test is a joint test, the null hypothesis is
that the number of cointegrating vectors is less than
or equal to r, against a general alternative
hypothesis that there are more then r.
• trace = 0 when all the i = 0, so it is a joint test.
22
The Johansen Critical Values
▪ Johansen & Juselius (1990) provide critical values
for the 2 statistics. The distribution of the test
statistics is non-standard.
▪ The critical values depend on:
1. the value of n-r, the number of non-stationary
components
2. whether a constant and / or trend are included in
the regressions.
24
Interpretation of Johansen Test
Results
• But how does this correspond to a test of the rank of
the matrix?
• r is the rank of .
• cannot be of full rank (n) since this would
correspond to the original yt being stationary.
• If has zero rank, then by analogy to the univariate
case, yt depends only on yt-j and not on yt-1, so
that there is no long run relationship between the
elements of yt-1. Hence there is no cointegration.
• For 1 < rank () < n, there are multiple cointegrating
vectors.
25
Example
• Given the following model of stock prices (s) and income
(y);
st = 0 + 1 yt + ut ut i.i.d .(0, )
i.i.d − independen tly and identically distributed.
- variance - covariance matrix, indicating no heteroskedasticity.
Johansen ML Results (Trace Test)
Null Alternative Trace 5% CV
r=0 r1 40.3 20.2
r1 r=2 7.6 9.16
27
Stata Output – Johansen Test
28
Normalised Cointegrating Vector
(Long-run β Coefficients)
• The long-run coefficients are normalised, such that we express the
relationship in terms of one of the variables as a dependent variable:
29
The α Adjustment Coefficients
• These can be interpreted in exactly the same way as the
error correction term, asymptotic t-statistics are in
parentheses (interpreted in the same way as t-statistics):
Vector error-correction model
-ce1 = ECT
D_linvestment |
_ce1 |
L1. | -.0123537 .0071134 -1.74 0.082
D_lincome |
_ce1 |
L1. | .0025992 .0018129 1.43 0.152
D_lconsumption |
_ce1 |
L1. | .0047339 .0015379 3.08 0.002 30
Main Differences with the Bi-variate Test
for Cointegration
• Using the Johansen Maximum Likelihood (ML)
procedure, it is possible to obtain more than a single
cointegrating relationship, whereas only one can be
obtained with the Engle-Granger test.
• There are two separate tests (Trace & Max Eigenvalue)
for cointegration with the Johansen, but only one with the
Engle-Granger which can give different results.
• Given that the Johansen is a maximum likelihood based
test (Engle-Granger is OLS based), it requires a large
sample.
• The multivariate test is based on a VAR, not a single
OLS estimation as with the Engle-Granger approach.
31
Criticisms of the Johansen Approach
Multi-Equation ECM
• It is termed vector error-correction modeling
(VECM).
35
Single Equation Derivation
Dependent variable: Y
Independent variables: x and w Lag dependent variable – at least lag 1
(can not be 0), x and w are 0
Example: ARDL (1,0,0)
Yt = C + 1Yt −1 + 1xt + 2 wt + t (1a)
Note: Yt = Yt − Yt −1
Yt = Yt + Yt −1 ; xt = xt + xt −1 ; wt = wt + wt −1
ECM
Yt = C − (1 − 1 ) Yt −1 − 1 xt −1 − 2 wt −1 + 1xt + 2 wt + t
1 − 1 1 − 1 Equation
Lag 1 level variables
variables
Yt = 0 + 1 xt + 2 wt + vt
where
1 C
1 = 2 = 1 0 = Long-run
1 − 1 ; 1 − 1 ; 1 − 1 coefficients
Single Equation Derivation (with same lag = 1 for all variables)
Dependent variable: Y
Independent variables: x and w
Note: Yt = Yt − Yt −1
Yt = Yt + Yt −1 ; xt = xt + xt −1 ; wt = wt + wt −1
𝛽1 + 𝛽2 𝛽3 + 𝛽4
Δ𝑌𝑡 = 𝐶 − (1 − 𝛼1 ) 𝑌𝑡−1 − 𝑥𝑡−1 − 𝑤 + 𝛽1 Δ𝑥𝑡 + 𝛽2 Δ𝑤𝑡 + 𝜀𝑡
1 − 𝛼1 1 − 𝛼1 𝑡−1
Single Equation Derivation…..
𝛽1 + 𝛽2 𝛽3 + 𝛽4
Δ𝑌𝑡 = 𝐶 − (1 − 𝛼1 ) 𝑌𝑡−1 − 𝑥𝑡−1 − 𝑤 + 𝛽1 Δ𝑥𝑡 + 𝛽2 Δ𝑤𝑡 + 𝜀𝑡
1 − 𝛼1 1 − 𝛼1 𝑡−1 ECM
Equation
Lag 1 level variables
variables
Yt = 0 + 1 xt + 2 wt + vt
where
C
𝛼1 =
𝛽1 +𝛽2
; 𝛼2 =
𝛽3 +𝛽4
; 0 = Long-run
1−𝛼1 1−𝛼1 1 − 1 coefficients
Yt −1 − [ + 1 X t −1 + 2 Z t −1 ] = t −1
40
Vector Error-correction Modeling (VECM)
• Lag length selection: information criteria and the
requirement that the errors must be non-
autocorrelated.
44
Example: Result of Granger Causality within the VECM
Variable Investment Income Consumption ECTt-1
Note: ***, ** and * denote significant at 1%, 5% and 10% levels, respectively.
45
Example: Results of Vector Error-correction Modeling
46
Example: Results of Vector Error-correction Modeling
47
Example: Results of Vector Error-correction Modeling
48
Impulse Response Functions
• These trace out the effect on the dependent variables in the
VAR to shocks to all the variables in the VAR
• In a system of 2 variables, there are 4 impulse response
functions, and with 3 there are 9.
• The shock occurs through the error term and affects the
dependent variable over time.
• In effect the VAR is expressed as a vector moving average
model (VMA), as in the univariate case previously, the shocks
to the error terms can then be traced with regard to their
impact on the dependent variable.
• If the time path of the impulse response function becomes 0
over time, the system of equations is stable, however they
can explode if unstable.
An Impulse Response Function
Shock
1.2
0.8
0.6 Shock
y
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
Time
THEORETICAL UNDERPINNINGS
Variables to be Included? Focus? Well-specified Equation or System Dynamics. Motivation?
COINTEGRATION TESTS