The aim of this paper is to explore herding behaviour among investors to determine its rational and emotional component factors and identify relationships among them. We apply causality tests to evaluate the impact of return and market sentiment on herding intensity. The herding intensity is quantified using the measure developed by Patterson and Sharma (2006). The research was conducted during the period 1997–2003 in the Spanish stock market, where the presence of herding has been confirmed. The results reveal that the herding intensity depends on past returns and sentiment or subjective assessments and confirm the presence of both a rational and an emotional factor.