Sunday, 1 December 2013

Trading Bitcoin Using Twitter Data

Finding Uses for Twitter Data

One of the more sobering lessons getting this venture up and running has been the process where we demonstrate the software, get loads of great feedback, people use an evaluation account but then at the end of the evaluation are struggling to see how they can actually use the data in their job.  This blog is to cover a very interesting (and potentially very lucrative) use for social media data, accessed through

The usual reasons people like to track and mine social media data which tend to revolve around brand and marketing managers looking to measure the amount of social media chatter there is about their brand, how positive (or negative) it is and how they compare to competitors.  We've also had interest from academic types who like to mine data, particularly in relation to political news to see if there's any correlation between social media data and election results.  But today I'm going to look ways that using social media data can actually be applied to making money directly - which is a much more attractive option.

Trading using Social Media Data

Trading highly liquid equities (in particular ones that are prone to volatile changes in share price) has for some time now been using social media data to help drive decision making - in some cases fully automated - when buy or selling shares.  Just look at the momentary plunge the Dow took when the white house twitter account was hacked and told the world the white house had been bombed.  By the time the world had worked out it was a load of bollocks there would have been plenty of time for the first-in traders to short loads of stock and buy back in when the market had come to it's senses.

Now for the average punter to set up a continuous feed to Gnip or Datasift and have software that can pick out the sentiment of a continuous stream of financial data would be onerous in the least - game, set and match to the banks you'd think.  Well, not quite.   We're currently developing a fully automated alert system for any subject on Twitter where the sentiment and / or volume "spikes" suddenly beyond a certain tolerance level.  This should all be ready to use on a plug-and-play basis from next year.  However, you can already use SocialSamplr as a basis to get pre-cursors for market data and to prove it let's take a look at something that's been in the news in a big way over the last month.


In case you've been living in a mountain cavern over the last month with no access to electricity you can read up about bitcoin here.  What I'm going to show here is how socialsamplr can actually show pre-cursors to movements in the value of bitcoin.  It's a good one to show as it's topical (hence lots of stuff on Twitter about), volatile as buggery and since it's so open there's loads of data floating around about it which is accessible for free.  Needless to say if you do actually use this for trading this will be at 100% your own risks and I'll accept liability for nothing (and you'll need balls of steel, this stuff is very very volatile).  Anyway, let's look at the price history of bitcoin over the last month:

It doesn't take Einstein to see the price climbed in a big way, specifically on the 19th of November and pretty much went north from there.  So now lets take a look at SocialSamplr and some data around this time.  First off let's check out mention volume and sentiment across November (you can query this yourself on the site so can run these for "real" yourself.  Volume when graphed daily largely matches the spike, except you'll see it starts to head north on the 18th of November -  a precursor maybe?  

Volume of Twitter Activity:

Then after that check out the sentiment chart.  

Sentiment Score of Twitter Activity:

Now add in the fact that if you sign up to our enterprise account you can get down to the minute level reporting and you can really measure when and how any "buzz" starts occurring in Twitter.  This is where things really do get interesting.  See the breakdown of hourly stats below (reading through a JSON viewer - at around 11 at on the 17th of November (number 11 in the sequence, the date/times are unix timestamps so need to be converted) you see a big jump in mention volume.  This is followed by an even bigger jump the next hour to 1053.  Sentiment looks more up and down so what we're seeing here is really a combination of volume increase and sentiment volatility.

So then we take a closer look at bitcoin prices around this time.  Now the really big climbs in price aren't happening until well into the 18th and, in fact, even the 19th of November.

So in summary it looks like there is some pretty strong correlation to market movements by activity in Twitter - and in the example above it gives you a full 24 hours to get trading before the price starts to climb.  I think the key thing is social media is a way to try and get the inside running before a big run up or down in price  - once the run has started it's pretty much as useful as tits to a bull since every Tom, Dick and Harry is then tweeting about it.  Personally I don't really see loads of value in paying a PhD in statistics to crunch the data for these purposes - the trend is obvious and it's more a case of moving quickly to maximise the opportunity. There's well documented cases of other stocks (like Netflix) showing a similar correlation.  An example of a stock which wouldn't be so great is the NZ tech darling Xero - the sentiment is consistently 90% positive and pretty much shows no correlation to the share price movements, so it's really a case of horses-for-courses.  We're predicting over time for highly liquid, highly "visible" stocks this will become a fairly standard way of gleaning real-time market data.  We'll keep refining our trading algorithm and with a look at doing some equities investment off the back of it around mid next year - rest assured I will update on how that progresses.

Hope this was of interest (it certainly is to me) - get in touch if you want to look at using socialsamplr yourself to gain insight into market activity.  14 day free trial, best prices around for full access to the Twitter firehose. 

Whatever you do, don't wind up like this guy.

No comments:

Post a Comment