Freequency Conversion
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
Freequency Conversion
Hello,
I work on a dataset of intraday stock prices at random time intervals. Is there any technique to convert observations at a regular time freequency ( i.e
5-min, 3-min, 60-min etc) ?
Many thanks in advance,
Panos
I work on a dataset of intraday stock prices at random time intervals. Is there any technique to convert observations at a regular time freequency ( i.e
5-min, 3-min, 60-min etc) ?
Many thanks in advance,
Panos
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Freequency Conversion
Could you be a bit more explicit in what you're trying to do?
Re: Freequency Conversion
I use time series of intraday stock prices at random price intervals, like:
time(HHMMSSmS) Price
10403015 10.50
10403110 10.52
10410101 10.80
.
.
.
.
11501021 09.80
I want to create a regularly spaced (in terms of time) data series, such as (suppose 5-min):
time(HHMMSSmS) Price
10403015 10.50
10453015 ?
10503015 ?
with the new price derived, will probably depending of the interpolation method.
any hint?
Thanks again
Panos
time(HHMMSSmS) Price
10403015 10.50
10403110 10.52
10410101 10.80
.
.
.
.
11501021 09.80
I want to create a regularly spaced (in terms of time) data series, such as (suppose 5-min):
time(HHMMSSmS) Price
10403015 10.50
10453015 ?
10503015 ?
with the new price derived, will probably depending of the interpolation method.
any hint?
Thanks again
Panos
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Freequency Conversion
The question is - what do you want to do with the prices that aren't on a 5 minutely interval?
Re: Freequency Conversion
Nothing. Just keep the last price at the 5-min interval ( or probably an average of them).
Is there any other option?
Thanks again
Panos
Is there any other option?
Thanks again
Panos
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Freequency Conversion
Create a new page that has the 5 minute interval structure you want, then copy from the irregular page to the new page.
Re: Freequency Conversion
Many many thanks indeed.
What if I want to keep the days when my observations are interpolated. My dataset is like:
Day time(HHMMSSmS) Price
01/06/2009 10403015 10.50
01/06/2009 10403110 10.52
01/06/2009 10410101 10.80
.
.
.
.
02/06/20009 11501021 09.80
When I actually do with copy paste it creates a time-series of 5-min prices by fewer days ( since a new column of days it's created by default), so I cannot match my real observations with their actual days.
Is there any way to construct this 5-min time series but with price observations still match their actual day.
Thanks sincerely
Panos
What if I want to keep the days when my observations are interpolated. My dataset is like:
Day time(HHMMSSmS) Price
01/06/2009 10403015 10.50
01/06/2009 10403110 10.52
01/06/2009 10410101 10.80
.
.
.
.
02/06/20009 11501021 09.80
When I actually do with copy paste it creates a time-series of 5-min prices by fewer days ( since a new column of days it's created by default), so I cannot match my real observations with their actual days.
Is there any way to construct this 5-min time series but with price observations still match their actual day.
Thanks sincerely
Panos
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Freequency Conversion
I'm lost.
Perhaps you could provide the workfile, and an explanation of the steps you have taken, and an explanation of what is going wrong?
Perhaps you could provide the workfile, and an explanation of the steps you have taken, and an explanation of what is going wrong?
Re: Freequency Conversion
The data set starts on 01/06/2009 and ends on 31/05/2010
The steps are as follows:
1. Create new workfile 'Ave'
2. Open new page
3. Specify freequency/range .Set: - Freequency: Intraday
5-Minute
- Start Date : 06/09/2009 / End Date: 31/05/2010
- Days: 1.Monday - 5. Friday (only working days)
- Time: from 10:30:00 to 15:30:00
4. Paste created series
The workfile is attached. series04 is the price column and stops at 10/09/2009
Thanks again
Panos
The steps are as follows:
1. Create new workfile 'Ave'
2. Open new page
3. Specify freequency/range .Set: - Freequency: Intraday
5-Minute
- Start Date : 06/09/2009 / End Date: 31/05/2010
- Days: 1.Monday - 5. Friday (only working days)
- Time: from 10:30:00 to 15:30:00
4. Paste created series
The workfile is attached. series04 is the price column and stops at 10/09/2009
Thanks again
Panos
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Freequency Conversion
No attachment.
Re: Freequency Conversion
sorry I cannot upload the file
I pres"Add the file'' and the file disappears
How can I do that?
I pres"Add the file'' and the file disappears
How can I do that?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Freequency Conversion
just email it to support@eviews.com
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Freequency Conversion
File received.
The problem is that your first page is not structured as a dated page. Further, you can't structure it as a dated page because you have duplicate date/time pairs.
I can't help further without knowing what your intentions are with regards to the conversion from irregular/duplicates to a regular time frame. Again, what are you going to do if an observation isn't on the 5 minute mark, and what are you going to do if there are more than one observations on a 5 minute mark?
The problem is that your first page is not structured as a dated page. Further, you can't structure it as a dated page because you have duplicate date/time pairs.
I can't help further without knowing what your intentions are with regards to the conversion from irregular/duplicates to a regular time frame. Again, what are you going to do if an observation isn't on the 5 minute mark, and what are you going to do if there are more than one observations on a 5 minute mark?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Freequency Conversion
For what it is worth, I created a single date/time series in your first page with the following: (Might not be the most efficient way, but it worked!)
(the last two lines aren't necessary, but I included so that you can see the result nicely)
Code: Select all
series time = @dateval(@left(@str(series03), 6) + "." + @right(@str(series03), 2), "HHMISS.SS")
alpha datetimestr = @datestr(series02, "YYYY/MM/DD") + " " + @datestr(time, "HH:MI:SS.SSS")
series datetime = @dateval(datetimestr, "YYYY/MM/DD HH:MI:SS.SSS")
datetime.setformat "YYYY/MM/DD HH:MI:SS.SSS"
show datetime
Re: Freequency Conversion
Hi guys,
i wanted to answer how i can to convert my (time series )data from 5-years observations to annual observations. I had downloaded a database which is like that:
1960: 7.2
1965:7.8
1970:8.4
..........
.........
and i want to convert them to annual data in eviews.
Thank you in advance.
i wanted to answer how i can to convert my (time series )data from 5-years observations to annual observations. I had downloaded a database which is like that:
1960: 7.2
1965:7.8
1970:8.4
..........
.........
and i want to convert them to annual data in eviews.
Thank you in advance.
Who is online
Users browsing this forum: No registered users and 2 guests
