I have stock return data that contains the variable PERMNO (a 5 digit number that identifies a stock uniquely), RET_n_perc (individual stock's return in percentage), and MktRF (portfolio return less risk free rate). There is also a date variable, and there are multiple date observations for each PERMNO (i.e. a stock with PERMNO 10314 may have 130 different date, RET_n_perc, and MktRF observations). I am attempting to regress RET_n_perc onto MktRF for each PERMNO, and I am able to successfully do this by doing by PERMNO: regress RET_n_perc MktRF.
However, the issue arises when I try to save the coefficients from each regression. No matter what I try, I can only either save the last regression's coefficients or it will be some random values like 0's and 1's.
Any help on this would be greatly appreciated, been racking my mind over this for hours now.
However, the issue arises when I try to save the coefficients from each regression. No matter what I try, I can only either save the last regression's coefficients or it will be some random values like 0's and 1's.
Any help on this would be greatly appreciated, been racking my mind over this for hours now.
Comment