Dear STATA users,
I want to compute 12-month moving standard deviations for price returns. For example, if I am looking at the moving average, I can use this command:
tssmooth ma moveave1 = r, window(12).
I kindly request that someone help me replicate the same for standard deviation. Instead of computing the moving average, I am looking at the moving standard deviation. Please.
I want to compute 12-month moving standard deviations for price returns. For example, if I am looking at the moving average, I can use this command:
tssmooth ma moveave1 = r, window(12).
I kindly request that someone help me replicate the same for standard deviation. Instead of computing the moving average, I am looking at the moving standard deviation. Please.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float r .069388516 .08126382 .27004573 .12472465 -.18312235 -.3020063 .03815682 .11805111 -.06872444 -.152516 .0386655 .08108934 .0379653 .15982857 .063930154 -.02768949 -.0860794 -.009729363 .13283129 .09999108 -.16191234 end
Comment