Return to search

Portfolio investment strategy based on Twitter sentiment

This paper investigates if it is possible to create a portfolio investment strategy by looking at the sentiment (i.e. are they positive or negative) of twitter data for ten companies, five IT companies and five fashion companies. 764 340 tweets were collected during the study which spanned 60 trading days, and of those tweets, 483 946 where from the IT companies and the rest from the fashion companies. The tweets were collected in a Python program using Twitters API, and then analyzed and classified in another Python program using three different Naive Bayes classifiers that had been trained on a training set consisting of positive and negative text. The sentiment results were then used to create two different portfolios where one was based solely on sentiment and the other one was a combination of sentiment and market capitalization, the ratio used was determined by testing. Those portfolios were then compared against a market capitalization portfolio and a Sharpe portfolio. I found that for the IT companies the portfolio based solely on sentiment performed decently, but was the worst of the four portfolios. The combination portfolio performed well and when comparing it to the Sharpe portfolio and the market capitalization portfolio, it might even be the preferable strategy depending on the investor’s appetite for risk as it had the highest ratio between return and standard deviation. For the fashion companies the sentiment portfolio performed very poorly. The combination portfolio performed decently, but that was only because it consisted mainly (85%) of the market capitalization portfolio which performed the best of all strategies and thereby “saving” the combination portfolio. The poor performance of the sentiment portfolio for the fashion companies might in part be explained by the fact that there were almost twice as many tweets for the IT companies, making the sentiment less accurate and less reliable for the fashion companies when compared to sentiment of the IT companies. It might also be that there is more irrelevant stuff being tweeted about when it comes to the fashion companies, causing the sentiment portfolio to performworse.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:umu-136679
Date January 2017
CreatorsLohman, Pontus
PublisherUmeå universitet, Institutionen för matematik och matematisk statistik
Source SetsDiVA Archive at Upsalla University
LanguageEnglish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess

Page generated in 0.0016 seconds