rolling Window problem. (Diebold Spillover index)

Questions and discussions on Vector Autoregressions
leewoo
Posts: 2
Joined: Sun Sep 28, 2014 11:23 am

rolling Window problem. (Diebold Spillover index)

Unread post by leewoo »

hello.

I have a problem calculating spillover index proposed by diebold (2009) and the code is proposed by TomDoan.

I revised the code to estimate VECM. Because my data have a cointegration.

whenever I excute the problem, Rats program shotdown.(I.m rats 8.3 trial version user)

but If I delete

eigen(cvalues=cv) %modelcompanion(ectmodel)
if %cabs(cv(1))>=1.0 {
compute spillreturns(end)=%na
next
}

the program is excuted.

but I want to Skip any data points where the rolling VECM has an explosive root.

How Can I solve the problem?

I attached the code and data.

please help me.

Thanks regards.

Code: Select all

compute nspan=200
set spillreturns rstart+nspan-1 rend = 0.0
do end=rstart+nspan-1,rend
   estimate(noprint) end-nspan+1 end
   *
   * Skip any data points where the rolling VAR has an explosive root.
   eigen(cvalues=cv) %modelcompanion(ectmodel)
   if %cabs(cv(1))>=1.0 {
      compute spillreturns(end)=%na
      next
   }
   compute gfactor=FactorMatrix()
   errors(model=ectmodel,steps=nsteps,factor=gfactor,stderrs=gstderrs,noprint,results=gfevd)
   compute gfevdx=%xt(gfevd,nsteps)
   ewise fromvar(i)=%sum(%xrow(gfevdx,i))-gfevdx(i,i)
   ewise tovar(i)=%sum(%xcol(gfevdx,i))-gfevdx(i,i)
   compute net = tovar - fromvar
   compute spillreturns(end)=100.0*%sum(tovar)/%nvar
end do end
graph(footer="Spillover plot. Returns. 60 month window. 12 step horizon")
# spillreturns
Attachments
oil.xls
(64.5 KiB) Downloaded 600 times
ecm.RPF
(3.48 KiB) Downloaded 913 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: rolling Window problem. (Diebold Spillover index)

Unread post by TomDoan »

%MODELCOMPANION doesn't work with the ECT model. However, you shouldn't have to worry about explosive VAR roots if you're running a VECM because you are forcing the dominant roots to be exactly one rather than allowing them to be a random number near one (sometimes below, sometimes above).
Post Reply