We present a simple model of a stock market where a random communication structure between agents gives rise to a heavy tails in the distribution of stock price variations in the form of an exponentially truncated power-law, similar to distributions observed in recent empirical studies of high frequency market data. Our model provides a link between two well-known market phenomena: the heavy tails observed in the distribution of stock market returns on one hand and ‘herding’ behavior in financial markets on the other hand. In particular, our study suggests a relation between the excess kurtosis observed in asset returns, the market order flow and the tendency of market participants to imitate each other.