Dear all,
I'm trying to calculate a Stock's Beta with a rolling regression in Stata.(http://www.investopedia.com/articles...ating-beta.asp)
I have the variables "permno" which identifies a stock (Company), "date" (a specific day of each month for the stock price), "retx" (the return of the stock on this day compared to previous month, and sprtrn (the return of the S&P500 in the same period of time)
For calculating Beta I want to regress retx on sprtrn historically for 60 months using rollreg (that's what my master thesis supervisor demands ;-) )
This is what I did so far:
Unfortunately it says too many values, and too many gaps?
The data ranges from 1987 to 2015, with monthly datapoint for thousand of companies, so it is a big sample...
Can anyone help me with this issue? And is the command correct anyways?
I would really appreciate your help!
Thank you in advance
I'm trying to calculate a Stock's Beta with a rolling regression in Stata.(http://www.investopedia.com/articles...ating-beta.asp)
I have the variables "permno" which identifies a stock (Company), "date" (a specific day of each month for the stock price), "retx" (the return of the stock on this day compared to previous month, and sprtrn (the return of the S&P500 in the same period of time)
For calculating Beta I want to regress retx on sprtrn historically for 60 months using rollreg (that's what my master thesis supervisor demands ;-) )
This is what I did so far:
Code:
tsset permno date panel variable: permno (unbalanced) time variable: date, 30jan1987 to 31dec2015, but with gaps delta: 1 day . rollreg retx sprtrn, move(60) stub(Beta) Number of gaps in sample: 2496327 Observations with preceding time gapstoo many values r(134);
The data ranges from 1987 to 2015, with monthly datapoint for thousand of companies, so it is a big sample...
Can anyone help me with this issue? And is the command correct anyways?
I would really appreciate your help!
Thank you in advance
Comment