arch.unitroot.auto_bandwidth

arch.unitroot.auto_bandwidth(y: Sequence[float | int] | ndarray | Series, kernel: 'ba' | 'bartlett' | 'nw' | 'pa' | 'parzen' | 'gallant' | 'qs' | 'andrews' = 'ba') float[source]

Automatic bandwidth selection of Andrews (1991) and Newey & West (1994).

Parameters:
y: Sequence[float | int] | ndarray | Series

Data on which to apply the bandwidth selection

kernel: 'ba' | 'bartlett' | 'nw' | 'pa' | 'parzen' | 'gallant' | 'qs' | 'andrews' = 'ba'

The kernel function to use for selecting the bandwidth

  • ”ba”, “bartlett”, “nw”: Bartlett kernel (default)

  • ”pa”, “parzen”, “gallant”: Parzen kernel

  • ”qs”, “andrews”: Quadratic Spectral kernel

Returns:

The estimated optimal bandwidth.

Return type:

float