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
How to find best similar variables using overlaid graph or histograms or else?I have 51 variables containing 6,120 values of each variable. For example, resid1, resid2, ... resid…
reshape the datasetHello I have the dataset as below. It is just one long row variable. I want to reshape using reshap…
Why logit regression and marginal effects can't generate the same z-statistics?Dear Stata experts, I've run logit regression and its marginal effect at follow. However, they shou…
Fill missing observations of a variable with zeroDear Stata Users, Please, help me to resolve the following issue. Below I have a dataset. I need to …
RESET test for omitted variablesHello, I am trying to run diagnostics of my model and I would like to clarify the following uncerta…
Subscribe to:
Post Comments (Atom)
0 Response to Keep time within a range from DateTime
Post a Comment