Summary The paper develops a new heteroskedasticity and autocorrelation robust test in a time series setting. The test is based on a series long-run variance matrix estimator that involves projecting the time series of interest onto a set of orthonormal bases and using the sample variance of the projection coefficients as the long-run variance estimator. When the number of orthonormal bases K is fixed, a finite-sample-corrected Wald statistic converges to a standard F distribution. When K grows with the sample size, the usual uncorrected Wald statistic converges to a chi-square distribution. We show that critical values from the F distribution are second-order correct under the conventional increasing smoothing asymptotics. Simulations show that the F approximation is more accurate than the chi-square approximation in finite samples.