Hi,
I am trying to calculate the idiosyncratic volatility of each stock of my sample. In other words, I am trying to find the standard deviation of the error term of the following regression:
Once the variance is found for each stock ("permno"), I'd like to save it as a new variable "idiosync_vol". I'd like to save the coefficient on "Mkt" for each stock and name it "beta".
Here is a small sample of the data I have:
thanks for your help
I am trying to calculate the idiosyncratic volatility of each stock of my sample. In other words, I am trying to find the standard deviation of the error term of the following regression:
Code:
bys permno: regress ret mkt
Here is a small sample of the data I have:
Code:
permno daily_date ret Mkt 10090 2-Jan-92 -3.33333 0.040759 10095 2-Jan-92 -2.55474 0.040759 10097 2-Jan-92 -7.14286 0.040759 10100 2-Jan-92 -5.12821 0.040759 10104 2-Jan-92 2.586207 0.040759 10107 2-Jan-92 2.47191 0.040759 10108 2-Jan-92 -1.98676 0.040759 10114 2-Jan-92 -1.35135 0.040759 10116 2-Jan-92 -4.13223 0.040759 10119 2-Jan-92 -1.1976 0.040759 26518 20-Feb-92 0.738916 1.381473 26542 20-Feb-92 0.641026 1.381473 26550 20-Feb-92 1.333333 1.381473 26578 20-Feb-92 11.53846 1.381473 26585 20-Feb-92 0.45045 1.381473 26586 20-Feb-92 -2.92398 1.381473 26606 20-Feb-92 1.351351 1.381473 26614 20-Feb-92 1.204819 1.381473 26650 20-Feb-92 -0.86957 1.381473 26681 20-Feb-92 0.9375 1.381473 26710 20-Feb-92 0.350877 1.381473 26711 20-Feb-92 4.477612 1.381473 11508 7-Oct-92 2.702703 -0.71958 11509 7-Oct-92 0.847458 -0.71958 11511 7-Oct-92 10 -0.71958 11522 7-Oct-92 3.773585 -0.71958 11525 7-Oct-92 1.351351 -0.71958 11531 7-Oct-92 -1.78571 -0.71958
Comment