Dear all,
I am trying to obtain a 5 year (60 month) rolling standard deviation for the 'return'-variable in my dataset. After having tried a few things I am fairly confident that the following command will work:
(Thanks to Oliver Jones on http://www.stata.com/statalist/archi.../msg00917.html)
This will give the variances, after which I can take the square root in order to obtain standard deviations.
However, since I use financial data over a wide timespan and for a lot of companies (1200+), this will take my computer a little over a week if I'm correct. Therefore I would like to know if there perhaps is a less computationally heavy way to do this, and if not if this is indeed a correct way to do it (before I waste 10 days on a wrong command).
Thanks in advance.
Martin Pott
I am trying to obtain a 5 year (60 month) rolling standard deviation for the 'return'-variable in my dataset. After having tried a few things I am fairly confident that the following command will work:
Code:
rolling Var = r(Var), window(60) step(1): summarize return, d
This will give the variances, after which I can take the square root in order to obtain standard deviations.
However, since I use financial data over a wide timespan and for a lot of companies (1200+), this will take my computer a little over a week if I'm correct. Therefore I would like to know if there perhaps is a less computationally heavy way to do this, and if not if this is indeed a correct way to do it (before I waste 10 days on a wrong command).
Thanks in advance.
Martin Pott
Comment