When time series are observed with noise, the popular Augmented Dickeyโ€“Fuller (ADF) unit root test and Johansenโ€™s cointegration test are oversized: the ADF tends to conclude for stationarity too often and Johansenโ€™s test finds too many cointegrating relations. This fact is well-known but no simple solution has been proposed in the literature. In this work, we show why this happens and prove theoretically and by Monte Carlo simulations how three different filtering approaches can significantly improve the performance of the two tests applied to noisy data without harming their properties when observations are free from noise. We show how conclusions can change when using filtered time series in two real applications: one concerning wholesale electricity prices in European countries, and the second warning against pairs trading strategies based on spurious cointegrating relations among stock prices.