Using a unique data set that contains the complete ownership structure of the German stock market, we study the momentum and contrarian trading of different investor groups. Foreign investors and financial institutions, and especially mutual funds, are momentum traders, whereas private households are contrarians. Contrarian trading by private households declines with investors' financial sophistication though, as proxied by financial wealth and equity home bias. Observing momentum trading over time, we document substantial increase in sales of loser stocks by foreign and institutional investors during the market downturn of the Great Recession and just before the crash of the momentum strategy in 2009. Finally, our evidence indicates that excessive sales of loser stocks pushed prices below their fundamental value, predicting the relative overperformance of past losers and the reversal of the momentum strategy.