Hi everybody,
I am using Stata 13 and have several time series that focus on equity returns etc. Using tsset results in setting the time series but with gaps (due to the weekends).
If I use tsfill, I fill the gaps with "." since no value exists for the weekend.
Is there a way to fill the gaps but to "delete" the weekends. For instance, using L.variable should show me on Monday the value of Friday and not the non-existing one for Sunday.
One way was for example: gen t=_n
This alligns each row of the Panel to the continous Stata dates. However, I believe there is a more elegant way.
Many thanks in advance!
I am using Stata 13 and have several time series that focus on equity returns etc. Using tsset results in setting the time series but with gaps (due to the weekends).
If I use tsfill, I fill the gaps with "." since no value exists for the weekend.
Is there a way to fill the gaps but to "delete" the weekends. For instance, using L.variable should show me on Monday the value of Friday and not the non-existing one for Sunday.
One way was for example: gen t=_n
This alligns each row of the Panel to the continous Stata dates. However, I believe there is a more elegant way.
Many thanks in advance!
Comment