Cargando…

Prediction of stock price direction using the LASSO-LSTM model combines technical indicators and financial sentiment analysis

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 ar...

Descripción completa

Detalles Bibliográficos
Autores principales: Yang, Junwen, Wang, Yunmin, Li, Xiang
Formato: Online Artículo Texto
Lenguaje:English
Publicado: PeerJ Inc. 2022
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9680880/
https://www.ncbi.nlm.nih.gov/pubmed/36426260
http://dx.doi.org/10.7717/peerj-cs.1148
_version_ 1784834502082691072
author Yang, Junwen
Wang, Yunmin
Li, Xiang
author_facet Yang, Junwen
Wang, Yunmin
Li, Xiang
author_sort Yang, Junwen
collection PubMed
description 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.
format Online
Article
Text
id pubmed-9680880
institution National Center for Biotechnology Information
language English
publishDate 2022
publisher PeerJ Inc.
record_format MEDLINE/PubMed
spelling pubmed-96808802022-11-23 Prediction of stock price direction using the LASSO-LSTM model combines technical indicators and financial sentiment analysis Yang, Junwen Wang, Yunmin Li, Xiang PeerJ Comput Sci Artificial Intelligence 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. PeerJ Inc. 2022-11-16 /pmc/articles/PMC9680880/ /pubmed/36426260 http://dx.doi.org/10.7717/peerj-cs.1148 Text en ©2022 Yang et al. https://creativecommons.org/licenses/by/4.0/This is an open access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/) , which permits unrestricted use, distribution, reproduction and adaptation in any medium and for any purpose provided that it is properly attributed. For attribution, the original author(s), title, publication source (PeerJ Computer Science) and either DOI or URL of the article must be cited.
spellingShingle Artificial Intelligence
Yang, Junwen
Wang, Yunmin
Li, Xiang
Prediction of stock price direction using the LASSO-LSTM model combines technical indicators and financial sentiment analysis
title Prediction of stock price direction using the LASSO-LSTM model combines technical indicators and financial sentiment analysis
title_full Prediction of stock price direction using the LASSO-LSTM model combines technical indicators and financial sentiment analysis
title_fullStr Prediction of stock price direction using the LASSO-LSTM model combines technical indicators and financial sentiment analysis
title_full_unstemmed Prediction of stock price direction using the LASSO-LSTM model combines technical indicators and financial sentiment analysis
title_short Prediction of stock price direction using the LASSO-LSTM model combines technical indicators and financial sentiment analysis
title_sort prediction of stock price direction using the lasso-lstm model combines technical indicators and financial sentiment analysis
topic Artificial Intelligence
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9680880/
https://www.ncbi.nlm.nih.gov/pubmed/36426260
http://dx.doi.org/10.7717/peerj-cs.1148
work_keys_str_mv AT yangjunwen predictionofstockpricedirectionusingthelassolstmmodelcombinestechnicalindicatorsandfinancialsentimentanalysis
AT wangyunmin predictionofstockpricedirectionusingthelassolstmmodelcombinestechnicalindicatorsandfinancialsentimentanalysis
AT lixiang predictionofstockpricedirectionusingthelassolstmmodelcombinestechnicalindicatorsandfinancialsentimentanalysis