Diebold and Yilmaz Spillover with column normalzation

Questions and discussions on Vector Autoregressions
hyde82
Posts: 6
Joined: Mon Sep 28, 2015 1:53 am

Diebold and Yilmaz Spillover with column normalzation

Unread post by hyde82 »

Hi,

I'm beginner in rats.
recently I'm interestd in DY Spillover Index, and DY(2012) say Spillover table can normalize the elements of the variance decomposotion matrix with the column sum of these elements.

I want to compare row and column normalization.

Following is the replication code for DY(2011) proposed by TomDoan. and I delete some country for handling easily.

If I want to column normalzation , How can I make this?

I think revise this parts. but I'm not sure.

Code: Select all

errors(model=returnvar,steps=nsteps,factor=gfactor,stderrs=gstderrs,print,results=gfevd)

compute gfevdx=%xt(gfevd,nsteps)
If there´s any one who could help me with this, I would be really grateful!

Code: Select all

compute usegirf=1

open data dy_ej2009.xls
calendar(w) 1992:1:10
data(format=xls,org=columns,sheet="weekly_realreturns",top=2,left=2) 1992:01:10 2007:11:23 $
 rrdjia rrftse rrfra rrger

dec vect[int] returns
enter(varying) returns
# rrdjia rrftse rrfra rrger

dec vect[string] shortlabels(%size(returns))
enter shortlabels
# "US" "UK" "FRA" "GER"
* Setup and estimate two lag VAR

system(model=returnvar)
variables returns
lags 1 2
det constant
end(system)

estimate(noprint)

* Analyze the 10 step responses
*
compute nsteps=2
*********************************************************************
function FactorMatrix
type rect FactorMatrix
if usegirf
   compute FactorMatrix=%sigma*inv(%diag(%sqrt(%xdiag(%sigma))))
else
   compute FactorMatrix=%decomp(%sigma)
end
*********************************************************************
*
compute gfactor=FactorMatrix()

errors(model=returnvar,steps=nsteps,factor=gfactor,stderrs=gstderrs,print,results=gfevd)

compute gfevdx=%xt(gfevd,nsteps)

display "10-Step-Ahead Variance Decomposition" gfevdx*100

10-Step-Ahead Variance Decomposition
45.13557 18.77770 17.34848 18.73825
16.46141 39.58519 23.17755 20.77585
14.63099 22.14470 37.81998 25.40433
15.92989 20.09512 25.79258 38.18241

Code: Select all

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)=fromvar(i)+1-tovar(i)
compute spillover=100.0*%sum(fromvar)/%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)

US UK FRA GER From Others
US 45.1 18.8 17.3 18.7 55
UK 16.5 39.6 23.2 20.8 60
FRA 14.6 22.1 37.8 25.4 62
GER 15.9 20.1 25.8 38.2 62
Contribution to others 47 61 66 65 239
Contribution including own 108 99 96 97 59.8%

Best,
hyde82
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Diebold and Yilmaz Spillover with column normalzation

Unread post by TomDoan »

That is what I would call a "throwaway" comment. Because it's a footnote, it may never have been seriously examined. They never use it, and it doesn't really make sense to normalize on columns.
hyde82
Posts: 6
Joined: Mon Sep 28, 2015 1:53 am

Re: Diebold and Yilmaz Spillover with column normalzation

Unread post by hyde82 »

Thank you Tom.

but I saw the paper that compare row and column normalzation.

Xiangyi Zhou. etc(2012), "Volatility spillovers between the chinese and world equity markets", Pacific-Basin Finance journal

although It doesn't make sense to normalize on columns, I really want to learn how to normalize on columns because I want to be goot at rats program.

and why it doesn't make sense to normalize on columns.

Thanks in advance,
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Diebold and Yilmaz Spillover with column normalzation

Unread post by TomDoan »

There's no simple way to do that because the ERRORS instruction has already done the normalization by row sums and you can't recover the underlying information once that's been done.

Not everything that gets published is worthwhile. When you normalize across rows, everything is based upon a common calculation of the variance (or "generalized" variance) of a variable. Each target variable is given equal weight. If you normalize down columns, you're aggregating across separate calculations that have nothing really to do with each other. A particular shock which explains effectively nothing gets the same weight as a shock which explains quite a bit. Again, it's important to note that DY mention it in passing in a footnote and then do nothing with it. That's usually a good sign that it's not worth doing.
hyde82
Posts: 6
Joined: Mon Sep 28, 2015 1:53 am

Re: Diebold and Yilmaz Spillover with column normalzation

Unread post by hyde82 »

Thank you tom.

I really appreciate it.
Post Reply