Diebold-Yilmaz, IJF 2012

Use this forum for posting example programs or short bits of sample code.

Re: Diebold-Yilmaz, IJF 2012

Unread postby Christy92 » Tue Dec 01, 2020 9:40 pm

TomDoan wrote:Are you looking at the Table 2 values (full sample) or the rolling window values. For Table 2, the simplest thing to do is probably to just reload Table 2 (Window--Report Windows selector) and export it to Excel. You can also do

write(format=xlsx,unit=copy) fromvar~tovar

which will prompt you for the file name.

For the rolling windows, you would do

copy(format=xlsx,unit=copy,dates) / fromspill tospill

Again, it will prompt you for the file name.



Hello Tom, I have done the codes of:

copy(format=xlsx,unit=copy,dates) / fromspill tospill

but it says that the FROMSPILL and TOSPILL are not identified.

Could you please tell me on how to obtain the time series data of all the spillover calculations (full sample, rolling window values, and the net pairwise spillover) to an excel file?

Thanks a bunch!
Christy92
 
Posts: 2
Joined: Tue Dec 01, 2020 7:19 pm

Re: Diebold-Yilmaz, IJF 2012

Unread postby TomDoan » Tue Dec 01, 2020 9:54 pm

You have to do that after the calculation of the rolling sample statistics---that's where those get computed.
TomDoan
 
Posts: 7240
Joined: Wed Nov 01, 2006 5:36 pm

Re: Diebold-Yilmaz, IJF 2012

Unread postby istiak » Mon Feb 15, 2021 12:22 am

Hello,
In all the figures, the X-axis shows the serial number of the observation like 200, 400,..., etc. Instead, how can I put the dates like 1/25/1999, ..., 2/25/2000, etc. in the X-axis in all the graphs. I am using a smaller set of data with only 150 observations and I need to put dates in the X axis. How to change the code to do this? Thank you.
istiak
 
Posts: 29
Joined: Sun Nov 11, 2012 10:03 pm

Re: Diebold-Yilmaz, IJF 2012

Unread postby TomDoan » Mon Feb 15, 2021 11:53 am

If you have data with usable dates, it will do the graphs with dates. The DY paper has irregular dates, and when we wrote the replication, we didn't have the ability to do the graphs with irregular dates.
TomDoan
 
Posts: 7240
Joined: Wed Nov 01, 2006 5:36 pm

Re: Diebold-Yilmaz, IJF 2012

Unread postby istiak » Mon Feb 15, 2021 12:59 pm

Hello Tom,
I changed the excel file with regular dates (yearly). I attach the file here. I ran the program again with the modified excel file, still the date is not shown in the graphs. Can you please help me?
Attachments
dy_ijf2012_data.xlsx
(276.68 KiB) Downloaded 345 times
istiak
 
Posts: 29
Joined: Sun Nov 11, 2012 10:03 pm

Re: Diebold-Yilmaz, IJF 2012

Unread postby TomDoan » Mon Feb 15, 2021 1:44 pm

If there's no CALENDAR instruction, there is no date scheme. Why don't you work with your own data, rather than trying to alter the DY data?
TomDoan
 
Posts: 7240
Joined: Wed Nov 01, 2006 5:36 pm

Re: Diebold-Yilmaz, IJF 2012

Unread postby istiak » Tue Feb 16, 2021 12:00 am

Hi Tom,
Thank you so much for your comment. Now I use my own data and used the calendar option, so figures are coming with dates on the X-axis. I attach the data and code here. But, two problems. First, although the monthly data starts from 1996:1, the graphs are created from late 2012. How can I get graphs from 1996:1? Second, there are two blank parts of all the graphs between 2012-2013 and from 2013-2014. Why? Is there a way to remove them?
Thank you so much.
Attachments
ustouristdatafinal.xls
(270 KiB) Downloaded 373 times
code long.RPF
(5.77 KiB) Downloaded 368 times
istiak
 
Posts: 29
Joined: Sun Nov 11, 2012 10:03 pm

Re: Diebold-Yilmaz, IJF 2012

Unread postby TomDoan » Tue Feb 16, 2021 10:01 am

You're doing rolling 200 observation windows with only 286 data points, so there won't be very many samples and they will start very late in the data set.

The analysis is set to:

*
* Skip any data points where the rolling VAR has an explosive root.
*

which is why you are missing observations. Your data are completely different from what DY are using---they have returns to financial assets, all of which are stationary series (so there are no issues with explosive roots). You have non-stationary series, and the CARRIVE series has a strong seasonal---in fact, its variance is dominated by the seasonal and a four lag VAR with monthly data can't possibly deal with that.
TomDoan
 
Posts: 7240
Joined: Wed Nov 01, 2006 5:36 pm

Re: Diebold-Yilmaz, IJF 2012

Unread postby istiak » Wed Mar 03, 2021 8:37 am

Dear Tom
Thank you. Do you have a plan to write estima code for the paper, which has different time intervals?
Barunik and Krehlik (2018), Measuring the Frequency Dynamics of Financial Connectedness and Systemic Risk, Journal of Financial Econometrics, 16 (2), pp. 271--296
istiak
 
Posts: 29
Joined: Sun Nov 11, 2012 10:03 pm

Re: Diebold-Yilmaz, IJF 2012

Unread postby istiak » Fri Aug 27, 2021 10:28 pm

Dear Tom,
To use the code, is it a precondition that the variables should be stationary in the VAR model?
Thank you.
istiak
 
Posts: 29
Joined: Sun Nov 11, 2012 10:03 pm

Re: Diebold-Yilmaz, IJF 2012

Unread postby TomDoan » Sun Aug 29, 2021 12:12 pm

There is no theoretical reason that they have to be since the analysis is always based upon the decomposition a fixed number of steps ahead (nothing about asymptotic behavior). I assume that with the data set that wasn't clearly stationary, DY ruled out the calculation with rolling estimates which had explosive roots since they might be quite different than other estimates that had stable roots (explosive roots tend to dominate the results very quickly). However, if you're doing a modest number of steps, that shouldn't be a major issue.
TomDoan
 
Posts: 7240
Joined: Wed Nov 01, 2006 5:36 pm

Re: Diebold-Yilmaz, IJF 2012

Unread postby curiousresearcher » Mon Aug 08, 2022 11:01 pm

Extremely useful
curiousresearcher
 
Posts: 42
Joined: Sun May 19, 2019 9:56 pm

Previous

Return to Examples and Sample Code

Who is online

Users browsing this forum: No registered users and 2 guests