# linearmodels.asset_pricing.model.LinearFactorModel¶

class linearmodels.asset_pricing.model.LinearFactorModel(portfolios: , factors: , *, risk_free: bool = False, sigma: = None)[source]

Linear factor model estimator

Parameters:
portfolios:

Test portfolio returns (nobs by nportfolio)

factors:

Priced factor returns (nobs by nfactor)

risk_free: bool = False

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.

sigma: = None

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$$.

Methods

 fit([cov_type, debiased]) Estimate model parameters from_formula(formula, data, *[, portfolios, ...]) param formula: Formula modified for the syntax described in the notes

Properties