The researchers explained that this is due to something called "social projection," in which people's own current feelings and inclinations heavily influence their assessment of others' state of mind and preferences.

This means that an investor who is scared assumes that other investors are also scared and that their fears will drive stock prices lower, prompting the investor to sell early, said study co-author Eduardo Andrade, an associate professor in the business school at the University of California, Berkeley.

"If I'm scared, I tend to project that you are scared," he said in a university news release. "If I feel like selling, I project that you are also going to sell, and that pushes me to sell earlier rather than later in anticipation of a drop in stock value."

In this study, the researchers examined whether emotions completely unrelated to the stock market could influence investor behavior. They had one group of volunteers watch horror movies while another group watched documentaries about Benjamin Franklin and Vincent Van Gogh.

After watching the movies, the volunteers participated in a stock market simulation experiment. Those who watched the horror movies were more likely to sell early than those who watched the documentaries, the investigators found.

But fear triggered early selling only when participants were told that the value of the stock was affected by other people, not when they were told the stock value was randomly determined by a computer, where social projection was not a factor.

The findings suggest that being able to control fear is beneficial for investors.

"Generally speaking, those who made more money were those who decided to stay longer in the simulation game," Andrade said.

The study is published in the November issue of the Journal of Marketing Research.