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
Transforming daily (but irregular) data to weekly frequency
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Transforming daily (but irregular) data to weekly frequency
- Attachments
-
- Interest rates.xls
- (33.5 KiB) Downloaded 460 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Transforming daily (but irregular) data to weekly freque
Just open it in EViews, create a weekly page and copy it over to the weekly page.
Something like:
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
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.)
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.)
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Who is online
Users browsing this forum: No registered users and 2 guests
