The summary, comparison and re-projection of a covariance forecast evaluation: private API
PortfolioOptimisers.newey_west_variance — Function
newey_west_variance(d::VecNum, lags::Integer)Bartlett-kernel long-run variance of a series, at lags lags.
$\hat{\omega}^2 = \hat{\gamma}_0 + 2 \sum_{k=1}^{\ell} (1 - k / (\ell + 1))\, \hat{\gamma}_k$, with $\hat{\gamma}_k$ the sample autocovariance at lag $k$ about the sample mean, divided by the length of the series.
Arguments
d: The series.lags: Number of lags, $\ell$.
Returns
omega2::Number: The long-run variance.
Related