Diebold-Yilmaz, IJF 2012

Use this forum for posting example programs or short bits of sample code.
izymougoue2006
Posts: 29
Joined: Tue Apr 24, 2012 8:16 pm

Re: Diebold-Yilmaz, IJF 2012

Unread post by izymougoue2006 »

Hello Tom
thanks for the feedback.
I didn't feel well, that's why I didn't reply to your recent messages.
In fact I wanted to know if I should calculate the daily minimum and maximum for each series with excel or Rats and which code will allow me.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Diebold-Yilmaz, IJF 2012

Unread post by TomDoan »

What data do you have? If you have only daily returns, then there is nothing you can do to get the max and min. You would likely need the max and min from the original source.

VolatilityEstimates.RPF shows how to compute volatility "data" from various observed prices.
izymougoue2006
Posts: 29
Joined: Tue Apr 24, 2012 8:16 pm

Re: Diebold-Yilmaz, IJF 2012

Unread post by izymougoue2006 »

Hello TOM,
I hope you are well. In fact I had disappeared for a few months because of a misfortune that had struck me and forced me to withdraw from the research. My dad was sick and it was I who assisted him and unfortunately he died which was a big shock for me and constituted a brake in my research activities.


I finale calculated volatility by raising the yield at the square.
I obtained some results that I ask to send it to you so that you make observations for me.
Thanks in advance
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Diebold-Yilmaz, IJF 2012

Unread post by TomDoan »

Sorry to hear that.

Since you last posted, you might want to look at the new VolatilityEstimates.rpf program which demonstrates different ways of estimating volatility from data for use in something like the DY analysis.
jack
Posts: 160
Joined: Tue Sep 27, 2016 11:44 am

Re: Diebold-Yilmaz, IJF 2012

Unread post by jack »

Dear Tom,

I have 700 weekly volatilities. How many span of rolling windows is appropriate for my data?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Diebold-Yilmaz, IJF 2012

Unread post by TomDoan »

jack wrote:Dear Tom,

I have 700 weekly volatilities. How many span of rolling windows is appropriate for my data?
For the data itself, 100 or 200 would be fine. (100 is basically two years). The key is what is appropriate to the model---how many variables and lags. If your window is small enough that your are using 50% or more of your degrees of freedom, that's too small for the model.
jack
Posts: 160
Joined: Tue Sep 27, 2016 11:44 am

Re: Diebold-Yilmaz, IJF 2012

Unread post by jack »

I have three variables and 700 observations. I used 4 lags. When I run the model, some of the graphs will not be produces (especially figures 5 and 6 are incomplete). I used 200 span of the rolling.

I attached the code and the data. Do you think, considering that the data is weekly and there are three variables, how many span of rolling windows would be appropriate? What do you think is a suitable number for lags for VAR model?
Attachments
Tom.xlsx
(42.63 KiB) Downloaded 387 times
Tom.RPF
(6.47 KiB) Downloaded 367 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Diebold-Yilmaz, IJF 2012

Unread post by TomDoan »

Change the second line of the GRAPH in the Figure 6 set up to read as below. That will get rid of the blank space at the left end.

graph(header=shortlabels(i)+"-"+shortlabels(j),style=bar)
# pairspill(i,j) rstart+nspan-1 rend

I'm not sure what your concern is about Figure 5. Note, however, that in your data set, there is virtually no connection among your series, so all the spillover measures are very small, and only look large because of graph scale.
izymougoue2006
Posts: 29
Joined: Tue Apr 24, 2012 8:16 pm

Re: Diebold-Yilmaz, IJF 2012

Unread post by izymougoue2006 »

Hello Mr Tom,
I hope you are doing well. I have some problems with the Diebold and Yimaz(2012) program. I have monthly data with seven variables. I try to apply the DY(2012) code but I cannot generate the volatility transmission table. I want to know if there are any modification to be made and at what level?
Thanks in advance !
I would like to thank you for your support regarding my previous paper.
izymougoue2006
Posts: 29
Joined: Tue Apr 24, 2012 8:16 pm

replicate the program of Diebold and yilmaz (2012)

Unread post by izymougoue2006 »

Hello Tom
I hope you are well. i use the Diebold and Yilmaz (2012) codes for monthly data but I cannot generate the volatility spillover table.
This what I get: # SR10. Missing Values And/Or SMPL Options Leave No Usable Data Points
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Diebold-Yilmaz, IJF 2012

Unread post by TomDoan »

That's almost certainly a data problem. Have you tried looking at the data that are going into the VAR? Clearly something is very wrong if it has no usable data points, which probably means at least one series is completely NA's.
MOQ
Posts: 2
Joined: Thu Dec 20, 2018 4:41 am

Error is running DY(2012) codes

Unread post by MOQ »

I am running DY(2012) codes on the following data and am getting the following message:
"## MAT14. Non-invertible Matrix. Using Generalized Inverse for SYMMETRIC.
The Error Occurred At Location 24, Line 4 of FACTORMATRIX
Called From Location 174, Line 8 of loop/block"
Please help with this issue. My data is also attached for you reference.
Attachments
Data sample.xlsx
Data
(77.48 KiB) Downloaded 271 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Diebold-Yilmaz, IJF 2012

Unread post by TomDoan »

Your first series is dead flat for half of the data set. That's not going to work as a dependent variable in a VAR.
Post Reply