We test a theory of the interaction between investors' heterogeneity, risk, transaction costs, and trading volume We take advantage of the specific nature of trading motives around the distribution of cash dividends, namely the costly trading of tax shields, Consistent with the theory, we show that when trades occur because of differential valuation of cash flows, an increase in risk or transaction costs reduces volume We also show that the nonsystematic risk plays a significant role in determining the volume of trade. Finally, we demonstrate that trading volume is positively related to the degree of heterogeneity and the incentives of the various groups to engage in trading.