I'm a new beginner to Eviews, here I plan to run a unbalanced panel data regression, the sample period is from 1963 to 2010,
using the daily stock data from CRSP to run a cross-sectional monthly regression; I have write part of eviews code but ran into some problems therefore can not generate results; I not sure where is the problem, here I posted part of my code, hoping that someone can help me to figure out the problem! Thanks!
Code: Select all
create idio u 1 1419783
read d:/yzu/thesis/data/crsp7173.txt date prc cusip $ permco vol ret year month smb hml mktrf rf umd
output d:/yzu/thesis/result/idio6370.txt
series exret = ret - rf 'calculate stock excess return
group idio date year month permco exret mktrf smb hml umd
!counter = 1
for !year = 1971 to 1973 'in order to test whether my code can work or not, I only run the data from 71 to 73.
for !month = 1 to 12
for !cusip = 01650910 to 75471310 'list all cusip # here.
smpl @all cusip=!cusip month=!month year=!year ' I think this line contain some syntax error, but I'm not sure.
equation eq1 '4-factor regression model
eq1.ls exret c mktrf smb hml umd 'run 4-factor regression to generate residual
series residuals = resid
!counter = !counter+1
next
next
next
