Everyone caught in the meltdown of financial markets in 2007 wishes they had gotten out before the bubble burst. And some did. These investors view the markets as a high-stakes game gauging when to exit to gain the best return. New research using an innovative cloud-based technology suggests that high earners have brain patterns that can predict market bubbles.

Scientists from the Virginia Tech Carilion Research Institute and Caltech found that price “bubbles” — where the price of something differed drastically from its actual value — formed even during simulations of market conditions. As markets go up, certain groups of investors join in, causing bubbles to grow.

The high earners’ brain activity may represent an early warning signal of an impending stock market crash.

But not all investors stay in the market as it goes ever higher. Remarkably, researchers observed correlations between patterns of brain activity and sensitivity to these bubbles. People who resisted the bubble and stopped investing showed different brain patterns from those who piled on and invested in the bubble.

“Stock market bubbles form when people collectively overvalue something, creating what economist Alan Greenspan once famously called ‘irrational exuberance,’” said senior author Read Montague, director of the Human Neuroimaging Laboratory at Virginia Tech.

“Our experiments showed how the collective behavior of market participants created price bubbles, suggesting that neural activity might offer biomarkers for the evolution of such bubbles.”

Participating investors engaged in pseudo-market sessions while having their brains activity scanned by functional magnetic resonance imaging (fMRI). Price bubbles were observed to form and then crash during every single market session, something the researchers had not expected. Even more surprising were the signature patterns of brain activity observed among the low earners and high earners.

Low earners invested more aggressively based on activity from a specific brain area known as the nucleus accumbens. High earners, those who sold their shares just before a bubble peaked, activated a different brain area, the anterior insular cortex, while making investment decisions.

High earners’ brain activity may represent an early warning signal of an impending stock market crash. At the very least, we now know that the thought processes of high earners and low earners differ significantly.

“It’s notoriously hard to identify stock market bubbles and predict crashes by tracking price fluctuations alone,” Colin Camerer, the study’s other senior author from Caltech said. “This experimental method is ideal for understanding the neuropsychology of bubble formation, because we can control the fundamental values and use both prices and brain activity to figure out why bubbles form and crash.”

And the significance of the findings is not limited to stock market predictions. It can be used to help quantify situations in which people place excessive value on poor choices, such as drug addiction, compulsive gambling, or overeating, the authors say.

The study would not have been possible without the implementation of “hyperscanning.” Hyperscanning is a cloud-based technique that enables multiple subjects in different brain scanners to interact in real time across geographic locations. It allows scientists to study live human interactions whether they occur within the same room or across continents.

“We’re wired to be social,” says Montague. “People are exquisitely sensitive to the social gestures of others, and understanding that sensitivity may provide important clues not just to personal and group interactions, but to mental disorders as well. At the heart of many mental disorders is a deficit in the ability to interact with others.”

The team hopes to continue this line of research in order to explore the promise of mindfulness training in manipulating one’s own brain activity, in addition to other real-world applications.

“The brain can provide us with valuable information about what someone may be perceiving about the market and what they’re likely to do next,” Montague says. “That gut feeling the high earners had? It was all in their heads.”

The study is published in the Proceedings of the National Academy of Sciences.