This function provides the GMM estimates of factors' risk prices under the linear SDF framework (including the common intercept).
SDF_gmm(R, f, W)The return of SDF_gmm is a list of the following elements:
lambda_gmm: Risk price estimates;
mu_f: Sample means of factors;
Avar_hat: Asymptotic covariance matrix of GMM estimates (see Details);
R2_adj: Adjusted cross-sectional \(R^2\);
S_hat: Spectral matrix.
A matrix of test assets with dimension \(t \times N\), where \(t\) is the number of periods and \(N\) is the number of test assets;
A matrix of factors with dimension \(t \times k\), where \(k\) is the number of factors and \(t\) is the number of periods;
Weighting matrix in GMM estimation (see Details).
We follow the notations in Section I of bryzgalova2023bayesian;textualBayesianFactorZoo. Suppose that there are \(K\) factors, \(f_t = (f_{1t},...,f_{Kt})^\top, t=1,...,T\). The returns of \(N\) test assets are denoted by \(R_t = (R_{1t},...,R_{Nt})^\top\).
Consider linear SDFs (\(M\)), that is, models of the form \(M_t = 1- (f_t -E[f_t])^\top \lambda_f\).
The model is estimated via GMM with moment conditions
$$E[g_t (\lambda_c, \lambda_f, \mu_f)] =E\left(\begin{array}{c} R_t - \lambda_c 1_N - R_t (f_t - \mu_f)^\top \lambda_f \\ f_t - \mu_f \end{array} \right) =\left(\begin{array}{c} 0_N \\ 0_K \end{array} \right)$$ and the corresponding sample analog function \( g_T (\lambda_c, \lambda_f, \mu_f) = \frac{1}{T} \Sigma_{t=1}^T g_t (\lambda_c, \lambda_f, \mu_f)\). Different weighting matrices deliver different point estimates. Two popular choices are $$ W_{ols}=\left(\begin{array}{cc}I_N & 0_{N \times K} \\ 0_{K \times N} & \kappa I_K\end{array}\right), \ \ W_{gls}=\left(\begin{array}{cc} \Sigma_R^{-1} & 0_{N \times K} \\ 0_{K \times N} & \kappa I_K\end{array}\right), $$ where \(\Sigma_R\) is the covariance matrix of returns and \(\kappa >0\) is a large constant so that \(\hat{\mu}_f = \frac{1}{T} \Sigma_{t=1}^{T} f_t \).
The asymptotic covariance matrix of risk premia estimates, Avar_hat, is based on the assumption that
\(g_t (\lambda_c, \lambda_f, \mu_f)\) is independent over time.
bryzgalova2023bayesianBayesianFactorZoo