This paper describes improvements on methods developed by Burgstahler and Dichev (1997, Earnings management to avoid earnings decreases and losses, Journal of Accounting and Economics, 24(1), pp. 99–126) and Bollen and Pool (2009, Do hedge fund managers misreport returns? Evidence from the pooled distribution, Journal of Finance, 64(5), pp. 2257–2288) to test for earnings management by identifying discontinuities in distributions of scaled earnings or earnings forecast errors. While existing methods use preselected bandwidths for kernel density estimation and histogram construction, the proposed test procedure addresses the key problem of bandwidth selection by using a bootstrap test to endogenise the selection step. The main advantage offered by the bootstrap procedure over prior methods is that it provides a reference distribution that cannot be globally distinguished from the empirical distribution rather than assuming a correct reference distribution. This procedure limits the researcher's degrees of freedom and offers a simple procedure to find and test a local discontinuity. I apply the bootstrap density estimation to earnings, earnings changes, and earnings forecast errors in US firms over the period 1976–2010. Significance levels found in earlier studies are greatly reduced, often to insignificant values. Discontinuities cannot be detected in analysts’ forecast errors, while such findings of discontinuities in earlier research can be explained by a simple rounding mechanism. Earnings data show a large drop in loss aversion after 2003 that cannot be detected in changes of earnings.