Stock Prediction Based on Twitter Sentiment Extraction Using BiLSTM-Attention - Dhomas Hatta Fudholi; Royan Abida N. Nayoan; Septia Rani (Indonesian Journal of Electrical Engineering and Informatics (IJEEI), 2022)
A profitable stock price prediction will yield a large profit. According to behavioural economics, other people's emotions and viewpoints have a significant impact on business. One of them is the rise and fall of stock prices. Previous studies have shown that public sentiments retrieved from online information can be very valuable on market trading. In this paper, we propose a model that works well in predicting future stock prices by using public sentiments from social media. The online information used in this research is financial tweets collected from Twitter and the stock prices values retrieved from Yahoo! Finance. We collected tweets related to Netflix Company stocks and the stock prices for the same period which is 5 years from 2015 to 2020 as the dataset. We extracted the sentiment value using VADER algorithm. In this paper, we apply a Bidirectional Long Short-Term Memory (BiLSTM) architecture to achieve our goal. Moreover, we created seven different experiments with different stock price parameters and selected sentiment values combinations and investigated the model by adding an attention layer. We experimented with two different sentiment values, tweet’s compound value and tweet’s compound value multiplied by favorites count. We considered the favorites count as one representation of public sentiments. From the seven experiments, the experiment with Bidirectional Long Short-Term Memory (BiLSTM) - attention model combined with our selected stock price parameters namely close price, open price, and using Twitter sentiment values that are multiplied with the tweet’s favorites count yields a better RMSE result of 2.482e-02 in train set and 2.981e-02 in the test set.