Hello everyone!
I am trying to compute idiosyncratic volatility on a rolling basis of 24 months with monthly data. I have created a month/year variable called ymdate.
This has been my code so far:
bys perm : asreg Excess_USD_w MKT SMB HML, wind(ymdate 24)
gen residuals = Excess_USD_w - _b_cons - _b_MKT*MKT - _b_SMB*SMB - _b_HML*HML
bys perm: egen IVOL=sd (residuals)
In the end, I want to look at each year. However, my min and max values are the same for multiple years, not just for two years as specified by my rolling window. In addition, my mean value just keep on increasing.
Would anyone know what I have done wrong? Thank you very much in advance!
Related Posts with Idiosyncratic Volatility - Rolling Window
Coefplot - colorDear all, I am using coefplot to display the coefficient estimates of one variable from differen…
Graph Combine: One big graph with multiple small graphs on one sideHi, I struggle to build a graph that looks like this (I used my advanced MS Paint skills here): Arra…
Sample size calculations for a non-inferiority trialHi Listers, I need to calculate the sample necessary for a non-inferiority trial where we are compa…
Coefplot interaction term - loop multiple sample, label x axisDear all, I am estimating the coefficient of an interaction term for multiple samples. These sample…
Why these clusterings are different?Hello. I have a question: why the below results are different? what is the meaning of each of the c…
Subscribe to:
Post Comments (Atom)
0 Response to Idiosyncratic Volatility - Rolling Window
Post a Comment