Hey all. Thanks for your help so far. I've noticed something in my data that will result in misleading results for certain variables. Basically, for most variables (you can think of them as stock tickers), there are missing observations on weekends and holidays, which works perfectly for me. For a couple, however, those weekend/holiday slots are filled in with the value of the next observation (i.e. Saturday and Sunday's values are equivalent to Monday's value). I'll provide a small example below.
I have 80+ variables with daily data ranging over a quite a few years. Would business calendars help me here? I'm not sure how to proceed with this clean-up. Thanks!
EDIT: Adding some clarification. RKT and TTY are examples of false weekend observations. ABC is ideal in terms of missing values over the weekend. If there's some way to have a "model" variable such as ABC and apply it to other variables, that could fix the issue.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(day abc xro rkt mgs tty) 19509 29.860113 . 1.8448875 . 29.91344 19510 30.020096 1.644 1.848199 6.3942 30.02937 19511 30.179895 1.6503 1.8629556 6.4046 29.98533 19512 30.23022 . 1.875309 6.4124 29.99614 19513 30.35522 1.6421 1.880363 . 29.983854 19514 . . 1.8915282 . 30.059195 19515 . . 1.8915282 . 30.059195 19516 30.459717 1.6385 1.8915282 . 30.059195 19517 30.410173 1.64 1.8727467 6.4417 29.91063 19518 30.51963 1.6341 1.8819928 6.4096 29.801025 19519 30.65406 1.6361 1.888474 6.4244 29.826956 19520 30.589745 1.6274 1.8838612 6.4232 29.728506 end format %tdNN/DD/CCYY day
EDIT: Adding some clarification. RKT and TTY are examples of false weekend observations. ABC is ideal in terms of missing values over the weekend. If there's some way to have a "model" variable such as ABC and apply it to other variables, that could fix the issue.
Comment