# Fama-Macbeth with Liquidity Sorted Portfolios

I'm currently working on a paper in which I'm trying to see whether the liquidity premium is an observable phenomena when taken into the context of computer games.

From my research online I've found a lot of conflicting answers to the question on how to run a Fama-Macbeth regression. If I understand correctly what needs to be done with N stocks, K factors (this should include the liquidity factor) and T periods:

1. For every N: do a time series regression of the returns of stock N on all K factors. This will give K amount of Beta's from the first step for every stock N.
2. For every T: For every N: Do a cross-sectional regression of the returns in period T on all of the beta's estimated from the first step (these beta's will remain the same for every T), resulting in multiple lambda's for every N stock.

Then in order to extract the risk-premium associated with every factor you simply average all of the Lambda's you have obtained in the second step and deduce your results from this.

However, since there is a lot of conflicting information on how to run this particular regression, I'm not quite sure I fully understand it. Additionally, in a lot of papers such as Ben-Raphael, Kadan and Wohl (2008) I see that they make use of liquidity-sorted portfolios to do their analysis. Is it right for me to assume that this means we are looking at average returns and average factors of all stocks within each of these liquidity-sorted portfolios?

• This answer clarifies how to run the second step: quant.stackexchange.com/questions/24343/… May 2 '18 at 17:52
• Thank you for your reply. I've looked into your response to that thread there, however without any example code or pseudocode I found it hard to wrap my head around it. Would you know of any examples that I could look into? Is my pseudocode how such a regression should be run? May 2 '18 at 23:43