Sniffing Out Socialbots: The Combustive Potential of Social Media-Based Algorithms

With the high frequency-obsessed trading community, speed is essential. And social media, particularly Twitter, is becoming a key source of high-speed information for feeding trading algorithms.
This post was published on the now-closed HuffPost Contributor platform. Contributors control their own work and posted freely to our site. If you need to flag this entry as abusive, send us an email.

Imagine a damaging rumor about a company that you own shares in is posted on Twitter. Algorithms monitoring social media feeds to gauge market sentiment and act upon news could instantaneously trade billions of dollars worth of these shares, causing the value to plummet. The rumor is entirely untrue but, in the time it takes for an explanation to be published by the company, the damage is done. The stock never fully recovers because the prevailing attitude of the day seems to be "where there is smoke there is fire."

It may sound like science fiction, but it is not. Yesterday's news headlines have been replaced by split-second 140 character Tweets containing both fact and fiction. According to an August 2011 infographic from media agency We Are Social, there are 138,888 Tweets per minute, 180 million posted each day and 1.6 billion search queries per day. There are 200 million Twitter users with 450,000 new accounts created daily.

And Twitter is just one social media site that algorithms can monitor; Facebook, LinkedIn and blogs broadcast information that can be mined to identify meaningful patterns. Layer social media on top of traditional sources of electronic news headlines and the possibilities are endless.

News coming via Twitter can beat the fastest wire service or government agency's alerts. In August 2011 when a magnitude 5.8 earthquake struck the state of Virginia, the first Twitter reports sent from people at the epicenter reached New York about 40 seconds ahead of the quake's first shock waves, said social media company SocialFlow. The flood of messages surrounding the earthquake peaked at 5,500 Tweets per second.

The first Tweets beat the U.S. Geological Survey's conventional seismometers, which normally can take from two to 20 minutes to generate an alert. The agency is now experimenting with Twitter as a faster and cheaper way to track earthquakes, according to the Wall Street Journal.

With the high frequency-obsessed trading community, speed is essential. And social media, particularly Twitter, is becoming a key source of high-speed information for feeding trading algorithms.

We have already seen that some interesting correlations can arise from algorithmic use of social media. In March 2011, Huffington Post blogger, Dan Mirvish and The Atlantic editor, Alexis Madrigal noted a funny trend: when Anne Hathaway was in the news, Warren Buffett's Berkshire Hathaway shares went up. Her appearance in the 2011 Oscars was newsworthy, hence she was in the headlines frequently. The theory? Automated, algorithmic trading programs pick up chatter on the Internet about 'Hathaway' and apply it to the stock market.

The problem with the widespread availability of this information is that it can be misused. In October 2010, U.S. prosecutors nabbed a gang who allegedly used Facebook and Twitter social networking sites to tout stocks in a classic "pump and dump" fraud of about $7 million. The fraud was uncovered during a cocaine-trafficking probe, according to Reuters.

Trading based on information from social networks is a dangerous game, and this pump and dump episode may have been the first warning shot across the bow. Danger lurks when a piece of "news" or trading advice can be posted, Tweeted and re-Tweeted online with no filter. A piece of spurious, market-moving information can be bounced around the world and traded upon by a human being or an algorithm before anyone can say "What the heck... ?"

Twitter mining is becoming the next big thing in algorithmic trading with sentiment analysis being used to try to qualify and quantify the emotional chatter around a particular market. It then gauges whether the feelings for a particular stock or commodity are negative or positive, and uses the information for making trading decisions.

A study by the University of Manchester and Indiana University concluded that the number of "emotional words" on Twitter could be used to predict daily moves in the Dow Jones Industrial Average. A change in emotions expressed online would be followed between two and six days later by a move in the index, the researchers said, and this information let them predict its movements with 87.6 percent accuracy. A U.K. hedge fund, Derwent Capital, liked the idea so much it opened an algorithmic hedge fund that makes trades based on Twitter sentiment.

The question is, can markets be predicted using market sentiment algorithms? As I said in an interview with Advanced Trading in April, I think you could use a Twitter algorithm to get a sentiment reading on particular topics, whether it be revolutions or how people feel about the economy. The problem is that by the time you've got that information, it's more of a trailing indicator rather than a leading indicator. The algorithm could be successful if it were used to track consumer confidence or to gauge consumer reaction to new products and predict sales. But I think a sentiment algorithm is unlikely to be able to deal with unforeseen events, and these are increasingly common.

The biggest threat to markets coming from mining social media could be a new phenomenon known as "socialbots." These are computer-generated and controlled bots -- digital "people" -- who can generate and respond to messages in social media. Researchers from the University of British Columbia recently invaded Facebook with 102 socialbots. They made 3,055 friends in eight weeks, giving them access to 1,085,785 profiles, and allowing them to scrape 250GB of personal data, according to an article on ZDNet.

Because a well-designed bot can fool other social media users, they have the potential to wreak havoc. I have been warning for some time that financial terrorists could use algorithms to manipulate markets for political gain. A socialbot is a type of algorithm that could be used for such terrorism. The only way to prevent this is by using real-time monitoring and surveillance software to spot erratic or anomalous patterns in the marketplace. Exchanges, ECNs, traders, brokers and regulators are already seeing the value in monitoring trades for errors or fraud.

The next step is to monitor social media to ensure that spurious and potentially damaging information cannot influence the markets. Because, whether the information comes from a Reuters news story, exchange data, Twitter feeds or even Facebook, it can be used by an algorithm. A trading algorithm that uses a false piece of information could start an avalanche of wrong decisions cascading down through other algorithms and triggering a flash crash or even a cross-asset splash crash.

Algorithmic trading is a double-edged sword. It can be used for good -- adding liquidity and lowering trading costs. Or it can be used for evil -- financial terrorism or taking down a firm. Only by carefully monitoring markets and trading algorithms in tandem, and by setting concrete parameters that sniff out anomalies, can the evildoers be thwarted.

Popular in the Community