Prediction of stock price direction using the LASSO-LSTM model combines technical indicators and financial sentiment analysis
Authors:
Open Access
- 16 November 2022
- journal article
- research article
- Published by PeerJ in PeerJ Computer Science
- Vol. 8, e1148
Abstract
Correctly predicting the stock price movement direction is of immense importance in the financial market. In recent years, with the expansion of dimension and volume in data, the nonstationary and nonlinear characters in finance data make it difficult to predict stock movement accurately. In this article, we propose a methodology that combines technical analysis and sentiment analysis to construct predictor variables and then apply the improved LASSO-LASSO to forecast stock direction. First, the financial textual content and stock historical transaction data are crawled from websites. Then transfer learning Finbert is used to recognize the emotion of textual data and the TTR package is taken to calculate the technical indicators based on historical price data. To eliminate the multi-collinearity of predictor variables after combination, we improve the long short-term memory neural network (LSTM) model with the Absolute Shrinkage and Selection Operator (LASSO). In predict phase, we apply the variables screened as the input vector to train the LASSO-LSTM model. To evaluate the model performance, we compare the LASSO-LSTM and baseline models on accuracy and robustness metrics. In addition, we introduce the Wilcoxon signed rank test to evaluate the difference in results. The experiment result proves that the LASSO-LSTM with technical and sentiment indicators has an average 8.53% accuracy improvement than standard LSTM. Consequently, this study proves that utilizing historical transactions and financial sentiment data can capture critical information affecting stock movement. Also, effective variable selection can retain the key variables and improve the model prediction performance.Keywords
Funding Information
- The Graduate Innovation Research Project of Chongqing Technology and Business University, China (yjscxx2022-112-06)
This publication has 38 references indexed in Scilit:
- Regression Shrinkage and Selection via The Lasso: A RetrospectiveJournal of the Royal Statistical Society Series B: Statistical Methodology, 2011
- Combining multiple feature selection methods for stock prediction: Union, intersection, and multi-intersection approachesDecision Support Systems, 2010
- An Adaptive Network-Based Fuzzy Inference System (ANFIS) for the prediction of stock market return: The case of the Istanbul Stock ExchangeExpert Systems with Applications, 2010
- Efficient market hypothesis in European stock marketsThe European Journal of Finance, 2010
- Hurst exponent and prediction based on weak-form efficient market hypothesis of stock marketsPhysica A: Statistical Mechanics and its Applications, 2008
- More Than Words: Quantifying Language to Measure Firms' FundamentalsThe Journal of Finance, 2008
- Market liquidity as a sentiment indicatorJournal of Financial Markets, 2004
- Random Walks in Stock Market PricesCFA Magazine, 1995
- Principal component analysisChemometrics and Intelligent Laboratory Systems, 1987
- Efficient Capital Markets: A Review of Theory and Empirical WorkThe Journal of Finance, 1970