Slide 1

Slide 1 text

Predicting the stock market with Twitter Nabil Freeman @nfrmn

Slide 2

Slide 2 text

Hello •  Nabil Freeman •  Co-founder @ Matchchat •  www.matchchat.co.uk •  www.twitter.com/nfrmn

Slide 3

Slide 3 text

About this project •  Hacked together in a weekend •  Research paper by Tushar Rao & Saket Srivastava in Delhi, India •  Soon to be open sourced

Slide 4

Slide 4 text

Theory •  Twitter sentiment reflects investor behavior on the stock market (EMH) •  Real-time thanks to the Streaming API •  Until recently, implementations have been pretty dumb

Slide 5

Slide 5 text

Anne Hathaway •  Berkshire Hathaway prices spike spuriously when Anne is in the media

Slide 6

Slide 6 text

Sentiment analysis Know what the Twitter hivemind thinks

Slide 7

Slide 7 text

Guts of the project •  Mine tweets for large technology stocks (MSFT, AMZN, AAPL, etc.) •  Calculate sentiment for each tweet, and create a trend •  Compare against historical closing price data for each company and find correlation

Slide 8

Slide 8 text

Technology •  Node.js •  ntwitter – github:AvianFlu •  SentiMental – github:thinkroth •  Node Language Detect – github:FGRibreau •  Yahoo Finance API •  MySQL

Slide 9

Slide 9 text

Scan.js •  Tracks an array of symbols on Twitter Streaming API using the $ hashtag •  Strips out any hyperlinks, retweets, copypasta & foreign tweets •  Stores the tweet with metadata in DB

Slide 10

Slide 10 text

Finance.js •  Extract dataset from DB •  Run sentiment analysis on data collection •  Score each Tweet’s sentiment •  Pull CSV from Yahoo Finance and compare the two trend lines

Slide 11

Slide 11 text

:-(

Slide 12

Slide 12 text

Why? •  Scan.js crashed too often •  No dataset = no trends •  Later version with forever.js improved problem, but still no dice

Slide 13

Slide 13 text

Improvements •  Try again with better technologies •  CouchDB (?) •  Understand node.js garbage collection •  Further down the line… •  Optimize sentiment tool for stock market language (bull, bear, dog, etc.) •  Write my own sentiment tool

Slide 14

Slide 14 text

Call for help •  Going to open source it and try again •  Still a Javascript neophyte •  Any help would be appreciated •  Maybe we can all make some $$$

Slide 15

Slide 15 text

Thank you, goodnight, much love [email protected]