Hi, is anyone know how to calculate the 5 mins interval average?
I have 5 mins interval data for return from 8:00 to 15:00 everyday. And I am looking to calculate all the 8:00-8:05 average value. How to calculate it?
Many Thanks
average for 5 mins interval
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: average for 5 mins interval
How is your workfile currently structured?
Re: average for 5 mins interval
How is your workfile currently structured?
Hi, my workfile current structured as the following:
8/28/2012 08:00 5772.07
8/28/2012 08:05 5769.48
8/28/2012 08:10 5767.63
8/28/2012 08:15 5765.38
.....
3/12/2013 13:00 6508.39
3/12/2013 13:05 6509.67
3/12/2013 13:10 6509.27
3/12/2013 13:15 6511.84
3/12/2013 13:20 6511.73
and thanks for your reply.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: average for 5 mins interval
Could you provide the workfile?
Re: average for 5 mins interval
Sure, and here it is.
- Attachments
-
- ftse 100-5 mins.wf1
- (818.72 KiB) Downloaded 503 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: average for 5 mins interval
Possibly the easiest way is to open up the series, click on View->Descriptive Statistics->Stats by Classification, then enter "@hour @minute" in the Series/Group to classify box.
Re: average for 5 mins interval
Thank you so much, the results are the exactly I need. Thank you again. :D
Re: average for 5 mins interval
Thank you for your helps, and I am wanding how to perform the following:
we have already performed to calculate the average for the 5 mins interval. Some averages show positive, and others show negative. Then, suppose we only care about, on average, either the price go up or go down (either positive or negative) in 5mins interval. How can test the following:
Basiclly, the totally obervisations are 14078, we can use 12000 sample to calculate the average for daily 5 mins interval. And then we use another 2078 sample to test the trending forecast ability ( either postive or negative). And calculate the probaility of correct direction forecasting.
Is it possible to do the above? If so, how?
we have already performed to calculate the average for the 5 mins interval. Some averages show positive, and others show negative. Then, suppose we only care about, on average, either the price go up or go down (either positive or negative) in 5mins interval. How can test the following:
Basiclly, the totally obervisations are 14078, we can use 12000 sample to calculate the average for daily 5 mins interval. And then we use another 2078 sample to test the trending forecast ability ( either postive or negative). And calculate the probaility of correct direction forecasting.
Is it possible to do the above? If so, how?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: average for 5 mins interval
You'll have to provide more details.
In response to the generic question "it is possible to use a subset of observations to estimate a model, then use the remaining observations to forecast from that model and judge forecast accuracy", then the answer is "yes, that's a main component of EViews".
In response to the generic question "it is possible to use a subset of observations to estimate a model, then use the remaining observations to forecast from that model and judge forecast accuracy", then the answer is "yes, that's a main component of EViews".
Re: average for 5 mins interval
Thank you for your reply. Basically, there is no model. I want to test whether the average value of 5 mins interval can generally forecaste the other day's trend of 5 mins interval. According to the intraday periodicity characteristic, there should be a high forecast ability by using average, I guess. If the test results keep the consistency with the theory, says about 65% correct forecast of the trend by using average value. Then we can program a trading strategy. And the strategy is simple, that is only to trade if the forecasted average is positive.
The test I need to do is to test whether the pasted 5 mins interval average can generlly forecast the trend of other day's 5 mins interval. As you mentioned above, We can produce this average by using @hour @minute, but how to perform a test for out of sample period? Says, there is 14078 data in total, we calculate the 5 mins interval average by using 12078 data, and to use other 2000 to test the forecast ability. I attached the e-views workfile in this message as well.
Looking forward to hear from you
Many Thanks
The test I need to do is to test whether the pasted 5 mins interval average can generlly forecast the trend of other day's 5 mins interval. As you mentioned above, We can produce this average by using @hour @minute, but how to perform a test for out of sample period? Says, there is 14078 data in total, we calculate the 5 mins interval average by using 12078 data, and to use other 2000 to test the forecast ability. I attached the e-views workfile in this message as well.
Looking forward to hear from you
Many Thanks
- Attachments
-
- ftse 100-5 mins.wf1
- (830.31 KiB) Downloaded 512 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: average for 5 mins interval
You'll have to state the question more formally/precisely, I think.
However, if you want to show the averages over a subset of observations, you can set the workfile sample prior to showing the stats by classification. Use Proc->Set Sample on the workfile window to do so. You could either use dates to set the subsample (say "2012/08/28 2013/02/12"), or if you want an exact number of observations, using an if condition such as "@trend<12000".
However, if you want to show the averages over a subset of observations, you can set the workfile sample prior to showing the stats by classification. Use Proc->Set Sample on the workfile window to do so. You could either use dates to set the subsample (say "2012/08/28 2013/02/12"), or if you want an exact number of observations, using an if condition such as "@trend<12000".
Re: average for 5 mins interval
Hi, thank you for these replies. I think we both can not understand each other percisely. :)
But still appreciate you effects to try to help.
Many Thanks
But still appreciate you effects to try to help.
Many Thanks
Who is online
Users browsing this forum: No registered users and 2 guests
