1
$\begingroup$

I'm trying to predict the daily positivity or negativity of stock market value through Twitter.
I researched a lot about this topic and I found this article to start.
Basically, what I've done is get from yahoo finance the date relative to Down Jones and calculate if the day was positive or negative.

For the same date, get all the tweets that contain words like I'm, feel, makes me, in order by collect only the tweets that express a sentiment.

I have a list of words (positive and negative), without score, just words.
For every day analyzed, I create a Python dictionary which has as keys the words of the list and as value a score,calculated in the following way:

score of a word = num of times the word matches tweets in a day /
                  num of total matches of all words

In order to predict the stock market I train naive bayes algorithms as data, the python dictionary with words and relative score and as target 'pos' or 'neg' according to the finance data.

I collected one year of date (from 1-1-2010 to 31-12-2010).
The length of the list of words is 18540.
I'm working with Python 3.4, tweepy and scikit-learn

The classifier doesn't work well and since I'm a novice in this field, I would like ask you if there is something wrong in my procedure or if you have some suggestions to help me.

Any help is appreciated

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.