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
Metan – override pooled effect with user-defined pooled estimate in forest plotDear All, I ran a meta-analysis using robust variance estimation. To display the forest plot, I use…
High specificity in a ROC model with the lroc commandI am new to the ROC analysis, but I need to learn for my biomakers analysis. I am trying to see if s…
Need help Mixed effect model for my PhD projectHello everyone, I will really appreciate if you kindly suggest me how to develop correct Mixed Effe…
PanelHello, everyone. I have a panel dataset consisting of two survey waves, and I am running fixed effe…
Generate correlation as variableHi everyone, I am running a cross-sectional random effects regression. And I want to generate a new…
Subscribe to:
Post Comments (Atom)
0 Response to Idiosyncratic Volatility - Rolling Window
Post a Comment