Hi Everyone!
I am writing my dissertation which is on "The Impact of Macroeconomic Announcements on Exchange Rate Volatility".
My first set of data is a time-series 5-minute currency returns dataset spanning from 03/01/2016 to 12/30/2016 (MDY):
. list in 1/15
DateTime R_EURUSD R_GBPUSD R_EURGBP |
1. | 01/03/2016 22:00:00 .1311489 -.0122156 .0908478 |
2. | 01/03/2016 22:05:00 -.0128725 .067159 -.0996606 |
3. | 01/03/2016 22:10:00 -.0321995 -.0250904 -.0020376 |
4. | 01/03/2016 22:15:00 -.0009214 -.017639 .0189995 |
5. | 01/03/2016 22:20:00 -.0059892 -.0074658 .0033791 |
6. | 01/03/2016 22:25:00 .0114955 .0196783 -.0115282 |
7. | 01/03/2016 22:30:00 .009213 -.002038 .0217053 |
8. | 01/03/2016 22:35:00 -.0009213 -.0050871 .000679 |
9. | 01/03/2016 22:40:00 -.0096628 -.004408 -.0027078 |
10. | 01/03/2016 22:45:00 -.0115067 -.0050957 -.0135645 |
11. | 01/03/2016 22:50:00 .0009215 .0020383 .0054163 |
12. | 01/03/2016 22:55:00 -.0013822 -.018314 .0142427 |
13. | 01/03/2016 23:00:00 -.1058711 -.006456 -.0936091 |
14. | 01/03/2016 23:05:00 -.0018449 -.010858 .0108566 |
15. | 01/03/2016 23:10:00 .0230149 .0010195 .0203589 |
I have already Removed the Weekends and some Holidays, but I also need to remove the times from each day from 22:00:00 to 08:00:00 (Open and Close of the UK and US markets) to get the intraday return pattern for each day and consequently the average intraday return. I have attempted to get the Dates back into Strings, then split them and remove the times between the time described above, but this did not work.
Is there a way in which I can remove the times within a range for each day?
Best,
Marc
Related Posts with Keep time within a range from DateTime
Import all files from a folderA folder contains a lot of csv files with similar rows and columns. Without having to list all their…
Converting Weekly Data to Monthly DataI have weekly data that is issued say every Friday (different data sets have different issuance date…
Exporting results of Ttests with Unequal variancesI have a bunch of variables and I want to conduct a 2-group mean comparison test with unequal varian…
how to draw a bar like the picturehow to draw a bar like the picture using the following data,thanks! clear input int year double(Juni…
ONE QUESTION about GSEMDear stata users in GSEM , Is it logically correct to have such a model in general? Array …
Subscribe to:
Post Comments (Atom)
0 Response to Keep time within a range from DateTime
Post a Comment