We investigate mainly the effect of sentiments on the volatility of Shanghai stock market returns. To be more objective, instead of using direct ones offered in the market, the indices of sentiments for both institutional and individual investors are constructed through a list of original indicators. From empirical results, we find that the stock market volatility is significantly influenced by irrational sentiments for both institutional and individual investors with asymmetric effects in bullish and bearish times. Also, there are enough evidences to suggest important effects of stock market returns and volatility in the formation of irrational sentiments.