function [ S_est ] = S_estimate( param, analysis, excess_returns, factors, factor_type, c_fac, mim_proj_var, mim_base_assets )
% Estimates the S matrix in the GMM asymptotic formula

u_T=get_u_T( param, analysis, excess_returns, factors, factor_type, c_fac, mim_proj_var, mim_base_assets );

S_est=1/size(u_T,1)*(u_T)'*u_T;
% function get_u_T

end

