How to calculate daily return by Index

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

rickyyml
Posts: 16
Joined: Tue Nov 05, 2013 1:58 am

How to calculate daily return by Index

Postby rickyyml » Tue Nov 05, 2013 2:28 am

I am a new user of EViews, and I am facing a problem about calculating daily return by the daily close of Index.

I have created a work file with structure of 5 days a week, imported the daily close of Hang Seng Index from 1998 to 2012. When calculate the daily return by:

series drl = log(y/y(-1))

the problem is about (y-1), for example on 2 Feb 98 the index closing 10,578.60, but the output was "NA", because 1 Feb 98 was holiday, how can I amend it so that EViews will take the last trade day close (i.e. 27 Jan 98) as the base of return calculation?

Please kindly help!
Attachments
project q1.wf1
(166.17 KiB) Downloaded 466 times

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: How to calculate daily return by Index

Postby trubador » Tue Nov 05, 2013 2:36 am

You can try resizing the workfile:

Code: Select all

pagecontract if y<>NA

rickyyml
Posts: 16
Joined: Tue Nov 05, 2013 1:58 am

Re: How to calculate daily return by Index

Postby rickyyml » Tue Nov 05, 2013 8:15 am

Thanks Trubador

It is exactly what I need, thanks a lot!!

And would you mind to give me some idea how to calculate monthly standard deviation by series "drl"?

Or, it is a must to create another series (or other type) for such calculation?

Ricky
Attachments
project q1.wf1
(158.02 KiB) Downloaded 375 times


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest