Back to Search Start Over

A hybrid sentiment based stock price prediction model using machine learning

Authors :
Mehmood Awais
Khurram Ali Muhammad
Source :
MATEC Web of Conferences, Vol 381, p 01017 (2023)
Publication Year :
2023
Publisher :
EDP Sciences, 2023.

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.

Details

Language :
English, French
ISSN :
2261236X
Volume :
381
Database :
Directory of Open Access Journals
Journal :
MATEC Web of Conferences
Publication Type :
Academic Journal
Accession number :
edsdoj.f7abbf6a7d3468fbbc1d39ea2c67810
Document Type :
article
Full Text :
https://doi.org/10.1051/matecconf/202338101017