The reliability of established trade classification algorithms that identify the liquidity demander in financial markets transaction data has been questioned due to an increase in the frequency of quote changes. Hence, this paper proposes a new method. While established algorithms rely on an ad hoc assignment of trades to quotes, the new algorithm actively searches for the quote that matches a trade. Using an ideal data set that identities the liquidity demander I impose various deficiencies to simulate more typical data sets and find that the new method considerably outperforms the existing ones, particularly at lower timestamp precisions: at data timestamped to seconds the misclassification rate is reduced by half. These improvements also carry over into empirical applications. A risk-averse investor would pay up to 33 basis points per annum to base her portfolio allocation on transaction cost estimates obtained from the new method instead of the popular Lee-Ready algorithm. The recently proposed interpolation method (Holden and Jacobsen, 2014) and the bulk volume classification algorithm (Easley, de Prado and O’Hara, 2012), on the other hand, do not offer improvements.