Page 1 of 1

Daily to weekly conversion with missing data

Posted: Tue Jan 14, 2014 7:46 pm
by Walliso
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

Re: Daily to weekly conversion with missing data

Posted: Tue Jan 14, 2014 8:18 pm
by EViews Gareth
Something like:

Code: Select all

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

Re: Daily to weekly conversion with missing data

Posted: Tue Jan 14, 2014 10:27 pm
by Walliso
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.

Re: Daily to weekly conversion with missing data

Posted: Wed Jan 15, 2014 8:10 am
by EViews Gareth
It should work. Post your workfile.

Re: Daily to weekly conversion with missing data

Posted: Thu Jan 16, 2014 12:10 am
by Walliso
Thx..