Page 1 of 1

Transforming daily (but irregular) data to weekly frequency

Posted: Wed Mar 16, 2011 5:44 pm
by Kavorka
I have a time-series of irregular but dated daily data, that I would like to transform to weekly data. The problem is that the daily data is only registered when the interest rate is changed (so the frequency is irregular), and all other rows are simply excluded from the series (when the interest rate is not changed). Thus, there are no dated rows with missing values. To make it more complicated, sometimes the interest rate is not changed for over e.g. 2 weeks, which implies that there can be e.g. 38 daily observations in a year (if the interest rate is only changed 38 times during a year).

I added an excel file with a short illustration of how this series may look like (the format of the dates are 20110204, which means year:2011, month:02, day: 04).

I really do appreciate if some clever person can solve this programming problem. It must be a problem that other people also have encountered.

/Kavorka

Re: Transforming daily (but irregular) data to weekly freque

Posted: Wed Mar 16, 2011 5:51 pm
by EViews Gareth
Just open it in EViews, create a weekly page and copy it over to the weekly page.

Something like:

Code: Select all

open "interest rates.xls" pagecreate(page="weekly") w 2005 2011 copy untitled\interest_rate weekly\interest_rate

Re: Transforming daily (but irregular) data to weekly freque

Posted: Thu Mar 17, 2011 12:13 pm
by Kavorka
Excellent, thanks a lot for the solution to this problem!

However, if I understand this correctly the date for every created weekly average of the observations is placed on an incorrect date. It is placed on the Saturday at the PREVIOUS week (the week before the week we calculate the average for). Correct me if I am wrong.

(I still use version 6. I have bought version 7 but have not installed it yet.)

Transforming daily (but irregular) data to weekly frequency

Posted: Thu Mar 17, 2011 12:20 pm
by EViews Gareth
Try EViews 7.