Daily to weekly conversion with missing data

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

Walliso
Posts: 3
Joined: Tue Jan 14, 2014 7:38 pm

Daily to weekly conversion with missing data

Postby Walliso » Tue Jan 14, 2014 7:46 pm

Hi all,

I have read all related topics with my problem, but still could not solve my problem.

I have daily quotes of stocks in 5 days frequency. I removed all missing days due to holidays etc. And now, if I want do a weekly list, I want that in case of a missing Friday data that the one before namely Thursday is taken.

I saw it with @recode for monthly dates but I don^t know how to do for 5 days week.

P.S.: I am a beginner in Eviews.

Thanks a lot in advance for your help

Cheers

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Daily to weekly conversion with missing data

Postby EViews Gareth » Tue Jan 14, 2014 8:18 pm

Something like:

Code: Select all

X=@recode(@weekday=5 and x=NA,x(-1),x)

Walliso
Posts: 3
Joined: Tue Jan 14, 2014 7:38 pm

Re: Daily to weekly conversion with missing data

Postby Walliso » Tue Jan 14, 2014 10:27 pm

Thx for quick reply. But I get absolutely other numbers with that formula.

I want to have the same thing like that

Code: Select all

genr(r) lastmonth = @recode(@month(-1)=@month, lastmonth(1), y(-1))
but for 5 days week. The topic for this formula is http://forums.eviews.com/viewtopic.php?f=3&t=9043

If the last days of the week missing then it should take Thursday, the day before, from my daily index which I want to convert in weekly.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Daily to weekly conversion with missing data

Postby EViews Gareth » Wed Jan 15, 2014 8:10 am

It should work. Post your workfile.

Walliso
Posts: 3
Joined: Tue Jan 14, 2014 7:38 pm

Re: Daily to weekly conversion with missing data

Postby Walliso » Thu Jan 16, 2014 12:10 am

Thx..
Attachments
correlation-commodity.wf1
(579.2 KiB) Downloaded 195 times


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests