Stock Price Predictions with LSTM Neural Networks and Twitter Sentiment

Autor: Marah-Lisanne Thormann, Alexander Silbersdorff, René-Marcel Kruse, Christoph Weisser, Jan Farchmin, Benjamin Säfken
Rok vydání: 2021
Předmět:
Zdroj: Statistics, Optimization & Information Computing. 9:268-287
ISSN: 2310-5070
2311-004X
DOI: 10.19139/soic-2310-5070-1202
Popis: 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.
Databáze: OpenAIRE