Predicting Stock Price Direction with LSTM: A Fusion of Financial Sentiment Analysis with Technical Indicators
摘要
Stock movement prediction is a crucial field of study that can help traders on the market make better trading decisions and consequently earn more profits. Deep Learning models are increasingly recognized for their ability to make predictions based on time series data. Among traders and investors, technical and sentiment analysis using indicators remains a popular approach in the stock market. In this study, we provide an approach that combines technical and sentiment analysis to generate predictor indicators, which are then used with the proposed model to predict stock movement direction. We conduct a thorough examination of historical stock data, leveraging the TA-Lib package to calculate an array of essential technical indicators. Additionally, we delve into sentiment analysis, capitalizing on sentiment indicators previously computed in a prior study. To fine-tune our models, we employ the powerful optimization tool Optuna. Our study centres on three prominent companies, AAPL, BAC, and MSFT, all of which are integral components of the NASDAQ exchange. We performed a comparative analysis between the baseline models and the proposed LSTM (Long Short-Term Memory) model, evaluating them based on accuracy and robustness measures, in order to evaluate the performance of our model. In addition, to thoroughly assess the differences in results, we devised the Wilcoxon signed rank test. Our results show that there is 17.05% average accuracy improvement by using LSTM model with both technical and sentiment indicators as compared to previous study.