Predicting Stock Market with

trainerhungarianAI and Robotics

Oct 20, 2013 (3 years and 9 months ago)

91 views

Predicting Stock Market with
Twitter Sentiment

















Yingren Zhao

Outline


1. Background


2. Implementation



Retrieve Tweets




Sentiment Analysis




Construct Model

3. Problem I have met


Background



Twitter has become popular.


Emotions can profoundly affect individual
behavior and decision
-
making.


Sentiment tracking technique has made big
progress in the past several years.


Predict movie sales from blogger sentiment


Implementation

1.
Retrieve Tweets


Use $ for specific stock: $
appl
, $
fb
, etc.


Simple approach:

http://
search.twitter.com
/
search.json?q
=$
appl





Sample of Search $
aapl
:



2. Sentiment Analysis


Two approaches:


Natural Language Text Processing


AFINN: a word list for sentiment analysis on Twitter


Natural Language Text Processing API


Tweets: “Apple: Probably Going To Remain Painful For The Average
Investor”


sentiment: neg.


Subjectivity: neutral: 0.2 polar: 0.8


Polarity:
pos
: 0.4
neg

0.6


Use word list : AFINN


A
sentiment lexicon with 2477 English words (including a few
phrases) each labeled with a sentiment strength and targeted towards
sentiment analysis on short
text in social media.

Example:


ability

+2

accept

+1


admit
-
1



How:

Calculate the sentiment value of 15
latest
tweets every 30 seconds

(Another approach is to calculate the latest tweet, which I will test it later.)

4/9 Sentiment Movement of $
aapl

3. Construct the Model

Apple: 426.98
+0.77(0.18%)

Facebook:26.59
-
0.26(
-
0.96%)

Google: 777.65
+2.80 (0.36%)

Microsoft: 29.61
+1.02 (3.57%)




Calculate cross
-
correlation coefficient


Support vector machines


Supervised learning models with associated learning algorithm that analyze data and
recognize patterns.


Granger causality test.


A statistical hypothesis test to decide whether one time series is useful in forecasting
another.


Fuzzy neural network


a learning machine to find the parameters of a fuzzy system.


Problem


Not enough tweets for some stocks


Thank you
for listening.




Any Questions?