We propose extensions of the Box–Pierce (1970) portmanteau autocorrelation test to allow for two generalizations: (i) time series that exhibit unconditional heteroskedasticity and (ii) to test for the presence of autocorrelation only after a fixed lag q. These extensions involve a generalized quadratic form of the Box–Pierce test that uses the heteroskedasticity autocorrelation consistent-type estimator. While we show that this modified test is robust to unconditional heteroskedasticity, the resulting power loss may be substantial. We therefore develop feasible weighted tests that make use of nonparametric estimates of the unobserved variance process. Simulation experiments show that the weighted tests have good size and superior power properties over the unweighted tests.