Rolling? betas, how to calculate them

Posts: 22

Rolling? betas, how to calculate them

Hey all,

I am trying to finish up a finance paper, but had a hard time figuring out the beta's for each time period. Any help is appreciated.

Here is what I have,

Date               Port_no               mkt_Liquidity     mkt_return          port_liquidity          port_ret

011980               1                         2.5                    4.2                           4                       3

021980               1                         2.6                    3.2                            5.3               3.2

131980               1                         2.2                    3.5                         3.4                      4.3




112011               1                         3.1                    2.3                              2                    4

011980                2                        2.5                    4.2                              2.2               4.3

021980                2                         2.6                    3.2                             3,2                5.3



112011                 2                     

And the number of portfolio's goes up to 25.

There are two things that I want to do. (i have sort of done the first one)

1) Calculate var(mkt_return - mkt_liquidity) for each time period. Similarly, for all time periods calculate cov(mkt_liquidity, port_liqudity), cov(mkt_liquidity, port_return), cov(mkt_return, port_return).  dividing the covariance's by the variance gives me Betas. so using 'by port_no' i can get a single beta for each port_no.

2) However, I need beta's for each time period for each portfolio. So i what i want to do is, first find beta1 using the first 60 time periods (011980-01985), and then roll it forward to find another beta , by rolling it one period forward (in usual case they could run a regression and find betas,  port_ret= beta1(mkt_return) + beta 2(port_liquidity- mkt_liquidity)). However, my paper structure doesn't allow regression so I have to calculate it for every time period for each port_no. So, the first 60 time periods gets beta for 01985, and i have to roll it one period forward using covariances/variance to get beta for 021985. (This is called the Fama-macbeth approach).

Thanks guys.

Posts: 53

Re: Rolling? betas, how to calculate them


This may be a bit late for you now, but you can get a ready made program in WRDS called I think it does exactly what you are asking. Of course, you will need access to WRDS.


Frequent Contributor
Posts: 75

Re: Rolling? betas, how to calculate them

Hi Sharmas,

I read that you did the fama-macbeth approach. I know that this is a really old post but I'm having some problems with the model too and I'm really panicking. I just want to as if you can give me any suggestion or help.

I'm trying to calculate the risk premium λL using fama-macbeth approach:

Rt = β0 + BFt + βLLt + et

where Rt is a 10X1 vector , Ft is a 4x1 vector, B is a 10x4 matrix, and β0 and βL are 10x1 vector.

Then: E(Rt) = BλF + βLλL

and I have the restriction:

λF = E(Ft) and because of that I also have

β0 = βL *[λL-E(L_t)]

I have do this using generalized method of moments (GMM) but it just does not work. 

I really hope that you may know how to do this.

Many thanks in advance!

Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation