Page 1 of 1

replicate the program of Diebold and yilmaz (2012)

Posted: Fri Feb 16, 2024 2:50 pm
by izymougoue2006
Hello Tom, I hope you are doing well.
I need help with my graphics. In fact I have data form 2000 to 2023. But in the graphic reoresentation only dates starting from 2017 appaer.
Thanks in advance !
Please find attached to this message the codes.

Re: replicate the program of Diebold and yilmaz (2012)

Posted: Sat Feb 17, 2024 7:38 am
by TomDoan
Correct. You're doing 200 entry windows in the rolling regressions. That's over 16 years of data, so it's most of your sample. If you want to do rolling window estimates, you'll need to cut the window down to something more appropriate to the data that you have.

Re: replicate the program of Diebold and yilmaz (2012)

Posted: Sat Feb 17, 2024 3:33 pm
by izymougoue2006
how I can cut the window so that it fits my data ?
please find attached to this message my database.

Re: replicate the program of Diebold and yilmaz (2012)

Posted: Sat Feb 17, 2024 4:56 pm
by TomDoan
Change the value of NSPAN.

Have you read the rather substantial description of these programs in the help?

Re: replicate the program of Diebold and yilmaz (2012)

Posted: Sun Feb 18, 2024 3:55 pm
by izymougoue2006
I changed the NSPAN value to 25 but the graphs become discontinuous on certain dates.
you will find attached below the graphs that I obtained by modifying the NSPAN to 25
yes I read but I didn't understand much.

Re: replicate the program of Diebold and yilmaz (2012)

Posted: Mon Feb 19, 2024 9:26 am
by TomDoan
You need to stop and think about what is different about your data/model and what is being analyzed in the two DY papers. You have monthly. DY had weekly (2009) and daily (2012). 10 step responses for monthly data are almost a year; they are a bit over two months for 2009 and two weeks for 2012. A 25-wide NSPAN window is small relative to a 7 variable 2 lag model.

Note also that's it's not clear that the "moving window" analysis (in any of these papers) is anything more than an interpretation of noise. DY never actually look at whether the changing results are due to anything more than sample variation.

Re: replicate the program of Diebold and yilmaz (2012)

Posted: Tue Feb 27, 2024 4:41 am
by izymougoue2006
Thanks for the feedback.
I had to review things but so far, there are problems with the graphic representation. the curve only begins to take shape in 2004.
Can we use the DY methodology with monthly data? And at what level there should be changes to the codes.

Re: replicate the program of Diebold and yilmaz (2012)

Posted: Tue Feb 27, 2024 7:37 am
by TomDoan
I'm not sure what you expect. The rolling sample analysis can't produce anything until you use enough data for the first window (presumably about four years worth now---originally it was 17 years when you had NSPAN=200).

Again, I would point out that DY never actually show that the rolling sample analysis has any statistical validity---the differences could be entirely sample variation.

I don't know if you are analyzing volatility data. If you are, monthly seems a bit coarse for that.

Re: replicate the program of Diebold and yilmaz (2012)

Posted: Sat Mar 02, 2024 4:59 pm
by izymougoue2006
Yes I am analysing volatility data.
So should I reduce the sample period or?

Re: replicate the program of Diebold and yilmaz (2012)

Posted: Sat Mar 02, 2024 5:08 pm
by TomDoan
Is there a reason you don't have finer data (like even weekly)? How often do you see a serious examination of volatility with monthly data? (Engle's original ARCH paper analyzed monthly inflation data and no one ever would have heard much of ARCH if it weren't for Bollerslev developing GARCH and applying it to financial data because there just wasn't anything very interesting at the monthly level).

Re: replicate the program of Diebold and yilmaz (2012)

Posted: Thu Mar 07, 2024 4:34 am
by izymougoue2006
I can't get weekly data for all of my variables.
I finally decided to work with the weekly data by reducing the variables.
I would like to know if there is a code on rats which could help me to purify and adjust the data in relation to the dates of all the variables.
Thanks

Re: replicate the program of Diebold and yilmaz (2012)

Posted: Thu Mar 07, 2024 9:18 am
by TomDoan
What type of data do you have? Is it actually weekly from the source, but not aligned?