In 1997, when Richard Peterson was a medical school student, he would play poker with a buddy who never seemed short of money. His friend was raking it in trading penny stocks. One day he showed up with a brand new Jeep in the driveway, evidence he was doing something right.
"He was just following rumours on the web," Mr Peterson says, recounting his introduction into the world finance.
As the internet developed from the basic chat rooms of the late 1990s, Mr Peterson knew he wanted to do something with this idea of using social media to gain a market edge. After an 11-year career as a psychiatrist, he raised $1m from friends and colleagues to set up a hedge fund, and a further $750,000 to set up MarketPsych, the tech company behind it.
The Santa Monica-based fund, MarketPsy Capital, used servers that trawl chat rooms, blogs, websites and tweets to determine sentiment on thousands of companies, many of which Mr Peterson would then buy or sell in the stock market.
It might sound like science-fiction, and alarmingly intrusive, but using social media to predict the future has become a popular pursuit in the financial sector.
It has never been so easy to trace what influences our decisions. People Google their questions, tweet their thoughts and post their findings on blogs and Facebook. Now some entrepreneurs are building algorithms to find patterns and make predictions in order to beat the stock market.
Mr Peterson's fund certainly seemed to at first. MarketPsy Capital made 40 per cent returns for the first two years. "Everything seemed straightforward, we were on the success path," he says.
Then, in 2010, the fund lost 8 per cent.
"When the market mood shifted from fear to recovery, our models didn't catch it because they were based on fear," he says. "It was a tough time to read capital."
Johan Bollen, associate professor of informatics and computing at Indiana University in the US, is more sceptical and offers another explanation for the poor results. "How do you filter out the garbage?" he asks. "Even with 80 per cent accuracy, you could be so wrong 20 per cent of the time that it bankrupts you."
Prof Bollen believes there is indeed value in looking at the broader emotional states of society on the internet. But tracking what people are writing about one specific company on social media forums is less useful. "Just because it's relevant doesn't mean it is predictive," he explains.
His study "Twitter Mood Predicts the Market" set out to categorise the mood of tweets through text analysis. The results, published in the Journal of Computational Science in 2011, revealed that a change in calmness online is manifested in market movements, with a strong predictive correlation with the rise and fall of the Dow Jones Industrial Average index.
Despite his doubts about social media stock picking, Prof Bollen believes broader internet mood analysis could lead to something big, and likens the pursuit to the Californian gold rush. He has set up a venture called Guidewave in an attempt to strike gold. "We're looking for hidden societal undercurrents," he says.
As Prof Bollen was doing his research, Bernardo Huberman, director of the social computing research unit at HP Labs, Hewlett-Packard's research unit, began investigating where people direct their attention online.
Prof Huberman, author of The Laws of the Web , is interested in the relationship between what people tweet and what happens in the real world. He calls this "the economics of attention".
"I wanted to look for something that was extremely precise to see if we were predicting accurately â€“ so we chose movies and box office revenues," he says.
Prof Huberman found that analysing what people were tweeting ahead of a movie release predicted box office revenues more accurately than the Hollywood Stock Exchange, a futures exchange linked to the performance of blockbuster movies owned by Cantor Fitzgerald, the broker.
Unsurprisingly, the resultant paper, "Predicting the Future with Social Media", received attention from advertisers keen to manipulate Twitter to increase demand for products.
But it also inspired a group of Dutch entrepreneurs to set up a similar predictor for stock price moves. The idea turned into a prototype with the help of angel investors at Clipit, a Dutch social media monitoring company.
"We primarily use Twitter because it is in real time, is easier to get data and it also has the most explanatory value," says Vincent van Leeuwen, one of the four founders.
Their start-up, called SNTMNT, offers Twitter analysis for retail investors and is in the process of signing a deal with a Dutch bank. Mr van Leeuwen says other interested parties include online brokerage firms. "They are always looking for new tricks to get their clients to make trades," Mr van Leeuwen adds.
Meanwhile in Paris, three traders with backgrounds in behavioural finance, which uses psychology to refine the decisions investors make, run IIBremans, a company offering sentiment analysis of the French CAC40 index.
For several years, Phillippe de Brem and Guillaume Dumans would spend two hours every morning before their day jobs as traders began, scanning the web for bullish or bearish signs on French stocks. They would send out a newsletter making a call on which way the market would move that day. Today the company has an algorithm-based bull-bear index called L'indicateur IIBremans.
Mr Dumans says fund managers who have suffered from poor returns through the financial crisis "want something new and different".
But if it all sounds like alchemy â€“ turning junk on the internet into gold â€“ that is because it is, say sceptics. Prof Bollen and Prof Huberman question whether there is much value in just watching a subset of the Twitterverse such as the financial sector.
"It's one of those things that seems obvious from a superficial point of view," says Prof Bollen. "But you have to ask: why would someone be tweeting about a stock and why would that have more value than other indicators?"
If you know something about the market, you are not going to share it with the world, he adds.
Prof Huberman echoes this: social media is useful as a gauge of public mood only in the broader sense. "Unless George Soros or Warren Buffett are tweeting, those who make up the Twitter population are not the ones moving the market."