linearmodels.asset_pricing.covariance.KernelCovariance

class KernelCovariance(xe, *, jacobian=None, inv_jacobian=None, kernel=None, bandwidth=None, center=True, debiased=False, df=0)[source]

Heteroskedasticity-autocorrelation (HAC) robust covariance estimator

Parameters
xendarray

The scores (moment) conditions.

jacobianndarray

Jacobian. One and only one of jacobian and inv_jacobian must be provided.

inv_jacobianndarray

Inverse jacobian. One and only one of jacobian and inv_jacobian must be provided.

kernelstr

Kernel name. See notes for available kernels. The default is “bartlett”.

bandwidthint

Non-negative integer bandwidth. If None, the optimal bandwidth is estimated.

centerbool

Flag indicating to center the scores when computing the covariance.

debiasedbool

Flag indicating to use a debiased estimator.

dfint

Degree of freedom value ot use if debiasing.

Attributes
bandwidth

Bandwidth used in estimation

config
cov

Compute parameter covariance

inv_jacobian

Inverse Jacobian

jacobian

The Jacobian

kernel

Kernel used in estimation

s

Score/moment condition covariance

square

Flag indicating if jacobian is square

Methods

Properties

bandwidth

Bandwidth used in estimation

config

cov

Compute parameter covariance

inv_jacobian

Inverse Jacobian

jacobian

The Jacobian

kernel

Kernel used in estimation

s

Score/moment condition covariance

square

Flag indicating if jacobian is square