skip to main content

Comparative Evaluation of FinBERT and IndoBERT for LSTM-Based Stock Price Prediction in Indonesia

1Department of Computer Science, Universitas Amikom Yogyakarta, Yogyakarta, Indonesia

2Department of Computer Science, Universidad de Murcia, Spain

Received: 29 Jan 2026; Revised: 5 Jun 2026; Accepted: 19 Jul 2026; Published: 3 Aug 2026.
Open Access Copyright (c) 2026 The authors. Published by Department of Informatics Universitas, Diponegoro
Creative Commons License This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Citation Format:
Abstract

Stock price prediction remains challenging due to the nonlinear and dynamic behavior of financial markets, where price movements are influenced not only by historical market data but also by investor sentiment reflected in financial news. This study investigates the effectiveness of sentiment integration for stock price prediction by comparing FinBERT, a financial domain-specific language model, and IndoBERT, a language-specific Indonesian language model, within an LSTM-based forecasting framework. Experiments were conducted using daily stock price data and financial news collected for three Indonesian stocks (BBCA, BBRI, and BSDE) over the period 2019–2025. Sentiment scores extracted from financial news were aggregated on a daily basis and incorporated as additional features alongside historical price variables. Model performance was evaluated using MAE, RMSE, MAPE, R², and Directional Accuracy. The results indicate that sentiment-enhanced models do not consistently improve numerical forecasting accuracy compared with the baseline LSTM model. However, sentiment integration does not consistently improve directional prediction, although limited stock-specific differences are observed under certain stock-specific conditions. Comparative analysis further shows that neither FinBERT nor IndoBERT consistently outperforms the other across all datasets and metrics, suggesting that sentiment effectiveness is highly dependent on linguistic context and market characteristics. These findings highlight that sentiment information should be incorporated selectively rather than assumed to universally improve stock forecasting performance in emerging markets.

Keywords: Stock price prediction, sentiment analysis, LSTM, FinBERT, IndoBERT

Article Metrics:

  1. S. A. Panchal, L. Ferdouse, and A. Sultana, “Comparative Analysis of ARIMA and LSTM Models for Stock Price Prediction,” in 2024 IEEE/ACIS 27th International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing (SNPD), Beijing, China: IEEE, Jul. 2024, pp. 240–244. doi: 10.1109/SNPD61259.2024.10673919
  2. S. Sang and L. Li, “A Novel Variant of LSTM Stock Prediction Method Incorporating Attention Mechanism,” Mathematics, vol. 12, no. 7, p. 945, Mar. 2024, doi: 10.3390/math12070945
  3. K. Alam, M. H. Bhuiyan, I. U. Haque, M. F. Monir, and T. Ahmed, “Enhancing Stock Market Prediction: A Robust LSTM-DNN Model Analysis on 26 Real-Life Datasets,” IEEE Access, vol. 12, pp. 122757–122768, 2024, doi: 10.1109/ACCESS.2024.3434524
  4. M. Diqi, E. Utami, Kusrini, and F. W. Wibowo, “A Study on Methods, Challenges, and Future Directions of Generative Adversarial Networks in Stock Market Prediction,” in 2024 IEEE International Conference on Technology, Informatics, Management, Engineering and Environment (TIME-E), Bali, Indonesia: IEEE, Aug. 2024, pp. 148–153. doi: 10.1109/TIME-E62724.2024.10919813
  5. B. H. C. and I. J. Jacob, “An Efficient Hybrid Model for Stock Market Price Prediction Using CNN-BiLSTM with Attention Mechanism and Sentimental Analysis,” Eng. Technol. Appl. Sci. Res., vol. 15, no. 4, pp. 25565–25571, Aug. 2025, doi: 10.48084/etasr.11886
  6. D. Vallarino, “An AI-Enhanced Forecasting Framework: Integrating LSTM and Transformer-Based Sentiment for Stock Price Prediction,” JEA, vol. 4, no. 3, pp. 1–15, Sep. 2025, doi: 10.58567/jea04030001
  7. T. H. Nguyen, K. Shirai, and J. Velcin, “Sentiment analysis on social media for stock movement prediction,” Expert Systems with Applications, vol. 42, no. 24, pp. 9603–9611, Dec. 2015, doi: 10.1016/j.eswa.2015.07.052
  8. L. Bacco, L. Petrosino, D. Arganese, L. Vollero, M. Papi, and M. Merone, “Investigating Stock Prediction Using LSTM Networks and Sentiment Analysis of Tweets Under High Uncertainty: A Case Study of North American and European Banks,” IEEE Access, vol. 12, pp. 122239–122248, 2024, doi: 10.1109/ACCESS.2024.3450311
  9. W. Jun Gu et al., “Predicting Stock Prices with FinBERT-LSTM: Integrating News Sentiment Analysis,” in Proceedings of the 2024 8th International Conference on Cloud and Big Data Computing, Oxford United Kingdom: ACM, Aug. 2024, pp. 67–72. doi: 10.1145/3694860.3694870
  10. D. Araci, “FinBERT: Financial Sentiment Analysis with Pre-trained Language Models,” Aug. 2019, doi: 10.48550/arXiv.1908.10063
  11. Z. Liu, D. Huang, K. Huang, Z. Li, and J. Zhao, “FinBERT: A Pre-trained Financial Language Representation Model for Financial Text Mining,” in Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, Yokohama, Japan: International Joint Conferences on Artificial Intelligence Organization, Jul. 2020, pp. 4513–4519. doi: 10.24963/ijcai.2020/622
  12. Y. Yang, M. C. S. UY, and A. Huang, “FinBERT: A Pretrained Language Model for Financial Communications,” Jul. 2020, doi: 10.48550/arXiv.2006.08097
  13. T. Jiang and Q. Zeng, “Financial sentiment analysis using FinBERT with application in predicting stock movement,” Jun. 2025, doi: 10.48550/arXiv.2306.02136
  14. B. Wilie et al., “IndoNLU: Benchmark and Resources for Evaluating Indonesian Natural Language Understanding,” in Proceedings of the 1st Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the 10th International Joint Conference on Natural Language Processing, Suzhou, China: Association for Computational Linguistics, 2020, pp. 843–857. doi: 10.18653/v1/2020.aacl-main.85
  15. F. Koto, J. H. Lau, and T. Baldwin, “IndoBERTweet: A Pretrained Language Model for Indonesian Twitter with Effective Domain-Specific Vocabulary Initialization,” in Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, Online and Punta Cana, Dominican Republic: Association for Computational Linguistics, 2021, pp. 10660–10668. doi: 10.18653/v1/2021.emnlp-main.833
  16. F. Indriani, R. A. Nugroho, M. R. Faisal, and D. Kartini, “Comparative Evaluation of IndoBERT, IndoBERTweet, and mBERT for Multilabel Student Feedback Classification,” J. RESTI (Rekayasa Sist. Teknol. Inf.), vol. 8, no. 6, pp. 748–757, Dec. 2024, doi: 10.29207/resti.v8i6.6100
  17. A. Maretta and A. Meiriza, “Aspect-Based Sentiment Analysis of Hospital Service Reviews Using Fine-Tuned IndoBERT,” JAIC, vol. 9, no. 5, pp. 2541–2551, Oct. 2025, doi: 10.30871/jaic.v9i5.10765
  18. T. Aprilah, D. R. I. M. Setiadi, and W. Herowati, “Enhancing Aspect-Based Sentiment Analysis via Hugging Face Fine-Tuned IndoBERT,” JAIC, vol. 9, no. 6, pp. 3821–3830, Dec. 2025, doi: 10.30871/jaic.v9i6.11409
  19. J. Zhang, H. Liu, W. Bai, and X. Li, “A hybrid approach of wavelet transform, ARIMA and LSTM model for the share price index futures forecasting,” The North American Journal of Economics and Finance, vol. 69, p. 102022, Jan. 2024, doi: 10.1016/j.najef.2023.102022
  20. D. M. Q. Nelson, A. C. M. Pereira, and R. A. De Oliveira, “Stock market’s price movement prediction with LSTM neural networks,” in 2017 International Joint Conference on Neural Networks (IJCNN), Anchorage, AK, USA: IEEE, May 2017, pp. 1419–1426. doi: 10.1109/IJCNN.2017.7966019
  21. T. Fischer and C. Krauss, “Deep learning with long short-term memory networks for financial market predictions,” European Journal of Operational Research, vol. 270, no. 2, pp. 654–669, Oct. 2018, doi: 10.1016/j.ejor.2017.11.054
  22. M. S. Zakka and E. Emigawaty, “Stock Price Prediction Using Deep Learning (LSTM) with a Recursive Approach,” JAIC, vol. 9, no. 5, pp. 2468–2477, Oct. 2025, doi: 10.30871/jaic.v9i5.10514
  23. T. H. Nguyen and K. Shirai, “Topic Modeling based Sentiment Analysis on Social Media for Stock Market Prediction,” in Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), Beijing, China: Association for Computational Linguistics, 2015, pp. 1354–1364. doi: 10.3115/v1/P15-1131
  24. A. S. Girsang and Stanley, “Hybrid LSTM and GRU for Cryptocurrency Price Forecasting Based on Social Network Sentiment Analysis Using FinBERT,” IEEE Access, vol. 11, pp. 120530–120540, 2023, doi: 10.1109/ACCESS.2023.3324535
  25. J. W. Creswell, Research design: qualitative, quantitative, and mixed methods approaches, 4. ed. Los Angeles, Calif.: SAGE, 2014
  26. J. Zhang, L. Ye, and Y. Lai, “Stock Price Prediction Using CNN-BiLSTM-Attention Model,” Mathematics, vol. 11, no. 9, p. 1985, Apr. 2023, doi: 10.3390/math11091985
  27. B. Liu, Synthesis Lectures on Human Language Technologies: Sentiment Analysis and Opinion Mining. in Synthesis Lectures on Human Language Technologies Ser. San Rafael: Morgan & Claypool Publishers, 2012
  28. L. Tunstall, L. von Werra, and T. Wolf, Natural language processing with transformers: building language applications with Hugging Face, First edition. Sebastopol, CA: O’Reilly Media, 2022
  29. I. Goodfellow, Y. Bengio, and A. Courville, Deep learning. in Adaptive computation and machine learning. Cambridge, Massachusetts: The MIT Press, 2016
  30. S. Raschka and V. Mirjalili, Python machine learning: machine learning and deep learning with Python, scikit-learn, and TensorFlow 2, 3rd ed. Birmingham: Packt Publishing, 2020
  31. S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory,” Neural Computation, vol. 9, no. 8, pp. 1735–1780, Nov. 1997, doi: 10.1162/neco.1997.9.8.1735
  32. F. Provost and T. Fawcett, Data science for business: what you need to know about data mining and data-analytic thinking, First edition. Beijing Cambridge Farnkam Köln Sebastopol Tokyo: O’Reilly, 2013
  33. F. Wilcoxon, “Individual Comparisons by Ranking Methods,” Biometrics Bulletin, vol. 1, no. 6, p. 80, Dec. 1945, doi: 10.2307/3001968

Last update:

No citation recorded.

Last update: 2026-08-12 03:16:46

No citation recorded.