Hello,
I´m trying to obtain monthly standard deviation of residuals as a proxy for monthly idiosyncratic risk. We analyse 30 german Companies for the Year 2019. Therefore I computed the residuals by using "Fama French Five Factor Model" and calculated the daily standard deviation of residuals.
By using the following Code:
gen mofd = mofd(date)
rangestat(reg) tr MktRF SMB HML RMW CMA, interval (mofd 0 0) by (permno)
gen residual = tr - b_cons - b_MktRF * MkrRF- b_SMB* SMB- b_HML* HML - RMW * b_RMW - CMA * b_CMA
(tr is the daily excess return of a company; MktRF,SMB,HML,RMW,CMA are the independend variable of the FF Model)
egen monthly_sd_resid = sd(residual), by (mofd permno)
Now i obtained the daily standard deviation of residuals. In the next step I want to calculate the monthly data. So i would multiply the daily standard deviation with the square root of the number of trading days in the corresponding month. (square Root of N,with N=trading days of that month)
By using the code:
collapse (sd) SD_Monthly = residual, by (permno mofd)
I simply obtained the daily standard deviation on a monthly basis again. But I need this value multiplied by the square root of trading days of this month to get the monthly SD.
In the Attachment you can find the data I was referring to.
Any help would be highly appreciated. Thank you
Johannes Noever
0 Response to Transform daily standard deviation of residuals to monthly standard deviation of residuals
Post a Comment