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

PeerJ Computer Science Pub Date : 2022-11-16 eCollection Date: 2022-01-01 DOI:10.7717/peerj-cs.1148
Junwen Yang, Yunmin Wang, Xiang Li
{"title":"Prediction of stock price direction using the LASSO-LSTM model combines technical indicators and financial sentiment analysis.","authors":"Junwen Yang,&nbsp;Yunmin Wang,&nbsp;Xiang Li","doi":"10.7717/peerj-cs.1148","DOIUrl":null,"url":null,"abstract":"<p><p>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.</p>","PeriodicalId":503620,"journal":{"name":"PeerJ Computer Science","volume":" ","pages":"e1148"},"PeriodicalIF":0.0000,"publicationDate":"2022-11-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9680880/pdf/","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"PeerJ Computer Science","FirstCategoryId":"94","ListUrlMain":"https://doi.org/10.7717/peerj-cs.1148","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2022/1/1 0:00:00","PubModel":"eCollection","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

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.

Abstract Image

Abstract Image

Abstract Image

利用LASSO-LSTM模型结合技术指标和金融情绪分析预测股价走势。
正确预测股票价格走势在金融市场中具有极其重要的意义。近年来,随着数据维数和量的不断扩大,金融数据的非平稳和非线性特征给股票走势的准确预测带来了困难。本文提出了一种结合技术分析和情绪分析的方法来构建预测变量,然后应用改进的LASSO-LASSO来预测股票走势。首先,从网站抓取金融文本内容和股票历史交易数据。然后利用迁移学习Finbert识别文本数据的情感,利用TTR包计算基于历史价格数据的技术指标。为了消除预测变量组合后的多重共线性,我们使用绝对收缩和选择算子(LASSO)对长短期记忆神经网络(LSTM)模型进行了改进。在预测阶段,我们使用筛选的变量作为输入向量来训练LASSO-LSTM模型。为了评估模型的性能,我们比较了LASSO-LSTM和基线模型的准确性和鲁棒性指标。此外,我们引入了Wilcoxon符号秩检验来评估结果的差异。实验结果表明,结合技术和情感指标的LASSO-LSTM比标准LSTM的准确率平均提高了8.53%。因此,本研究证明利用历史交易和金融情绪数据可以捕获影响股票走势的关键信息。有效的变量选择可以保留关键变量,提高模型的预测性能。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书