Hi,
I am calculating returns of stock prices in a panel data format. I have calculated the returns as follows.
return_i=dlog(price)
Out of all the observations there is a bug that gives the value as "NA" for 1 particular stock. I have gone through the imported(raw) data and it does not contain any NA's also there seems to be no problem with the dates. I have tried calculating the returns in a new work file just for this stock and it calculated the returns correctly. however, it seems to create a problem when used with the entire sample. Please help
Function dlog(x) in eviews gives values as NA
Moderators: EViews Gareth, EViews Moderator
Function dlog(x) in eviews gives values as NA
- Attachments
-
- return.wf1
- workfile for your reference
- (621.72 KiB) Downloaded 255 times
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Function dlog(x) in eviews gives values as NA
In "return_i". The stock "1910 HK - 11M06" is generating all values as "NA"
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Function dlog(x) in eviews gives values as NA
The cross-section "1910 HK" only has one observation, and that is for 2011m6. There is no value for 2011m7. Thus you cannot calculate the value of the DLOG.
Similarly the cross-section "1911 HK" only has one observation, and that is for 2011m7. It has no value for 2001m6. You cannot calculate the value of DLOG for it either.
I'm assuming that something got messed up with your original data file. I presume 1910 HK and 1911 HK are actually the same cross-section (company), but have different names.
Similarly the cross-section "1911 HK" only has one observation, and that is for 2011m7. It has no value for 2001m6. You cannot calculate the value of DLOG for it either.
I'm assuming that something got messed up with your original data file. I presume 1910 HK and 1911 HK are actually the same cross-section (company), but have different names.
Follow us on Twitter @IHSEViews
Re: Function dlog(x) in eviews gives values as NA
Oh yes! that was the problem. While copy pasting the stock name and dragging it down on excel to create the panel data format, Excel changed the name into series creating new cross sections. It seems to work after correcting this error.
Thanks for your help!!
Cheers
Thanks for your help!!
Cheers
Who is online
Users browsing this forum: No registered users and 25 guests