Risk Aversion and Herd Behavior in Financial Markets