基于混合情绪的机器学习股票价格预测模型

Awais Mehmood, Muhammad Khurram Ali
{"title":"基于混合情绪的机器学习股票价格预测模型","authors":"Awais Mehmood, Muhammad Khurram Ali","doi":"10.1051/matecconf/202338101017","DOIUrl":null,"url":null,"abstract":"Accurate stock market prediction is highly desirable to corporations and investors. In this study a deep learning model based on LSTM, BiLSTM with attention mechanism used to predict stocks closing price for next 30 days of two banks listed in Pakistan Stock Exchange. For accurate stock price prediction, it is necessary to consider volatile factors such as news sentiments along with historical data. This study covers that aspect by incorporating news sentiments along with historical stock data that is distributed over a span of ten years from Jan 2011 to July 2021. Preprocessing and sentiment analysis of data was performed using python NLTK module. After that we built a univariate deep learning model based on four layers of LSTM and one dense layer to combine all layers and performed a prediction on train and test data followed by a multivariate deep learning model based on BiLSTM with self-attention mechanism and found out that incorporation of news sentiments really improved the prediction accuracy by reducing the values of mean squared error. Finally, we did the prediction for next 30 days of stock closing price of two banks and compared those predicted prices with actual prices and got quite accurate results.","PeriodicalId":18309,"journal":{"name":"MATEC Web of Conferences","volume":"58 9 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2023-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"A hybrid sentiment based stock price prediction model using machine learning\",\"authors\":\"Awais Mehmood, Muhammad Khurram Ali\",\"doi\":\"10.1051/matecconf/202338101017\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Accurate stock market prediction is highly desirable to corporations and investors. In this study a deep learning model based on LSTM, BiLSTM with attention mechanism used to predict stocks closing price for next 30 days of two banks listed in Pakistan Stock Exchange. For accurate stock price prediction, it is necessary to consider volatile factors such as news sentiments along with historical data. This study covers that aspect by incorporating news sentiments along with historical stock data that is distributed over a span of ten years from Jan 2011 to July 2021. Preprocessing and sentiment analysis of data was performed using python NLTK module. After that we built a univariate deep learning model based on four layers of LSTM and one dense layer to combine all layers and performed a prediction on train and test data followed by a multivariate deep learning model based on BiLSTM with self-attention mechanism and found out that incorporation of news sentiments really improved the prediction accuracy by reducing the values of mean squared error. Finally, we did the prediction for next 30 days of stock closing price of two banks and compared those predicted prices with actual prices and got quite accurate results.\",\"PeriodicalId\":18309,\"journal\":{\"name\":\"MATEC Web of Conferences\",\"volume\":\"58 9 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-01-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"MATEC Web of Conferences\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1051/matecconf/202338101017\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"MATEC Web of Conferences","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1051/matecconf/202338101017","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

准确的股市预测对企业和投资者来说是非常重要的。本研究将基于LSTM、BiLSTM的深度学习模型与注意力机制结合,用于预测两家在巴基斯坦证券交易所上市的银行股票未来30天的收盘价。为了准确预测股价,除了历史数据外,还需要考虑新闻情绪等波动因素。本研究通过结合新闻情绪以及从2011年1月到2021年7月的十年间分布的历史股票数据,涵盖了这方面。使用python NLTK模块对数据进行预处理和情感分析。之后,我们建立了一个基于四层LSTM和一层密集层的单变量深度学习模型,将各层结合起来,对训练数据和测试数据进行预测,然后建立了一个基于自注意机制的基于BiLSTM的多变量深度学习模型,发现加入新闻情感确实通过降低均方误差值提高了预测精度。最后,我们对两家银行未来30天的股票收盘价进行了预测,并将预测价格与实际价格进行了比较,得到了比较准确的结果。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
A hybrid sentiment based stock price prediction model using machine learning
Accurate stock market prediction is highly desirable to corporations and investors. In this study a deep learning model based on LSTM, BiLSTM with attention mechanism used to predict stocks closing price for next 30 days of two banks listed in Pakistan Stock Exchange. For accurate stock price prediction, it is necessary to consider volatile factors such as news sentiments along with historical data. This study covers that aspect by incorporating news sentiments along with historical stock data that is distributed over a span of ten years from Jan 2011 to July 2021. Preprocessing and sentiment analysis of data was performed using python NLTK module. After that we built a univariate deep learning model based on four layers of LSTM and one dense layer to combine all layers and performed a prediction on train and test data followed by a multivariate deep learning model based on BiLSTM with self-attention mechanism and found out that incorporation of news sentiments really improved the prediction accuracy by reducing the values of mean squared error. Finally, we did the prediction for next 30 days of stock closing price of two banks and compared those predicted prices with actual prices and got quite accurate results.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
342
审稿时长
6 weeks
期刊介绍: MATEC Web of Conferences is an Open Access publication series dedicated to archiving conference proceedings dealing with all fundamental and applied research aspects related to Materials science, Engineering and Chemistry. All engineering disciplines are covered by the aims and scope of the journal: civil, naval, mechanical, chemical, and electrical engineering as well as nanotechnology and metrology. The journal concerns also all materials in regard to their physical-chemical characterization, implementation, resistance in their environment… Other subdisciples of chemistry, such as analytical chemistry, petrochemistry, organic chemistry…, and even pharmacology, are also welcome. MATEC Web of Conferences offers a wide range of services from the organization of the submission of conference proceedings to the worldwide dissemination of the conference papers. It provides an efficient archiving solution, ensuring maximum exposure and wide indexing of scientific conference proceedings. Proceedings are published under the scientific responsibility of the conference editors.
×
引用
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学术文献互助群
群 号:481959085
Book学术官方微信