Page 1 of 1

Testing Capital Asset Pricing Model (CAPM)

Posted: Tue Mar 17, 2009 8:25 am
by persi868
Hi there

I am new to eviews and would appreciate some step-by-step guidance as to how i can test the CAPM using c. 50 companies with weekly returns over 10 years.

I can run simple regression on each stock using the pooled data function, but i need to then store the Bi from each regression to use in subsequent regressions. I believe I need to store them as a vector but dont know how to do this.

1. Ri - Rf = ai + Bi (Rm - Rf)
2. ri = y0 + y1Bi + y2Bi^2

Can anyone help with this??

Re: Testing Capital Asset Pricing Model (CAPM)

Posted: Tue Mar 17, 2009 8:37 am
by EViews Gareth
I'm not sure I follow exactly what you want to do, but storing the coefficients from a regression into a vector is simple:

vector coefs = eq_name.@coefs

where eq_name is the name of your equation/regression.

Re: Testing Capital Asset Pricing Model (CAPM)

Posted: Mon Apr 27, 2009 11:30 pm
by TheRocK
Hi !

I have a question which is very similar in nature. I have 230 cross-sections and 10 time periods and therefore an (unbalanced) panel. For each time period, I need to calculate the beta from a single-index CAPM in the form of a time series regression:

Ri - Rf = ai + Bi (Rm - Rf)

Using annual data. This regression will give me the beta of for example company 10 in year 1 which I can then plug into my panel regression.

As you can imagine, this takes ages as I have to run the time series regression 10 times for each of the 230 cross-sections. My question is if there is any shortcut to this, maybe a loop function or anything which calculates and stores the annual beta's for me.

All the best and thanks

Kai

Capital Asset Pricing Model (CAPM)

Posted: Fri Mar 12, 2010 9:46 am
by shliman
Hi there,

I am pretty new to Eviews and I have a problem.
I have data for 495 companies and 3 indices from 01/01/2001 to 31/12/2008. I am trying to run the CAPM model for each of these companies and indices and save the Beta coefficients and standard errors into a matrix.
Since there are a lot of companies, I would like to do this in a "for loop" but I really have no idea how.
Can anyone help please?

Simon

Re: Testing Capital Asset Pricing Model (CAPM)

Posted: Fri Mar 12, 2010 10:01 am
by EViews Gareth