Converting irregular to regular frequency

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

simhytss
Posts: 1
Joined: Wed Feb 29, 2012 9:41 am

Converting irregular to regular frequency

Postby simhytss » Wed Feb 29, 2012 9:57 am

Hi, hopefully this is the correct subforum for my question.

I have irregular high-frequency data on stock prices (i.e. time of each observation is the second each trade has happened, relevant variables DATE, TIME, PRICE). I want to calculate returns e.g. for each half-hour period and use models with half-hourly observations, but do not know how to do this without converting the data to regular frequency. Is it possible to convert the data to some regular frequency, so that e.g. the price variable at 10:00, 10:30, 11:00... takes the value of the last trade before/closest to that time point from the irregular data?

Thank you very much in advance. I am using EViews 7.

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

Re: Converting irregular to regular frequency

Postby EViews Gareth » Wed Feb 29, 2012 10:15 am

Assuming you have a series that contains date/time information, you could create a new series in the workfile that has the time rounded to the nearest half hour by using the @datefloor function to round to the nearest 30 minutes (something like @datefloor(series, "MM", 30) ).

You can then use that new rounded date series to do a copy to a regular frequency page.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest