Skip to main content
Open Access Publications from the University of California


UCLA Electronic Theses and Dissertations bannerUCLA

Incorporation of Potential Sentiment Analysis Variable from Social Media in Stock Price Prediction


Numerous factors impact stock prices. Some of the significant factors are not quantitative, which increases the difficulty for researchers to include them in commonly-used stock price prediction models. Among these non-quantitative factors, the influence of user-generated comments and posts on social media towards specific stocks on stock price is significant. Including these factors in stock price prediction model may improve the overall prediction accuracy. Therefore, this study introduces a flexible stock price prediction framework that includes textual data from social media. This framework can also be extended to most of the models in the stock price prediction field. The basic logic behind this framework is to convert the textual social media contents into a numerical variable - "daily sentiment score", which can be adopted in most of the prediction models. Furthermore, the framework was tested on the close price prediction for five major stocks in the US stock market: Apple, Microsoft, Tesla, Amazon, and Google. Results showed that the prediction accuracy improved for most LSTM models by including the additional sentiment variable. Future studies can be conducted to investigate the relationship between "daily sentiment score" and daily stock price movement.

Main Content
For improved accessibility of PDF content, download the file to your device.
Current View