You are on page 1of 18

Applied Financial Econometrics

Example from Topic 5


Hurn, Martin, Phillips & Yu (2020) Chapters 5 & 6

Semester 2, 2023/24

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 1 / 18


Testing for cointegration

Testing for cointegration

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 2 / 18


Testing for cointegration

The model

The Gordon equity model, is represented by two long-run equations involving the
variables log equity prices pt , log dividends dt , and log earnings et , according to
the specification
pt = β10 + β1d dt + u1t
pt = β20 + β2e et + u2t ,
where u1t and u2t are disturbance terms representing the pricing errors for the two
models.

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 3 / 18


Testing for cointegration

The data and log variables

. // =============================================================================
. // pv.dta - monthly data for the period January 1871 to December 2013 on the
. // U.S. S&P Composite prices, dividends, earnings and CPI.
. // =============================================================================
. // Load data
. clear *

. set more off


. use "$data/pv.dta", clear

. // Set time
. format datevec %tm
. tsset datevec
Time variable: datevec, 1871m1 to 2016m9
Delta: 1 month

. // create required variables


. generate p = log(price)
. label var p "log price"

. generate d = log(dividend)
. label var d "log dividend"

. generate e = log(earnings)
. label var e "log earnings"

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 4 / 18


Testing for cointegration

Estimating VAR(2), p equation

Estimate a VAR (with an intercept) containing pt , dt , and et with two lags of each
variable on the right-hand side (k = 2).
. var p d e, lag(1/2)
------------------------------------------------------------------------------
| Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
p |
p |
L1. | 1.275564 .0230934 55.23 0.000 1.230302 1.320826
L2. | -.2837923 .0232177 -12.22 0.000 -.3292982 -.2382863
|
d |
L1. | .0752838 .0984207 0.76 0.444 -.1176173 .2681849
L2. | -.0683459 .0959769 -0.71 0.476 -.2564572 .1197654
|
e |
L1. | .0525253 .0257403 2.04 0.041 .0020753 .1029754
L2. | -.0494052 .026081 -1.89 0.058 -.100523 .0017125
|
_cons | .0262118 .0102029 2.57 0.010 .0062146 .0462091
-------------+----------------------------------------------------------------

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 5 / 18


Testing for cointegration

Estimating VAR(2), d equation

-------------+----------------------------------------------------------------
d |
p |
L1. | .0005638 .0029614 0.19 0.849 -.0052405 .006368
L2. | .0012555 .0029773 0.42 0.673 -.00458 .007091
|
d |
L1. | 1.826127 .0126211 144.69 0.000 1.80139 1.850864
L2. | -.8325296 .0123077 -67.64 0.000 -.8566523 -.808407
|
e |
L1. | .0121094 .0033008 3.67 0.000 .0056399 .0185789
L2. | -.0082019 .0033445 -2.45 0.014 -.014757 -.0016467
|
_cons | -.0072342 .0013084 -5.53 0.000 -.0097986 -.0046698
-------------+----------------------------------------------------------------

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 6 / 18


Testing for cointegration

Estimating VAR(2), e equation

-------------+----------------------------------------------------------------
e |
p |
L1. | .0504746 .0135636 3.72 0.000 .0238905 .0770587
L2. | -.0457205 .0136366 -3.35 0.001 -.0724477 -.0189933
|
d |
L1. | .1896438 .0578059 3.28 0.001 .0763464 .3029413
L2. | -.1759143 .0563706 -3.12 0.002 -.2863986 -.06543
|
e |
L1. | 1.771491 .0151182 117.18 0.000 1.74186 1.801122
L2. | -.7890985 .0153183 -51.51 0.000 -.8191218 -.7590753
|
_cons | -.0060602 .0059925 -1.01 0.312 -.0178052 .0056849
------------------------------------------------------------------------------

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 7 / 18


Testing for cointegration

Johansen’s rank test

Test for cointegration between γt = (pt , dt , et ) by specifying the VECM


k −1
 X
∆yt = δ + α β ′ yt−1 − β0 + Γj ∆yt−i + vt
j=1

where the number of lags in the VECM is equal to k − 1, where k is the lag length
selected for the VAR.

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 8 / 18


Testing for cointegration

Johansen’s rank test

. vecrank p d e, lag(2) trend(constant) levela // r=2

Johansen tests for cointegration


Trend: Constant Number of obs = 1,747
Sample: 1871m3 thru 2016m9 Number of lags = 2
-------------------------------------------------------------------------------
Maximum Trace ----Critical value----
rank Params LL Eigenvalue statistic 5% 1%
0 12 14040.778 145.6367 29.68 35.65
1 17 14099.208 0.06470 28.7756 15.41 20.04
2 20 14113.008 0.01567 1.1765*1*5 3.76 6.65
3 21 14113.596 0.00067
-------------------------------------------------------------------------------
* selected rank

The matrix containing α and β from different equations has rank 2.

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 9 / 18


Testing for cointegration

Notes on the rank test

The rank of a matrix is the maximum number of linearly independent


rows/columns that the matrix contains.
In an m-dimensional VECM, we examine the rank of the m × m matrix that
contains the cointegrating parameters. A reduced rank indicates
cointegration, a full rank indicates stationarity, a null rank indicates the
absence of cointegration.

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 10 / 18


Testing for cointegration

Notes on the rank test

To determine the cointegrating rank, we use the Johansen procedure, which


involves finding eigenvalues of residual vectors from auxiliary regressions,
and then using the eigenvalues to construct the trace statistic. The statistic
has a nonstandard distribution, and so Johansen and other authors derived
the corresponding critical values.
See the pdf entry for help vecrank for more details.

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 11 / 18


Testing for cointegration

Notes on the rank test

For vec models in Stata, write the VECM as


p−1
X
∆yt = α (βyt−1 + µ + ρt) + Γi ∆yt−i + γ + τ t + ϵt
i=1

Five different trend specifications are available:


Option in trend() Parameter restrictions
trend none
rtrend τ =0
constant ρ = 0, and τ = 0
rconstant ρ = 0, γ = 0 and τ = 0
none µ = 0, ρ = 0, γ = 0, and τ = 0
See the pdf entry for help vec for more details.

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 12 / 18


Testing for cointegration

Estimating VECM

Given the rank test, estimate the VECM.


. vec p d e, lag(2) trend(constant) rank(2)

Vector error-correction model

Sample: 1871m3 thru 2016m9 Number of obs = 1,747


AIC = -16.13395
Log likelihood = 14113.01 HQIC = -16.11082
Det(Sigma_ml) = 1.93e-11 SBIC = -16.07138

Equation Parms RMSE R-sq chi2 P>chi2


----------------------------------------------------------------
D_p 6 .038957 0.0933 179.0665 0.0000
D_d 6 .004994 0.8167 7756.002 0.0000
D_e 6 .022877 0.6265 2920.574 0.0000
----------------------------------------------------------------

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 13 / 18


Testing for cointegration

Estimating VECM, ∆p equation

------------------------------------------------------------------------------
| Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
D_p |
_ce1 |
L1. | -.0082193 .003278 -2.51 0.012 -.0146441 -.0017945
|
_ce2 |
L1. | .0060697 .0056332 1.08 0.281 -.0049713 .0171106
|
p |
LD. | .2845076 .0232514 12.24 0.000 .2389356 .3300795
|
d |
LD. | .076789 .0957525 0.80 0.423 -.1108825 .2644606
|
e |
LD. | .0488287 .0261255 1.87 0.062 -.0023764 .1000337
|
_cons | .0004163 .0012744 0.33 0.744 -.0020815 .002914
-------------+----------------------------------------------------------------

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 14 / 18


Testing for cointegration

Estimating VECM, ∆d equation

-------------+----------------------------------------------------------------
D_d |
_ce1 |
L1. | .0018196 .0004203 4.33 0.000 .0009959 .0026433
|
_ce2 |
L1. | -.0064354 .0007222 -8.91 0.000 -.0078509 -.0050199
|
p |
LD. | -.0012285 .002981 -0.41 0.680 -.0070711 .0046141
|
d |
LD. | .8328484 .012276 67.84 0.000 .8087878 .856909
|
e |
LD. | .0081801 .0033494 2.44 0.015 .0016153 .0147449
|
_cons | .0010536 .0001634 6.45 0.000 .0007334 .0013739
-------------+----------------------------------------------------------------

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 15 / 18


Testing for cointegration

Estimating VECM, ∆e equation

-------------+----------------------------------------------------------------
D_e |
_ce1 |
L1. | .0047569 .0019249 2.47 0.013 .0009841 .0085297
|
_ce2 |
L1. | .0134522 .003308 4.07 0.000 .0069687 .0199358
|
p |
LD. | .0459489 .0136539 3.37 0.001 .0191878 .0727101
|
d |
LD. | .1786106 .0562286 3.18 0.001 .0684046 .2888165
|
e |
LD. | .7889144 .0153416 51.42 0.000 .7588454 .8189835
|
_cons | .0003162 .0007484 0.42 0.673 -.0011505 .001783
------------------------------------------------------------------------------

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 16 / 18


Testing for cointegration

Estimating VECM, cointegrating equations

Cointegrating equations

Equation Parms chi2 P>chi2


-------------------------------------------
_ce1 1 975.7159 0.0000
_ce2 1 6894.455 0.0000
-------------------------------------------

Identification: beta is exactly identified

Johansen normalization restrictions imposed


------------------------------------------------------------------------------
beta | Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
_ce1 |
p | 1 . . . . .
d | 0 (omitted)
e | -1.089986 .0348947 -31.24 0.000 -1.158378 -1.021594
_cons | -2.767717 . . . . .
-------------+----------------------------------------------------------------
_ce2 |
p | 1.39e-17 . . . . .
d | 1 . . . . .
e | -.9169848 .0110436 -83.03 0.000 -.93863 -.8953397
_cons | .5051605 . . . . .
------------------------------------------------------------------------------

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 17 / 18


Testing for cointegration

Cointegrating equations

Write out the estimated long-run cointegrating equation(s).

û2t−1 = pt−1 − 1.09et−1 − 2.77


û3t−1 = dt−1 − 0.92et−1 + 0.51

Or equivalently

pt−1 = 2.77 + 1.09et−1 + û2t−1


dt−1 = −0.51 + 0.92et−1 + û3t−1

Applied Financial Econometrics Topic 5 example Semester 2, 2023/24 18 / 18

You might also like