Please help with Diebold and Yilmaz (2009)

Questions and discussions on Vector Autoregressions

Please help with Diebold and Yilmaz (2009)

Postby jeanlouir » Sat Mar 12, 2011 10:45 pm

Hi,

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,
jeanlouir
 
Posts: 7
Joined: Sat Feb 19, 2011 2:22 am

Re: Please help with Diebold and Yilmaz (2009)

Postby TomDoan » Sun Mar 13, 2011 12:40 pm

jeanlouir wrote:Hi,

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




I'm not sure what you're doing to calculate this manually, but without the PRINT option on the first of the two ERRORS instructions in that last batch, it wouldn't be easy. The first of those is the FEVD on the generalized "factor". The decomposition there uses the desired numerator, but the wrong denominator. The second ERRORS computes the correct denominators (the actual forecast error variances). The compute gfevdx instruction rescales the original decomposition to use the proper denominator.

BTW, you're copying some incorrect code from early in that thread. The segment with the use of FORCEDFACTOR wasn't right.

jeanlouir wrote:2) What is the simplest way to estimate the models using 200-week rolling samples and obtain the GFEV each time?

Thanks,


That's in the thread. All you need is to put an ESTIMATE(NOPRINT) instruction which has the proper rolling interval inside the DO TIME loop in the following, followed by the calculation for the GFEVD. This would then save the information in a SERIES[RECT].

Code: Select all
dec series[rect] fevdhist
gset fevdhist start end = %zeros(n,n)
do time=start,end
   ...calculations for GFEVD...
   compute fevdhist(time)=%xt(gevd,nsteps)
end do time


n is the number of variables in the model, nsteps is the total number of steps being computed for the GFEVD.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: Please help with Diebold and Yilmaz (2009)

Postby jeanlouir » Tue Mar 15, 2011 3:34 am

Hi Tom,

Thanks for the prompt reply. What I meant by manual calculation was that, using step 10 of the gfevd displayed, when I summed the contributions of TOTMKEM to OILGSEM AND BMATREM, I find 1.28534 (=0.51222+0.77310=the total spillovers of TOTMKEM), which corresponds to one of the values of "fromvar". I repeated the same for process for all other cases, but could not find any similarity with values for either "tovar" or "fromvar". I should have been able to verify the numbers displayed by tovar and fromvar. I do not know whether you want to take a closer look at this set of commands again
Code: Select all
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)


Anyhow, I have managed to put the following programs together following you suggestions. I may have stumbled somewhere, can you please take a closer look at them for me and suggest any necessary corrections? I would really be thankful.
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

compute nvar=3
compute nsteps=10
*impulse(factor=%identity(nvar),results=impulses,steps=nsteps,model=try_eu3)

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)

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)
print tovar fromvar
end
******************************************************************************************
******************************************************************************************
* 200-week rolling window estimation


SYSTEM(MODEL=TRY_EU3)
VARIABLES TOTMKEM OILGSEM BMATREM
LAGS 1 TO 2
DET
END(SYSTEM)

compute nvar=3
compute nsteps=10

dec series[rect] fevdhist
gset fevdhist start end = %zeros(n,n)

do time=1992:07:07,2009:12:22
ESTIMATE(NOPRINT) time time+199  *end-200 2009:12:22 (would not this work better?)

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)
    compute fevdhist(time)=%xt(gevd,nsteps)    *Do you mean gfevd instead?

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)
print tovar fromvar   *This gives me only the sum of the rows (columns) minus own variance

print gfevdx tovar fromvar   */would not this give me the info needed after each estimation to build
            a table similar to TABLE 3 in D&Y(199)*/
               
end do time

end
jeanlouir
 
Posts: 7
Joined: Sat Feb 19, 2011 2:22 am

Re: Please help with Diebold and Yilmaz (2009)

Postby TomDoan » Tue Mar 15, 2011 4:36 am

This is how the calculations work:

Output for TOTMKEM from the GFEVD calculation

Decomposition of Variance for Series TOTMKEM
Step Std Error TOTMKEM OILGSEM BMATREM
10 3.93297160 43.361 22.863 33.776

Output for TOTMKEM for the standard calculation

Decomposition of Variance for Series TOTMKEM
Step Std Error TOTMKEM OILGSEM BMATREM
10 2.59875998 99.313 0.270 0.418

The spillover from OILGSEM to TOTMKEM (in percentages, not fractions) is 22.863*3.93297160^2/2.59875998^2
The spillover from BMATREM to TOTMKEN is 33.776*3.932797160^2/2.59875998^2

The total spillover to TOTMKEM is the sum of those two.

You do a similar calculation with the other two variables as targets and add the spillovers sourced to a particular variable to get the spillover froms.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: Please help with Diebold and Yilmaz (2009)

Postby jeanlouir » Tue Mar 15, 2011 9:46 pm

Hi Tom,

Thanks for clarifying the calculations for me. Well, I do not want to monopolize your time too much because I know that there are so many people in need of help from you. Can you please confirm that the last codes for the 200-week rolling estimation that I attached are correct?

Thanks again,
jeanlouir
 
Posts: 7
Joined: Sat Feb 19, 2011 2:22 am

Re: Please help with Diebold and Yilmaz (2009)

Postby TomDoan » Wed Mar 16, 2011 1:50 pm

Programs for the analysis in the paper (including the rolling window calculations) are now posted at:

http://www.estima.com/forum/viewtopic.php?f=4&t=986
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: Please help with Diebold and Yilmaz (2009)

Postby jeanlouir » Sat Mar 19, 2011 6:02 pm

Hi Tom,

Thanks for the files. It seems that %size is not defined in RATS 7.3 because when I tried to run the returns.prg file with my own data, I get the following error:
## SX11. Identifier %SIZE is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>] longlabels(%size(<<<<

Can you please help in bypassing this problem? If %size is usable with version 8 only, I am in deep trouble because the university is now on strike and I do not know when they will get back to work.

I can purchase the newest version with my credit card and get a refund from the University later, but as you know I do not have any serial number, is there something that Estima can do to make this possible?

Thanks,
jeanlouir
 
Posts: 7
Joined: Sat Feb 19, 2011 2:22 am

Re: Please help with Diebold and Yilmaz (2009)

Postby TomDoan » Sun Mar 20, 2011 4:46 pm

You can use %ROWS in place of %SIZE.

Your university already has version 8; you'll just have to ask someone to get it installed.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: Please help with Diebold and Yilmaz (2009)

Postby jeanlouir » Tue Mar 22, 2011 10:45 pm

Hi Tom,

I am now getting the following error:
## MAT14. Non-invertible Matrix. Using Generalized Inverse for SYMMETRIC.
I changed the number of lags and I still get the same message. As you can see from the thread, I did not have that problem before. Is there a procedure or a command in the codes that is not compatible with version 7.3? I will be sending both the data and the program via support@estima.com for you to try it.

Thanks

Code: Select all
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
*
dec vect[int] returns
enter(varying) returns
# 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
dec vect[string] longlabels(%rows(returns))
enter longlabels
# "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"
dec vect[string] shortlabels(%rows(returns))
enter shortlabels
# "TOTMK" "OILGS" "BMATR" "CHMCL" "BRESR" "INDUS" "CNSTM" "CNSMG" $
 "AUTMB" "FDBEV" "PERHH" "LEISG" "HLTHC" "CNSMS" "RETAIL" "MEDIA" "TRLES" "TELCM" "UTILS" "FINAN" "BANKS" $
 "INSUR" "RLEST" "FINSV" "TECNO" "US" "EURO" "WORLD"
*
* Setup and estimate two lag VAR
*
system(model=returnvar)
variables returns
lags 1 2
det constant
end(system)
*
estimate(noprint)
*
* Save the full estimation range for later use
*
compute rstart=%regstart(),rend=%regend()
*
* Analyze the 10 step responses
*
compute nsteps=10
*
* By using the first of these two definitions of GFACTOR, you get the
* generalized spillover index proposed by the authors in related work.
* Using the second gives the results in this paper. To compute the
* generalized spillovers, just comment out the second line.
*
compute gfactor=%sigma*inv(%diag(%sqrt(%xdiag(%sigma))))
*compute gfactor=%decomp(%sigma)
compute cfactor=%decomp(%sigma)
*
* The use of the two ERRORS instructions allows for either type of
* calculation (generalized or Choleski). If you use the Choleski factor,
* the gstderrs and cstderrs are identical, so GFEVDX is the same as
* GFEVD.
*
errors(model=returnvar,steps=nsteps,factor=gfactor,stderrs=gstderrs,noprint,results=gfevd)
errors(model=returnvar,steps=nsteps,factor=cfactor,stderrs=cstderrs,noprint)
compute gfevdx=%diag((%xt(gstderrs,nsteps)./%xt(cstderrs,nsteps)).^2)*%xt(gfevd,nsteps)
*
* These are for computing the contributions from others, to others and
* to others including own for each variable.
*
dec vect tovar(%nvar) fromvar(%nvar) tototal(%nvar)
ewise fromvar(i)=%sum(%xrow(gfevdx,i))-gfevdx(i,i)
ewise tovar(i)=%sum(%xcol(gfevdx,i))-gfevdx(i,i)
ewise tototal(i)=tovar(i)+1-fromvar(i)
compute spillover=100.0*%sum(tovar)/%nvar
*
report(action=define,title="Table 3. Spillover Table for Global Market Returns")
report(atrow=1,atcol=2,align=center,fillby=rows) shortlabels
report(atrow=2,atcol=1,fillby=cols) shortlabels
report(atrow=2,atcol=2) 100.0*gfevdx
report(atrow=%nvar+2,atcol=1,fillby=rows) "Contribution to others" 100.0*tovar
report(atrow=%nvar+3,atcol=1,fillby=rows) "Contribution including own" 100.0*tototal
report(atcol=%nvar+2,atrow=1) "From Others"
report(atcol=%nvar+2,atrow=2,fillby=cols) 100.0*fromvar
report(atrow=%nvar+2,atcol=%nvar+2,fillby=cols) 100.0*%sum(tovar)
report(atrow=%nvar+3,atcol=%nvar+2,align=right) %strval(spillover,"##.#")+"%"
report(atrow=2,atcol=2,torow=%nvar+1,tocol=%nvar+1,action=format,picture="*.#")
report(atrow=%nvar+2,torow=%nvar+3,atcol=1,tocol=%nvar+2,action=format,picture="###")
report(atcol=%nvar+2,atrow=2,torow=%nvar+2,action=format,picture="###")
report(action=show)
*
* Rolling window analysis
*
compute nspan=200
set spillreturns rstart+nspan-1 rend = 0.0
do end=rstart+nspan-1,rend
   estimate(noprint) end-nspan+1 end
   compute gfactor=%sigma*inv(%diag(%sqrt(%xdiag(%sigma))))
   compute gfactor=%decomp(%sigma)
   compute cfactor=%decomp(%sigma)
   errors(model=returnvar,steps=nsteps,factor=gfactor,stderrs=gstderrs,noprint,results=gfevd)
   errors(model=returnvar,steps=nsteps,factor=cfactor,stderrs=cstderrs,noprint)
   compute gfevdx=%diag((%xt(gstderrs,nsteps)./%xt(cstderrs,nsteps)).^2)*%xt(gfevd,nsteps)
   ewise tovar(i)=%sum(%xcol(gfevdx,i))-gfevdx(i,i)
   compute spillreturns(end)=100.0*%sum(tovar)/%nvar
end do end
graph(footer="Spillover plot. Returns. 200 week window. 10 step horizon")
# spillreturns





jeanlouir
 
Posts: 7
Joined: Sat Feb 19, 2011 2:22 am

Re: Please help with Diebold and Yilmaz (2009)

Postby jeanlouir » Tue Mar 22, 2011 11:20 pm

Hi Tom,

I commented out the first GFACTOR as opposed to the second one that is specified in the notes, the program runs. However, I now get this message at the end of Table 3.
## MAT14. Non-invertible Matrix. Using Generalized Inverse for SYMMETRIC.
The Error Occurred At Location 0096 of loop/block
Line 3 of loop/block

I hope this helps in further sorting out the problem.

Thanks again,
jeanlouir
 
Posts: 7
Joined: Sat Feb 19, 2011 2:22 am

Re: Please help with Diebold and Yilmaz (2009)

Postby TomDoan » Wed Mar 23, 2011 9:03 am

I don't know what your TOTMKEM variable is supposed to be, but on your data file it's the lag of RET_EURO so the VAR has a perfect fit for it, hence the non-invertible matrix.

Code: Select all
   ENTRY         TOTMKEM        RET_EURO
 1992:07:07   -0.97373855892   2.26926865512
 1992:07:14    2.26926865512  -6.18099486720
 1992:07:21   -6.18099486720   0.30048099531
 1992:07:28    0.30048099531   0.72680034074
 1992:08:04    0.72680034074  -2.59686278708
 1992:08:11   -2.59686278708   0.65319257598
 1992:08:18    0.65319257598   0.83359806762
 1992:08:25    0.83359806762   1.00763124757
 1992:09:01    1.00763124757  -0.84399741221
 1992:09:08   -0.84399741221  -3.92876188512
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: Please help with Diebold and Yilmaz (2009)

Postby jeanlouir » Fri Mar 25, 2011 7:55 pm

Hi Tom,

Thanks for the clarification. I removed the RET_EURO variable and ran the program, the output obtained when the second GFACTOR command is commented out just does not make sense. It shows spillovers that are negative and contribution from others fo each variable that is greater than 100. I think something is not working there. However, when I commented out the first GFACTOR instead, everything works fine. I am attaching the table for the case that does not work:


    Second line of GFactor from the Program file commented out.

    TOTMK OILGS BMATR CHMCL BRESR INDUS CNSTM CNSMG AUTMB FDBEV PERHH LEISG HLTHC CNSMS RETAIL MEDIA TRLES TELCM UTILS FINAN BANKS INSUR RLEST FINSV TECNO US WORLD From Others
    TOTMK 17.6 2.4 6.5 5.9 1.6 10.6 7.6 6.6 5.5 3.8 7.3 4.1 4.6 9.8 5.8 5.6 4.3 6.0 5.4 10.3 8.2 7.7 3.1 7.2 3.2 45.5 70.1 259
    OILGS 5.7 49.2 6.5 6.0 3.2 1.1 3.1 1.9 1.4 4.4 3.4 1.8 4.8 0.5 1.2 0.3 0.1 1.0 6.0 3.5 3.4 2.1 1.6 2.1 1.1 24.8 40.4 131
    BMATR 11.5 4.4 31.3 22.4 18.8 10.5 16.1 7.2 5.9 5.2 8.5 5.2 4.3 5.3 5.5 0.9 3.9 0.6 4.4 6.6 5.9 3.9 5.8 6.3 0.2 36.6 57.4 263
    CHMCL 14.4 5.2 30.1 42.4 7.7 11.5 9.8 10.7 8.1 6.6 10.7 5.2 7.8 6.0 6.8 1.2 3.5 0.9 4.7 9.3 7.9 6.5 3.5 5.0 0.2 32.8 48.2 265
    BRESR 4.0 2.8 24.9 7.5 41.8 5.4 10.2 3.6 3.4 2.7 3.5 3.9 1.0 1.6 2.4 0.1 2.2 0.6 1.4 2.8 2.8 1.5 5.2 3.2 0.0 28.6 46.6 172
    INDUS 13.8 0.7 7.8 6.3 2.9 23.0 9.1 5.8 5.0 2.3 5.9 4.1 2.5 9.8 5.5 5.1 4.9 2.9 2.2 5.8 4.5 4.4 2.2 4.3 4.3 42.2 65.4 230
    CNSTM 13.1 2.1 16.8 7.6 7.9 12.6 33.2 6.7 5.5 4.4 9.7 5.4 3.5 8.8 7.0 2.1 7.0 1.2 4.5 8.1 7.3 4.1 8.5 10.3 0.6 32.3 54.5 251
    CNSMG 13.2 1.6 8.7 9.4 3.0 8.7 8.0 37.6 31.9 5.8 14.0 12.0 4.7 7.4 8.1 1.9 5.6 2.2 2.1 7.2 5.1 6.2 2.3 6.1 0.8 33.2 48.5 258
    AUTMB 9.9 1.3 7.6 7.7 2.9 6.8 6.8 36.4 45.5 3.4 7.4 7.8 2.3 4.1 4.6 1.0 3.5 1.5 1.7 5.2 4.0 4.9 2.5 4.1 0.4 24.1 33.7 196
    FDBEV 11.5 5.8 9.4 8.7 3.7 5.2 8.2 8.5 4.4 55.6 17.9 5.5 26.8 4.8 8.3 1.1 1.6 1.9 11.3 8.7 6.3 5.7 10.9 10.3 1.7 19.1 32.5 240
    PERHH 15.5 2.8 10.2 9.6 3.0 9.7 11.1 14.0 7.2 11.9 38.2 15.9 14.5 9.1 10.8 2.4 5.9 2.2 6.4 10.0 7.8 6.9 5.5 9.1 0.9 32.6 51.2 286
    LEISG 8.8 1.5 6.3 4.7 3.4 6.7 6.3 11.1 5.0 3.7 16.2 38.7 4.0 6.9 6.8 2.5 4.2 1.3 1.7 7.2 7.4 3.8 2.4 4.5 1.1 30.2 48.3 206
    HLTHC 14.0 5.9 6.8 9.4 1.0 5.8 5.5 6.6 3.2 24.3 18.9 5.2 50.4 5.8 6.6 2.7 3.2 3.7 10.3 8.1 5.4 7.0 5.0 8.1 3.0 22.3 36.0 234
    CNSMS 17.1 0.4 5.5 4.7 1.3 13.2 8.4 6.8 4.6 3.0 7.6 5.4 3.4 31.1 14.8 21.6 11.5 7.1 3.2 7.0 4.9 5.5 3.4 7.1 4.1 35.1 56.3 263
    RETAIL 13.3 0.8 7.8 7.2 2.5 10.1 8.9 9.5 5.4 6.8 12.8 7.9 5.8 20.1 45.2 4.6 6.3 1.8 4.4 7.5 5.7 6.0 5.2 6.2 0.9 26.4 42.5 236
    MEDIA 13.3 0.4 1.7 1.5 0.7 9.4 3.0 3.2 2.5 1.1 2.4 2.9 1.3 30.1 5.2 44.5 5.4 12.2 1.8 3.4 2.1 3.4 0.8 3.5 7.0 27.2 43.1 189
    TRLES 11.3 0.2 5.9 3.8 2.4 10.0 11.2 7.2 4.7 1.6 7.3 4.7 2.7 18.5 6.7 6.2 49.2 2.8 1.0 5.7 4.6 3.8 3.2 7.5 2.9 27.3 40.7 204
    TELCM 18.2 0.5 0.8 0.7 0.7 6.7 2.2 2.9 1.9 0.2 1.6 1.0 0.9 11.8 2.5 14.2 3.1 55.4 3.4 3.3 1.9 3.3 0.2 4.6 9.1 21.3 34.0 151
    UTILS 13.7 7.8 6.9 5.6 1.5 4.0 6.7 2.8 2.1 10.2 7.8 1.8 9.5 4.4 4.8 1.5 0.6 3.6 50.2 7.0 5.7 4.5 10.5 9.6 0.8 19.8 37.0 190
    FINAN 14.6 1.7 5.1 5.2 1.3 6.4 7.1 5.7 5.1 4.6 7.5 4.4 3.9 5.6 5.2 2.0 3.5 1.6 4.6 25.8 22.8 19.0 4.7 9.8 0.4 40.4 61.2 253
    BANKS 12.6 1.7 4.6 4.6 1.1 5.4 7.1 4.6 4.5 3.8 6.5 4.6 2.7 4.1 4.2 1.0 3.0 0.9 4.0 25.8 29.8 12.3 4.4 8.8 0.2 38.2 57.2 228
    INSUR 15.0 1.6 4.6 5.4 1.2 6.8 4.9 6.2 5.4 4.2 6.9 3.5 4.7 6.0 5.2 3.0 3.1 2.1 4.1 25.1 14.4 33.7 2.2 6.5 0.6 36.8 54.7 234
    RLEST 8.1 2.2 9.1 4.0 5.8 4.5 14.3 3.3 2.9 9.5 7.9 2.9 4.7 5.8 7.0 0.8 3.1 0.3 10.6 8.2 6.6 3.1 48.4 20.8 0.4 18.0 36.0 200
    FINSV 13.5 2.2 6.8 3.8 2.5 6.1 11.9 6.3 5.0 6.5 8.6 4.1 5.3 8.1 5.7 2.6 5.3 2.6 7.1 12.6 10.1 6.1 14.8 33.7 0.2 31.2 52.8 242
    TECNO 7.1 0.9 0.7 0.3 0.5 7.7 1.1 1.4 1.7 1.1 0.9 1.2 0.2 5.4 1.7 6.6 2.3 7.3 0.7 0.5 0.4 0.7 0.4 0.4 41.5 38.1 48.7 138
    US 0.5 1.3 1.0 0.7 0.5 0.7 1.4 1.6 3.8 0.6 1.4 1.4 0.1 0.9 0.9 0.8 0.5 1.0 0.7 0.4 0.7 0.2 0.7 0.2 0.4 83.8 66.0 88
    WORLD 0.4 1.1 0.7 0.5 0.2 0.6 1.3 1.1 2.6 0.4 1.4 0.8 0.2 0.6 1.0 0.5 0.4 0.6 0.8 0.4 0.7 0.1 0.6 0.3 0.2 69.8 87.6 87
    Contribution to others 294 59 203 153 81 186 191 182 139 132 204 123 126 201 144 93 98 70 108 200 157 132 109 166 45 834 1263 5694
    Contribution including own 136 28 39 -11 9 57 40 24 43 -8 18 17 -7 38 8 4 -6 19 18 46 29 -2 10 24 7 846 1276 210.9%



Thanks
jeanlouir
 
Posts: 7
Joined: Sat Feb 19, 2011 2:22 am

Re: Please help with Diebold and Yilmaz (2009)

Postby TomDoan » Mon Mar 28, 2011 4:25 pm

jeanlouir wrote:Hi Tom,

Thanks for the clarification. I removed the RET_EURO variable and ran the program, the output obtained when the second GFACTOR command is commented out just does not make sense. It shows spillovers that are negative and contribution from others fo each variable that is greater than 100. I think something is not working there. However, when I commented out the first GFACTOR instead, everything works fine. I am attaching the table for the case that does not work:

Thanks


I corrected the calculation for the generalized spillover measures so they will now add to 100% and simplified the process for choosing between the two measures. The corrected programs are again posted at:

http://www.estima.com/forum/viewtopic.php?f=8&t=986
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm


Return to VARs (Vector Autoregression Models)

Who is online

Users browsing this forum: No registered users and 1 guest

cron