how to read the return data

For questions and discussion related to reading in and working with data.
upani
Posts: 55
Joined: Wed Jun 25, 2014 3:31 am

how to read the return data

Unread post by upani »

Dear All,

I would like to read my data using the following code.

Code: Select all

DATA(FORMAT=XLSX,ORG=COLUMNS) 2005:01:07 2021:10:01 MCX COMEX SPOT

*
set rmcx  = 100.0*log(mcx/mcx{1})
set rcomex = 100.0*log(comex/comex{1})
set rspot    = 100.0*log(spot/spot{1})
After calculating the return series, how drop the first observation. As Rats is giving me the following error.
## REG20. GARCH Cannot Be Used with Gaps/Missing Values.

Please guide me on how to rectify the error in my code.
I have attached the data set for your reference.

With sincere regards,
Upananda
Attachments
silvermcx.xlsx
(43.48 KiB) Downloaded 872 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: how to read the return data

Unread post by TomDoan »

You have embedded missing values in your data:

2010:12:31 NA NA NA
2016:12:30 NA NA NA

Given that you are using weekly data anyway, you should probably put in the nearest trading day for those entries.
upani
Posts: 55
Joined: Wed Jun 25, 2014 3:31 am

Re: how to read the return data

Unread post by upani »

Dear Sir,

Thanks a lot for your reply.

With sincere regards,
Upananda
Post Reply