Page 1 of 1

Non-invertible Matrix - Diebold and Yilmaz(2009)

Posted: Fri Jan 30, 2015 7:30 pm
by anozman
Hi everyone,

I have used (with small modification) the example RATS code for Diebold and Yilmaz (2009) to estimate a VAR. When I use the generalized spillover measure setting to compute the rolling window spillover index, I got the error message: "Non-invertible Matrix". I was wondering whether somebody knows how to modify the code FactorMatrix=%sigma*inv(%diag(%sqrt(%xdiag(%sigma)))) to fix the "non-invertiable matrix" problem?

many thanks
anozman

Re: Non-invertible Matrix - Diebold and Yilmaz(2009)

Posted: Fri Jan 30, 2015 9:12 pm
by TomDoan
That matrix can only be singular if %SIGMA has zero diagonal elements. Are you sure you aren't using a rolling window which is too small? You should probably take the NOPRINT option off the ESTIMATE so you can see what's going on.

Re: Non-invertible Matrix - Diebold and Yilmaz(2009)

Posted: Sat Jan 31, 2015 12:14 am
by anozman
Hi Tom,

You are right. When I set the weekly series rolling window to 150 weeks for a one lag eight variable VAR, the model started to produce results. But I was wondering whether the 150 week window is sufficiently long for me to produce the reliable weekly spillover index. Any suggestions?

Many thanks,
Anozman

Re: Non-invertible Matrix - Diebold and Yilmaz(2009)

Posted: Sun Feb 15, 2015 8:37 am
by anozman
Hi Tom,

is it possible to use MS-VAR (@MSVARSetup) as the base model to estimate Diebold et al's spillover index?

Best regards,
anozman

Re: Non-invertible Matrix - Diebold and Yilmaz(2009)

Posted: Sun Feb 15, 2015 3:09 pm
by TomDoan
anozman wrote:Hi Tom,

is it possible to use MS-VAR (@MSVARSetup) as the base model to estimate Diebold et al's spillover index?

Best regards,
anozman
You can. The spillover index is a function of a VAR (coefficients and covariance matrix) and it doesn't really matter how that gets estimated. Obviously, you'll get different measures for the different regimes.

Re: Non-invertible Matrix - Diebold and Yilmaz(2009)

Posted: Sun Feb 15, 2015 7:57 pm
by anozman
Hi Tom,

Many thanks for your confirmation. All my variables are I(1) variables. Would this be an issue if I set up the MS-VAR for the level, not the difference. What I can see is that all I(1) variables have a shift in both mean and variance. What I need to check to ensure the MS-VAR is acceptable?

Best regards,
Jin

Re: Non-invertible Matrix - Diebold and Yilmaz(2009)

Posted: Mon Feb 16, 2015 7:30 am
by TomDoan
I(1) processes have no mean, so I assume you intend that it has switching intercepts (which will be innovational shifts).

There is nothing wrong with a MS VAR being I(1). You want to check that the standardized residuals are serially uncorrelated, that there isn't any obvious sign that the switch is either unnecessary or uninteresting (one-time switch rather than MS) and that you can make sense out of both regimes.

Re: Non-invertible Matrix - Diebold and Yilmaz(2009)

Posted: Wed Feb 18, 2015 3:30 pm
by anozman
thank you very much Tom. Am I right to say VECM can also be used to produce DY's spillover index? Could you please tell me whether any things I need to check if I use a VECM instead of a VAR, as I have found a couple of co integration relations in the data by using trace tests?

Regards,
Anozman

Re: Non-invertible Matrix - Diebold and Yilmaz(2009)

Posted: Wed Feb 18, 2015 5:42 pm
by TomDoan
There's nothing you need to check. It's a calculation which doesn't depend upon stationarity of the process. The only difference between stationary and non-stationary processes would be that the spillover measures would eventually converge with a stationary process as the horizon gets larger, and won't necessarily if the process is non-stationary. However, you fix a specific horizon anyway, so that doesn't really come into play.

Re: Non-invertible Matrix - Diebold and Yilmaz(2009)

Posted: Thu Feb 19, 2015 7:33 am
by anozman
Thank you very much Tom for your timely feedback!

I have another question: would the spillover index be influenced if I just use a simple VAR without taking into account the co-integration relationships and why (I would think the MA representation is going to different, so is the variance decomposition)?

cheers,
anozman

Re: Non-invertible Matrix - Diebold and Yilmaz(2009)

Posted: Fri Feb 20, 2015 4:07 pm
by TomDoan
If "influenced" means would you get a different answer, yes. The VECM is a restricted form of the VAR, so the coefficients and covariance matrix are different. Theoretically, the differences should be minor since if the VECM is correctly specified the VAR coefficients should converge to it at rate T.