  We develop a theory of evolutionary spectra for heteroskedasticity and
autocorrelation robust (HAR) inference when the data may not satisfy
second-order stationarity. Nonstationarity is a common feature of economic time
series which may arise either from parameter variation or model
misspecification. In such a context, the theories that support HAR inference
are either not applicable or do not provide accurate approximations. HAR tests
standardized by existing long-run variance estimators then may display size
distortions and little or no power. This issue can be more severe for methods
that use long bandwidths (i.e., fixed-b HAR tests). We introduce a class of
nonstationary processes that have a time-varying spectral representation which
evolves continuously except at a finite number of time points. We present an
extension of the classical heteroskedasticity and autocorrelation consistent
(HAC) estimators that applies two smoothing procedures. One is over the lagged
autocovariances, akin to classical HAC estimators, and the other is over time.
The latter element is important to flexibly account for nonstationarity. We
name them double kernel HAC (DK-HAC) estimators. We show the consistency of the
estimators and obtain an optimal DK-HAC estimator under the mean squared error
(MSE) criterion. Overall, HAR tests standardized by the proposed DK-HAC
estimators are competitive with fixed-b HAR tests, when the latter work well,
with regards to size control even when there is strong dependence. Notably, in
those empirically relevant situations in which previous HAR tests are
undersized and have little or no power, the DK-HAC estimator leads to tests
that have good size and power.
