IEEE Access (Jan 2023)

Transformer-Gated Recurrent Unit Method for Predicting Stock Price Based on News Sentiments and Technical Indicators

  • Agus Tri Haryono,
  • Riyanarto Sarno,
  • Kelly Rossa Sungkono

DOI
https://doi.org/10.1109/ACCESS.2023.3298445
Journal volume & issue
Vol. 11
pp. 77132 – 77146

Abstract

Read online

News sentiment can influence stock prices indirectly, in addition to the technical indicators already used to analyze stock prices. The information quantification of news sentiment by considering time sequence data in the stock analysis has been the primary issue; this article proposes methods for quantifying news sentiments by considering time sequence data. The news sentiment quantification uses a daily confidence score from the classification model. The active learning model uses to build a classification model considering time sequence data, which results in sentiment indicators. Then the sentiment indicators are utilized by stock price forecasting using the proposed Transformer Encoder Gated Recurrent Unit (TEGRU) architecture. The TEGRU consists of a transformer encoder to learn pattern time series data with multi-head attention and pass it into the GRU layer to determine stock price. The accuracy mean absolute percentage error (AcMAPE) uses to evaluate forecasting models sensitive to the misclassification of stock price trends. Our experiment showed that the sentiment indicator could influence stock issuers based on the increased performance of the stock price forecasting model. The TEGRU architecture outperformed other transformer architecture on five feature scenarios. In addition, TEGRU presented the best-fit parameters to produce low financial risk for each stock issuer.

Keywords