
Stock Price Predictions with LSTM Neural Networks and Twitter Sentiment
Author(s) -
Marah-Lisanne Thormann,
Jan Farchmin,
Christoph Weisser,
René-Marcel Kruse,
Benjamin Säfken,
Alexander Silbersdorff
Publication year - 2021
Publication title -
statistics, optimization and information computing
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.297
H-Index - 12
eISSN - 2311-004X
pISSN - 2310-5070
DOI - 10.19139/soic-2310-5070-1202
Subject(s) - sentiment analysis , computer science , stock (firearms) , replicate , stock price , social media , artificial neural network , feature engineering , baseline (sea) , econometrics , artificial intelligence , machine learning , economics , deep learning , series (stratigraphy) , world wide web , engineering , statistics , mathematics , mechanical engineering , paleontology , oceanography , biology , geology
Predicting the trend of stock prices is a central topic in financial engineering. Given the complexity and nonlinearity of the underlying processes we consider the use of neural networks in general and sentiment analysis in particular for the analysis of financial time series. As one of the biggest social media platforms with a user base across the world, Twitter offers a huge potential for such sentiment analysis. In fact, stocks themselves are a popular topic in Twitter discussions. Due to the real-time nature of the collective information quasi contemporaneous information can be harvested for the prediction of financial trends. In this study, we give an introduction in financial feature engineering as well as in the architecture of a Long Short-Term Memory (LSTM) to tackle the highly nonlinear problem of forecasting stock prices. This paper presents a guide for collecting past tweets, processing for sentiment analysis and combining them with technical financial indicatorsto forecast the stock prices of Apple 30m and 60m ahead. A LSTM with lagged close price is used as a baseline model. We are able to show that a combination of financial and Twitter features can outperform the baseline in all settings. The code to fully replicate our forecasting approach is available in the Appendix.