linearmodels.asset_pricing.model.LinearFactorModelGMM.fit

LinearFactorModelGMM.fit(*, center: bool = True, use_cue: bool = False, steps: int = 2, disp: int = 10, max_iter: int = 1000, cov_type: str = 'robust', debiased: bool = True, starting: ndarray | DataArray | DataFrame | Series | None = None, opt_options: dict[str, Any] | None = None, **cov_config: bool | int | str) GMMFactorModelResults[source]

Estimate model parameters

Parameters:
center: bool = True

Flag indicating to center the moment conditions before computing the weighting matrix.

use_cue: bool = False

Flag indicating to use continuously updating estimator

steps: int = 2

Number of steps to use when estimating parameters. 2 corresponds to the standard efficient GMM estimator. Higher values will iterate until convergence or up to the number of steps given

disp: int = 10

Number of iterations between printed update. 0 or negative values suppresses output

max_iter: int = 1000

Maximum number of iterations when minimizing objective. Must be positive.

cov_type: str = 'robust'

Name of covariance estimator

debiased: bool = True

Flag indicating whether to debias the covariance estimator using a degree of freedom adjustment

starting: ndarray | DataArray | DataFrame | Series | None = None

Starting values to use in optimization. If not provided, 2SLS estimates are used.

opt_options: dict[str, Any] | None = None

Additional options to pass to scipy.optimize.minimize when optimizing the objective function. If not provided, defers to scipy to choose an appropriate optimizer. All minimize inputs except fun, x0, and args can be overridden.

**cov_config: bool | int | str

Additional covariance-specific options. See Notes.

Returns:

Results class with parameter estimates, covariance and test statistics

Return type:

linearmodels.asset_pricing.results.GMMFactorModelResults

Notes

The kernel covariance estimator takes the optional arguments kernel, one of “bartlett”, “parzen” or “qs” (quadratic spectral) and bandwidth (a positive integer).