arch.covariance.kernel.Parzen¶

class arch.covariance.kernel.Parzen(x, bandwidth=None, df_adjust=0, center=True, weights=None, force_int=False)[source]

Parzen’s kernel covariance estimation.

Parameters
xnumpy:array_like

The data to use in covariance estimation.

bandwidthfloat, default None

The kernel’s bandwidth. If None, optimal bandwidth is estimated.

df_adjustint, default 0

Degrees of freedom to remove when adjusting the covariance. Uses the number of observations in x minus df_adjust when dividing inner-products.

centerbool, default True

A flag indicating whether x should be demeaned before estimating the covariance.

weightsnumpy:array_like, default None

An array of weights used to combine when estimating optimal bandwidth. If not provided, a vector of 1s is used. Must have nvar elements.

force_intbool, default False

Force bandwidth to be an integer.

Notes

The kernel weights are computed using

$\begin{split}w=\begin{cases}1-6z^{2}\left(1-z\right) & z\leq\frac{1}{2} \\ 2\left(1-z\right)^{3} & \frac{1}{2}<z\leq1 \\ 0 & z>1 \end{cases}\end{split}$

where $$z=\frac{h}{H}, h=0, 1, \ldots, H$$ where H is the bandwidth.

Attributes
bandwidth

The bandwidth used by the covariance estimator.

bandwidth_scale

The power used in optimal bandwidth calculation.

centered

Flag indicating whether the data are centered (demeaned).

cov

The estimated covariances.

force_int

Flag indicating whether the bandwidth is restricted to be an integer.

kernel_const

The constant used in optimal bandwidth calculation.

kernel_weights

Weights used in covariance calculation.

name

The covariance estimator’s name.

opt_bandwidth

Estimate optimal bandwidth.

rate

The optimal rate used in bandwidth selection.

Methods

Properties

 bandwidth The bandwidth used by the covariance estimator. bandwidth_scale The power used in optimal bandwidth calculation. centered Flag indicating whether the data are centered (demeaned). cov The estimated covariances. force_int Flag indicating whether the bandwidth is restricted to be an integer. kernel_const The constant used in optimal bandwidth calculation. kernel_weights Weights used in covariance calculation. name The covariance estimator’s name. opt_bandwidth Estimate optimal bandwidth. rate The optimal rate used in bandwidth selection.