Hello everyone:

I am calculating the estimate of stock volatility, which use annualized standard deviation of stock returns estimated over the 60 months prior to the beginning of the fiscal period.

So I download the monthly data from CRSP.
And I run the code below:

rangestat (sd) ret, interval(date -60 0) by(cusip) But however the results I got is not what I want, I want at least 60 months to run the standard deviation, but however this code run sd even when you only have two month data. So is there anyway to strict the command that the loop have to be 60 months? Thank you very much. Lucas