Stock prediction using sentiment analysis on tweets

Investing in stocks has been a topic of interest of many due to its high returns compared to other types of investment such as bonds and savings account. However, investing does not come without risks, and the possibility of incurring financial losses is a significant deterrent for many. The unpredi...

Full description

Saved in:
Bibliographic Details
Main Author: Wan, Qian
Other Authors: Erik Cambria
Format: Final Year Project
Language:English
Published: Nanyang Technological University 2023
Subjects:
Online Access:https://hdl.handle.net/10356/166733
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Nanyang Technological University
Language: English
Description
Summary:Investing in stocks has been a topic of interest of many due to its high returns compared to other types of investment such as bonds and savings account. However, investing does not come without risks, and the possibility of incurring financial losses is a significant deterrent for many. The unpredictable nature of potential losses acts as a barrier to entry for many who are not willing to take such risks. Recent studies however have shown that psychological factors such as the public sentiment towards policy changes, new investments, or natural disasters have a significant impact on the stock market's behavior and can be used to predict the price changes of the stock. This study aims to expand on these studies by using 3 natural language processing methods such as Valence Aware Dictionary for Sentiment Reasoning (VADER), Naïve Bayes Classifier, and Bidirectional Encoder Representation from Transformers (BERT). Labelled stock data from Kaggle and self labelled TSLA tweets would be passed through these models which will classify tweets into 3 categories: positive, neutral, and negative. The model that performed the best, BERT, would be used to label a set of unseen TSLA tweets across 6 months and classifying them into their specific categories. After which, Random Forest Classifier would be used to determine if the stock bot should invest or not based on the sentiments predicted using BERT and will be compared against a bot that does not follow BERT’s predictions.