# Incorporating idiosyncratic risk as a pricing factor with GMM

Suppose we are given a dataset with $$T$$ time periods and $$N$$ assets or portfolios. We are interested in estimating and testing an augmented CAPM or a multifactor model with an additional factor: the asset's idiosyncratic volatility. In the case of the augmented CAPM, the model is $$\mu^*_{i}=\beta_i \mu^*_{m}+\gamma\sigma_i^2 \tag{4}$$ where $$\mu^*_i:=(\mu_{i,t}-r_{f,t})$$ is firm's $$i$$ expected excess return, $$\mu^*_{m}:=(\mu_{m,t}-r_{f,t})$$ is the market's expected excess return and $$\sigma_i^2$$ is the idiosyncratic risk of asset $$i$$ w.r.t. to the CAPM.$$\color{red}{^*}$$ That is, $$\sigma_i^2$$ is the error variance of a time series regression $$r^*_{i,t}=\alpha_i+\beta_i r^*_{m,t}+\varepsilon_{i,t}. \tag{2}$$ We could estimate the model Fama-MacBeth style as discussed in this thread. However, I want to do that using the GMM. How would I set that up?

$$\color{red}{^*}$$For simplicity, $$\mu^*_i$$, $$\mu^*_{m}$$ and $$\sigma_i^2$$ are assumed to be constant over time.

If we were to estimate a simple CAPM by GMM, we could use the equation $$(12.23)$$ from Cochrane "Asset Pricing" (2005) section 12.2 (p. 241). In his notation, the moments are $$g_T(b) = \begin{bmatrix} E(R^e_t-a-\beta f_t) \\ E[(R^e_t-a-\beta f_t)f_t] \\ E(R^e-\beta \lambda) \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix} \tag{12.23}$$ where $$R^e_t=(R^e_{1,t},\dots,R^e_{N,t})'$$ is a vector of individual assets' excess returns, $$\beta=(\beta_1,\dots,\beta_N)'$$ is a vector of betas, $$f_t$$ is factor's excess return and $$\lambda=E(f)$$ is the expected value of the factor's excess return. The first two rows correspond to time series regressions for $$N$$ assets (one regression per asset) that facilitate estimation of the $$\beta$$ vector, so there are actually $$2N$$ conditions. If I understand correctly, the third row corresponds to another $$N$$ conditions (one per asset) of time-averaged returns that are used for testing the model: $$E_T(R^{ei})=\beta_i' \lambda, \quad i=1,2,\dots,N. \tag{12.10'}$$ ($$(12.10)$$ is specified for potentially many factors, but $$(12.23)$$ considers the simple case of a single factor, so vector $$\beta'$$ turns into scalar $$\beta$$, and the same holds for $$\lambda$$.)
If we incorporate idiosyncratic risk as another factor, we obtain the following: $$\tilde g_T(b) = \begin{bmatrix} E(R^e_t-a-\beta f_t) \\ E[(R^e_t-a-\beta f_t)f_t] \\ E[(R^e_t-a-\beta f_t)^2-\sigma^2] \\ E(R^e-\beta\lambda-\gamma\sigma^2) \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \end{bmatrix} \tag{*}$$ where $$\sigma^2=(\sigma^2_1,\dots,\sigma^2_N)'$$ is a vector of idiosyncratic variances. The third row facilitates estimation of the $$\sigma^2$$ vector and the fourth row again is a set of $$N$$ conditions for testing the model. Does that make sense?