Peter Perkins <Peter.PerkinsRemoveThis@mathworks.com> wrote in message <gnmi8m$6n2$1@fred.mathworks.com>...
> Hans Schmidt wrote:
> > Hey folks,
> >
> > I've a question concerning running cross sectioinal regressions in ML and getting regression statistics.
> >
> > Suppose I've a dependent variable Y (100 return observations x 1000 firms) and I've 5 beta coefficients (5x1) that should explain the cross section of Y. So for each one of the 100 return observations, I would like to do a cross sectional regression on the 1000 firms reporting me coefficients, tstats, standard errors and Rsquared.
> >
> > Is there a clever way to do it? The function regress does not seem to work in the case of crosssectional regressions.
>
> Hans, REGRESS will fit any univariate linear regression you want, you just have to create the right design matrix.
>
> You haven't mentioned any predictor variables, but you do mention 5 coefficients, so perhaps you have 5 predictor variables, or four plus an intercept. I'm not an econometrician, but I'm guessing that you have data at 100 times, and you want to model each of the 100 1x1000 vectors of returns as a function of your predictors values at each of those times. What I don't know is if you want common estimates across times for some or all of the coefficients.
>
> If you don't, then you'd just call regress 100 times. If you do, then you'll need to set up an appropriate design matrix. What you're asking for may be a standard thing in financial modelling, but I'm not relly up on that jargon.
>
> Hope this helps.
Hey Peter,
thanks for your assistance.
What I am focussing on is a Procedure of FamaMacbeth. It is a twostage regression model. First you estimate your beta coefficients via a time series regression. Then you use these estimates as explanatory variables for the following cross sectional regressions in order to identify whether they are really priced in the cross section (i.e. they carry a risk premium) or not.
Let me put it the following way:
Assume I have T=100 observations of returns. Furthermore, I have two risk factors (regressors) with each 100 observations. Now I use the first 60 observations to estimate the coefficients via a time series regression. This leaves me with the observations 61 to 100 for cross sectional tests. For this, suppose I have these 61 to 100 for, say, 10 firms. So my cross sectional test would be, whether the two estimated coefficients explain each (61, 62, ..., 100) cross section of stock returns. So I should get 2 (risk factors) * 10 (number of firms) parameter estimates (when excluding a constant) for each cross section.
For example:
Y=normrnd(0.05,0.1,40,10) % cross section of stock returns, 40 dates/10 firms
X=[1.12 0.67] % my coefficients computed used first 60 observations
How can I then run the cross sectional regressions described above?
Thank you very much for your assistance!
