2

I'm writing a term paper, where we need to compare the Fama-French 5-factor model and a q-factor model. For the empirical part, I'm using the Python-based Linearmodels library by Kevin Sheppard.

My problem is that I should perform a GRS test (Gibbon, Ross and Shanken (1989)) on the models, but I just can't figure this one out.

The GRS test equation is: $$\frac{T-N-1}{N}\left[1+\left(\frac{E_{T}[f]}{\hat{\sigma}_{T}(f)}\right)^{2}\right]^{-1} \hat{\mathbb{\alpha}}^{\prime} \hat{\Sigma}^{-1} \hat{\mathbb{\alpha}} \sim F_{N, T-N-1}$$

Here are the attributes we get from Linearmodels https://bashtage.github.io/linearmodels/asset-pricing/asset-pricing/linearmodels.asset_pricing.results.LinearFactorModelResults.html#linearmodels.asset_pricing.results.LinearFactorModelResults

The J statistic in Linearmodels library is defined as $J=\hat{\alpha}^{\prime} \hat{\Sigma}_{\alpha}^{-1} \hat{\alpha}^{\prime}$, so that part is probably sorted and the same goes for the first part of the equation. However, the middle part is something I can't figure out... Can someone help me with this?

  • This post by Matthew Gunn gives a slightly different formulation of the GRS test where the "middle part" is expressed in matrix form, a bit easier to understand. https://quant.stackexchange.com/questions/35690/choosing-the-right-statistical-test-for-mutual-fund-performance-evaluation/35693#35693 May be equivalent to what you have, I am not sure. – nbbo2 Jan 10 '22 at 11:31

1 Answers1

2

If by the middle part you refer to

$$\bigg[1 + \bigg(\frac{E_T[f]}{\hat{\sigma}_T(f)}\bigg)^2 \bigg]^{-1},$$

then I believe that $E_T[f]$ is the mean of the excess factor returns and $\hat{\sigma}_T(f)$ is the standard deviation of the excess factor returns. As everything is scalar, it is just simple inverse. Python implementation shouldn't be too difficult.

j4bert0
  • 41
  • 3
  • I conceptually understand, but it's the practical implementation that is confusing me. Is the term $E_{T}[f]$ the betas so in my case 49 x 4 matrix (49 portfolios & q-factor model) or 49 x 5 (49 portfolios & ff 5-factor model)? In Lianearmodels res.betas?

    And what about the standard deviation $\hat{\sigma}_{T}(f)$? Is it the standard errors of the parameters? In Linearmodels res.std_errors?

    – Alex Günsberg Jan 10 '22 at 08:29
  • $f$ is a time series of excess factor returns, that is, factor returns minus the risk free rate. Then $E_T[f]$ would be a mean of that time series and $\hat{\sigma}_T(f)$ its standard deviation. So, no betas or other regression parameters involved. It seems that the confusion is partly caused by you trying to do the GRS for multiple factors, but your notation is for a single factor. I suggest you follow the link provided by noob2, which has the GRS formulated for multiple factors. – j4bert0 Jan 10 '22 at 10:19