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.

Original languageEnglish
Pages (from-to)77132-77146
Number of pages15
JournalIEEE Access
Publication statusPublished - 2023


  • Active learning
  • financial loss
  • quantifying news sentiment
  • stock price prediction
  • transformer time series


Dive into the research topics of 'Transformer-Gated Recurrent Unit Method for Predicting Stock Price Based on News Sentiments and Technical Indicators'. Together they form a unique fingerprint.

Cite this