Journal of Computer Science and Technology (Oct 2024)

A Novel NLP-based Stock Market Price Prediction and Risk Analysis Framework

  • Zain Ul-Abidden,
  • Raja Hashim Ali,
  • Ali Ijaz Zeeshan,
  • Talha Ali Khan

DOI
https://doi.org/10.24215/16666038.24.e07
Journal volume & issue
Vol. 24, no. 2

Abstract

Read online

Stock market prediction is an interesting and complex problem that has recently been in the limelight, thanks to the significant accuracy achieved by deep learning models. However, a complete platform with prediction and risk analysis ability is unavailable. In the current work, we present a novel framework for investment analysis designed to create ease for investors and provide a confidence measure along with the stock price to depict the risk involved in investing in stocks of a particular company. The model integrates two different approaches successfully to improve accuracy significantly. The model inputs two sources – a stock price dataset depicting the original scores as numerals and textual data extracted from Reddit news articles. The traditional problem of stock price prediction is dealt with using LSTMs on individual stock prices. At the same time, the confidence is represented by a risk value calculated intelligently using XGBoost and LSTM output. We have deployed natural language processing techniques for performing sentiment and subjectivity analyses, which are then used to extract features for further investigation in the study. The results show that an accuracy of 94% for stock trend prediction can be achieved using PCA as the feature extractor with tuned parameters for XGBoost and around 76% accuracy for stock price prediction with a tuned LSTM. It removes the hassle for investors to research the project or company they want to invest in and provides all relevant analysis and data.

Keywords