Hi!
Our data is tick by tick data on a stock exchange index. However, for our analysis, we only need observations every 15 minutes, so we want to create a time interval of 15 minutes. The data has an inconsistent frequency, so it is not sure that it is a tick when the time show e.g. 09:00:00, 09:15:00, 09:30:00 or 09:45:00.
We have tried to extract the value of the index every time the minutes are 00, 15, 30 and 45. This is the code we used
gen intervall = value if mm(time)==00 | mm(time)==15 | mm(time)==30 | mm(time)==45 | hh(time)==17 & mm(time)==25 & ss(time)<20
But due to the inconsistency, we can not be sure that we have in fact included variables every 15 minutes.
How can we create this time interval for the index value?
Attached is a photo of how our dataset looks like.
Thank you!
Our data is tick by tick data on a stock exchange index. However, for our analysis, we only need observations every 15 minutes, so we want to create a time interval of 15 minutes. The data has an inconsistent frequency, so it is not sure that it is a tick when the time show e.g. 09:00:00, 09:15:00, 09:30:00 or 09:45:00.
We have tried to extract the value of the index every time the minutes are 00, 15, 30 and 45. This is the code we used
gen intervall = value if mm(time)==00 | mm(time)==15 | mm(time)==30 | mm(time)==45 | hh(time)==17 & mm(time)==25 & ss(time)<20
But due to the inconsistency, we can not be sure that we have in fact included variables every 15 minutes.
How can we create this time interval for the index value?
Attached is a photo of how our dataset looks like.
Thank you!
Comment