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.
Converting irregular to regular frequency
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Converting irregular to regular frequency
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.
You can then use that new rounded date series to do a copy to a regular frequency page.
Who is online
Users browsing this forum: No registered users and 1 guest
