# linearmodels.asset_pricing.model.LinearFactorModel¶

class LinearFactorModel(portfolios, factors, *, risk_free=False, sigma=None)[source]

Linear factor model estimator

Parameters
portfoliosarray_like

Test portfolio returns (nobs by nportfolio)

factorsarray_like

Priced factor returns (nobs by nfactor)

risk_freebool, optional

Flag indicating whether the risk-free rate should be estimated from returns along other risk premia. If False, the returns are assumed to be excess returns using the correct risk-free rate.

sigmaarray_like, optional

Positive definite residual covariance (nportfolio by nportfolio)

Notes

Implements a 2-step estimator of risk premia, factor loadings and model tests.

The first stage model estimated is

$r_{it} = c_i + f_t \beta_i + \epsilon_{it}$

where $$r_{it}$$ is the return on test portfolio i and $$f_t$$ are the traded factor returns. The parameters $$c_i$$ are required to allow non-traded to be tested, but are not economically interesting. These are not reported.

The second stage model uses the estimated factor loadings from the first and is

$\bar{r}_i = \lambda_0 + \hat{\beta}_i^\prime \lambda + \eta_i$

where $$\bar{r}_i$$ is the average excess return to portfolio i and $$\lambda_0$$ is only included if estimating the risk-free rate. GLS is used in the second stage if sigma is provided.

The model is tested using the estimated values $$\hat{\alpha}_i=\hat{\eta}_i$$.

Attributes
formula

Methods

 fit([cov_type, debiased]) Estimate model parameters from_formula(formula, data, *[, portfolios, …]) Parameters

Methods

 fit([cov_type, debiased]) Estimate model parameters from_formula(formula, data, *[, portfolios, …]) Parameters

Properties