I am trying to replicate Diebold and Yilmaz's (2009) paper: "Measuring financial asset return and volatility spillovers with application to global equity markets", Economic Journal, vol. 119 (534),pp.158-71. I have followed the thread between Tom, Fornari, and Vittorio23 and have been able to make some progress with a trivariate VAR. I have two issues however: 1) I have redone the total spillover calculations manually several times, but cannot figure out where the numbers come from except for "1.28534", which is the contribution of TOTMKEM to others.Any help is greatly appreciated here. The program is as follows:
- Code: Select all
CALENDAR(W) 1:1:1
CALENDAR(W) 1992:7:7
OPEN DATA "C:\Faruk_Portfolio_Paper\RATS_Estimation\eu_returns.RAT"
CALENDAR(W) 1992:7:7
DATA(FORMAT=RATS) 1992:07:07 2009:12:22 TOTMKEM OILGSEM BMATREM CHMCLEM BRESREM INDUSEM CNSTMEM CNSMGEM $
AUTMBEM FDBEVEM PERHHEM LEISGEM HLTHCEM CNSMSEM RTAILEM MEDIAEM TRLESEM TELCMEM UTILSEM FINANEM BANKSEM $
INSUREM RLESTEM FINSVEM TECNOEM RET_US RET_EURO RET_WORLD
SYSTEM(MODEL=TRY_EU3)
VARIABLES TOTMKEM OILGSEM BMATREM
LAGS 1 TO 2
DET
END(SYSTEM)
ESTIMATE
VAR/System - Estimation by Least Squares
Dependent Variable TOTMKEM
Weekly Data From 1992:07:21 To 2009:12:22
Usable Observations 910 Degrees of Freedom 904
Mean of Dependent Variable 0.1140293569
Std Error of Dependent Variable 2.5976835621
Standard Error of Estimate 2.5960254466
Sum of Squared Residuals 6092.3707001
Durbin-Watson Statistic 1.992337
Variable Coeff Std Error T-Stat Signif
********************************************************************************
1. TOTMKEM{1} -0.074910490 0.072687784 -1.03058 0.30301402
2. TOTMKEM{2} 0.089840343 0.072614305 1.23723 0.21632428
3. OILGSEM{1} -0.002457431 0.042866666 -0.05733 0.95429712
4. OILGSEM{2} -0.062322571 0.042833029 -1.45501 0.14601308
5. BMATREM{1} 0.119240253 0.063806961 1.86877 0.06197865
6. BMATREM{2} -0.032228698 0.063905766 -0.50432 0.61416226
F-Tests, Dependent Variable TOTMKEM
Variable F-Statistic Signif
TOTMKEM 1.3412 0.2620482
OILGSEM 1.0597 0.3469883
BMATREM 1.9105 0.1486013
Dependent Variable OILGSEM
Weekly Data From 1992:07:21 To 2009:12:22
Usable Observations 910 Degrees of Freedom 904
Mean of Dependent Variable 0.1455545275
Std Error of Dependent Variable 2.9834582297
Standard Error of Estimate 2.9546409051
Sum of Squared Residuals 7891.8322015
Durbin-Watson Statistic 2.010229
Variable Coeff Std Error T-Stat Signif
********************************************************************************
1. TOTMKEM{1} -0.086512104 0.082728888 -1.04573 0.29596511
2. TOTMKEM{2} 0.000312618 0.082645260 0.00378 0.99698272
3. OILGSEM{1} 0.000729918 0.048788275 0.01496 0.98806666
4. OILGSEM{2} -0.230581370 0.048749991 -4.72988 0.00000261
5. BMATREM{1} 0.079241871 0.072621267 1.09117 0.27549050
6. BMATREM{2} 0.169983639 0.072733721 2.33707 0.01965317
F-Tests, Dependent Variable OILGSEM
Variable F-Statistic Signif
TOTMKEM 0.5475 0.5785582
OILGSEM 11.1868 0.0000159
BMATREM 3.2369 0.0397396
Dependent Variable BMATREM
Weekly Data From 1992:07:21 To 2009:12:22
Usable Observations 910 Degrees of Freedom 904
Mean of Dependent Variable 0.1585033449
Std Error of Dependent Variable 2.9232421929
Standard Error of Estimate 2.9261173706
Sum of Squared Residuals 7740.1952315
Durbin-Watson Statistic 1.994100
Variable Coeff Std Error T-Stat Signif
********************************************************************************
1. TOTMKEM{1} -0.053323429 0.081930239 -0.65084 0.51531554
2. TOTMKEM{2} -0.002986781 0.081847418 -0.03649 0.97089807
3. OILGSEM{1} 0.029361498 0.048317283 0.60768 0.54355164
4. OILGSEM{2} -0.056989165 0.048279368 -1.18040 0.23815003
5. BMATREM{1} 0.077094671 0.071920195 1.07195 0.28402971
6. BMATREM{2} 0.073565327 0.072031564 1.02129 0.30738890
F-Tests, Dependent Variable BMATREM
Variable F-Statistic Signif
TOTMKEM 0.2119 0.8090858
OILGSEM 0.8857 0.4127765
BMATREM 1.0573 0.3478356
compute nvar=3
compute nsteps=10
impulse(factor=%identity(nvar),results=impulses,steps=nsteps,model=try_eu3)
Responses to Shock in TOTMKEM
Entry TOTMKEM OILGSEM BMATREM
1 1.0000000 0.0000000 0.0000000
2 -0.0749105 -0.0865121 -0.0533234
3 0.0893062 0.0025047 -0.0056434
4 -0.0069888 0.0026891 -0.0038924
5 0.0081019 -0.0012108 -0.0006731
6 -0.0013542 -0.0020390 -0.0009382
7 0.0008196 0.0002086 -0.0000647
8 -0.0000340 0.0002344 0.0000087
9 0.0000657 -0.0000550 -0.0000097
10 -0.0000239 -0.0000591 -0.0000185
Responses to Shock in OILGSEM
Entry TOTMKEM OILGSEM BMATREM
1 0.0000000 1.0000000 0.0000000
2 -0.0024574 0.0007299 0.0293615
3 -0.0586392 -0.2280416 -0.0545731
4 -0.0027668 0.0054040 -0.0056504
5 0.0102230 0.0430828 0.0090269
6 -0.0001986 -0.0023450 0.0007004
7 -0.0019534 -0.0083255 -0.0018260
8 0.0000548 0.0006779 -0.0000953
9 0.0003851 0.0015969 0.0003556
10 -0.0000246 -0.0001765 0.0000080
Responses to Shock in BMATREM
Entry TOTMKEM OILGSEM BMATREM
1 0.0000000 0.0000000 1.0000000
2 0.1192403 0.0792419 0.0770947
3 -0.0321630 0.1658349 0.0754773
4 0.0142911 0.0037549 0.0132025
5 -0.0151628 -0.0256060 -0.0034362
6 0.0014135 0.0024037 0.0005064
7 0.0002929 0.0052350 0.0012860
8 0.0000794 -0.0003873 0.0001333
9 -0.0003305 -0.0009850 -0.0002099
10 0.0000291 0.0001232 0.0000042
compute [vect] total=%zeros(nvar,1)
compute [vect] own =%zeros(nvar,1)
source forcedfactor.src
*
do i=1,nvar
@forcedfactor(force=row) %sigma %unitv(nvar,i) factor
do horizon=1,nsteps
compute ih=%xt(impulses,horizon)
compute [vect] ihi=%xrow(ih,i)
compute total(i)=total(i)+%qform(%sigma,ihi)
compute own(i) =own(i) +%dot(%xcol(factor,1),ihi)^2
end do i
end do horizon
disp 1-own./total
*
0.00687 0.01476 0.00225
dec rect gfactor(nvar,nvar)
ewise gfactor(i,j)=%sigma(i,j)/sqrt(%sigma(j,j))
errors(factor=gfactor,steps=nsteps,model=try_eu3,results=gevd)
disp %xt(gevd,nsteps)
Decomposition of Variance for Series TOTMKEM
Step Std Error TOTMKEM OILGSEM BMATREM
1 3.92557029 43.445 22.847 33.708
2 3.93210218 43.375 22.838 33.787
3 3.93286130 43.362 22.863 33.775
4 3.93294171 43.361 22.863 33.776
5 3.93296936 43.361 22.863 33.776
6 3.93296942 43.361 22.863 33.776
7 3.93297153 43.361 22.863 33.776
8 3.93297156 43.361 22.863 33.776
9 3.93297160 43.361 22.863 33.776
10 3.93297160 43.361 22.863 33.776
Decomposition of Variance for Series OILGSEM
Step Std Error TOTMKEM OILGSEM BMATREM
1 4.20576146 25.783 49.028 25.188
2 4.20595628 25.783 49.024 25.193
3 4.21848639 25.647 49.309 25.044
4 4.21877482 25.648 49.307 25.045
5 4.21945829 25.642 49.320 25.038
6 4.21946494 25.642 49.320 25.038
7 4.21948764 25.642 49.320 25.038
8 4.21948817 25.642 49.320 25.038
9 4.21948901 25.642 49.320 25.038
10 4.21948904 25.642 49.320 25.038
Decomposition of Variance for Series BMATREM
Step Std Error TOTMKEM OILGSEM BMATREM
1 4.41303287 33.887 22.438 43.675
2 4.42029770 33.852 22.476 43.672
3 4.42172243 33.851 22.462 43.687
4 4.42177508 33.851 22.462 43.687
5 4.42182721 33.850 22.463 43.687
6 4.42182751 33.850 22.463 43.687
7 4.42182848 33.850 22.463 43.687
8 4.42182849 33.850 22.463 43.687
9 4.42182853 33.850 22.463 43.687
10 4.42182853 33.850 22.463 43.687
0.43361 0.22863 0.33776
0.25642 0.49320 0.25038
0.33850 0.22463 0.43687
*
*
compute gfactor=%sigma*inv(%diag(%sqrt(%xdiag(%sigma))))
compute cfactor=%decomp(%sigma)
errors(model=try_eu3,steps=nsteps,factor=gfactor,stderrs=gstderrs,noprint,results=gfevd)
errors(model=try_eu3,steps=nsteps,factor=cfactor,stderrs=cstderrs,print)
compute gfevdx=%diag((%xt(gstderrs,nsteps)./%xt(cstderrs,nsteps)).^2)*%xt(gfevd,nsteps)
Decomposition of Variance for Series TOTMKEM
Step Std Error TOTMKEM OILGSEM BMATREM
1 2.58745297 100.000 0.000 0.000
2 2.59483163 99.603 0.018 0.380
3 2.59852409 99.328 0.266 0.406
4 2.59862601 99.323 0.266 0.411
5 2.59875590 99.313 0.270 0.417
6 2.59875661 99.313 0.270 0.418
7 2.59875984 99.313 0.270 0.418
8 2.59875985 99.313 0.270 0.418
9 2.59875998 99.313 0.270 0.418
10 2.59875998 99.313 0.270 0.418
Decomposition of Variance for Series OILGSEM
Step Std Error TOTMKEM OILGSEM BMATREM
1 2.94488422 52.589 47.411 0.000
2 2.94698893 52.518 47.352 0.130
3 2.98383884 51.262 48.056 0.682
4 2.98400075 51.265 48.053 0.682
5 2.98533039 51.226 48.080 0.695
6 2.98533758 51.226 48.080 0.695
7 2.98538669 51.224 48.081 0.695
8 2.98538719 51.224 48.081 0.695
9 2.98538899 51.224 48.081 0.695
10 2.98538902 51.224 48.081 0.695
Decomposition of Variance for Series BMATREM
Step Std Error TOTMKEM OILGSEM BMATREM
1 2.91645488 77.587 1.283 21.130
2 2.92210409 77.464 1.363 21.173
3 2.92578482 77.315 1.445 21.239
4 2.92587066 77.313 1.446 21.242
5 2.92593762 77.310 1.449 21.241
6 2.92593816 77.310 1.449 21.241
7 2.92594060 77.310 1.449 21.241
8 2.92594061 77.310 1.449 21.241
9 2.92594071 77.310 1.449 21.241
10 2.92594071 77.310 1.449 21.241
*
dec vect tovar(%nvar) fromvar(%nvar)
ewise tovar(i)=%sum(%xrow(gfevdx,i))-gfevdx(i,i)
ewise fromvar(i)=%sum(%xcol(gfevdx,i))-gfevdx(i,i)
disp tovar fromvar
1.29726 1.01240 1.28613 1.28534 1.03669 1.27376
end
2) What is the simplest way to estimate the models using 200-week rolling samples and obtain the GFEV each time?
Thanks,
