  Accurate predictions of the abundance and clustering of dark matter haloes
play a key role in testing the standard cosmological model. Here, we
investigate the accuracy of one of the leading methods of connecting the
simulated dark matter haloes with observed galaxies -- the Halo Abundance
Matching (HAM) technique. We show how to choose the optimal values of the mass
and force resolution in large-volume N-body simulations so that they provide
accurate estimates for correlation functions and circular velocities for haloes
and their subhaloes -- crucial ingredients of the HAM method. At the 10%
accuracy, results converge for 50 particles for haloes and 150 particles for
progenitors subhaloes. In order to achieve this level of accuracy a number of
conditions should be satisfied. The force resolution for the smallest resolved
(sub)haloes should be in the range (0.1-0.3)rs, where rs is the scale radius of
(sub)haloes. The number of particles for progenitors of subhaloes should be
150. We also demonstrate that the two-body scattering plays a minor role for
the accuracy of N-body simulations thanks to the relatively small number of
crossing-times of dark matter in haloes, and the limited force resolution of
cosmological simulations.
