Sentiment Analysis Using Bidirectional Encoder Representations from Transformers for Indonesian Stock Price Prediction with Long Short-Term Memory and Gated Recurrent Unit Models - Dwi Utari Iswavigra; Very Dwi Setiawan; Mutia Ulfa; Brieva Ommr (Informatika, Universitas Jenderal Soedirman, 2026)
The advancement of artificial intelligence based market analytics has driven the need for stock price prediction models capable of representing market behavior both technically and psychologically. This study aims to improve stock price forecasting in the Indonesian capital market by integrating sentiment analysis with deep learning time-series models. It evaluates whether public sentiment can contribute to enhancing prediction accuracy when combined with historical stock data. Textual sentiments were extracted using IndoBERT and converted into positive, negative, and neutral scores, which were then merged with historical stock prices. These data were modeled using LSTM, GRU, and a hybrid LSTM–GRU architecture. Model evaluation was conducted using MSE, MAE, RMSE, and MAPE metrics across six Indonesian stocks ANTM, BBCA, BBRI, SCMA, TLKM, and UNVR. The hybrid LSTM–GRU model produced the lowest prediction errors for BBCA and BBRI, with MSE scores of 0.151 and 1022.062, respectively. GRU delivered the best performance for highly volatile stocks, such as SCMA MAPE 1.65% and UNVR MAPE 0.51%, while LSTM demonstrated the most stable performance for TLKM with an MSE of 606.93 and RMSE of 24.63. Across all cases, sentiment scores improved model responsiveness, particularly during price spikes ANTM mid-2025 and price declines BBRI early year. The integration of sentiment significantly enhances prediction relevance by combining psychological market indicators with technical price trends. This framework provides more reliable decision-making support for investors, strengthens algorithmic trading strategies in Indonesia, and contributes to intelligent financial analytics that reflect local market behavior.