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??
Testing Capital Asset Pricing Model (CAPM)
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Testing Capital Asset Pricing Model (CAPM)
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.
vector coefs = eq_name.@coefs
where eq_name is the name of your equation/regression.
Re: Testing Capital Asset Pricing Model (CAPM)
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
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)
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
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
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13586
- Joined: Tue Sep 16, 2008 5:38 pm
Who is online
Users browsing this forum: No registered users and 2 guests
