Fine-Tuning IndoBERT Untuk Analisis Sentimen Berita Saham Berbahasa Indonesia Dengan Hyperparameter Optimization

Full Text Preview
Download PDF

Abstract

This study aims to improve sentiment analysis performance on Indonesian stock news using transformer-based models. The rapid growth of the Indonesian capital market has led to an increase in financial news information, creating the need for accurate automated sentiment analysis systems to support data-driven investment decisions. The proposed method applies fine-tuning on the IndoBERT model with hyperparameter optimization using Bayesian Optimization through the Optuna framework. The dataset consists of 23,108 Indonesian stock news articles classified into three sentiment classes: positive, neutral, and negative. Model evaluation is conducted using accuracy, precision, recall, F1-score, Macro-F1, confusion matrix, and ROC-AUC with a one-vs-rest approach for multi-class classification. The results indicate that IndoBERT-Base-Uncased with optimal hyperparameter configuration achieves the best performance, with an accuracy of 0.8269 and an F1-score of 0.7816. The application of hyperparameter optimization significantly improves model performance compared to the baseline. This study contributes to the advancement of Indonesian-language sentiment analysis in the financial domain and provides an effective approach to improving model performance through hyperparameter optimization.

Keywords

Analisis Sentimen IndoBERT Fine-Tuning Hyperparameter Optimization Berita Saham.

References

KSEI, “Statistik Pasar Modal Indonesia – Agustus 2025,” Jakarta, 2025. [Online]. Available: https://web.ksei.co.id/files/Statistik_Publik_Agustus_2025.pdf
[2] A. Alamsyah et al., “Deciphering news sentiment and stock price relationships in Indonesian companies: an AI-based exploration of industry affiliation and news co-occurrence,” Discov. Artif. Intell., vol. 5, no. 1, p. 87, Jun. 2025, doi: 10.1007/s44163-025-00350-5.
[3] Y. Song, Y. Zhang, J. Huang, and A. Yang, “Volatility and value-at-risk forecasting using BERT and transformer models incorporating investors’ textual sentiments,” Financ. Res. Lett., vol. 85, p. 108210, Nov. 2025, doi: 10.1016/j.frl.2025.108210.
[4] 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, California: International Joint Conferences on Artificial Intelligence Organization, Jul. 2020, pp. 4513–4519. doi: 10.24963/ijcai.2020/622.
[5] A. H. Chasanah and H. Al Azies, “Optimasi Hyperparameter Model Ensemble untuk Klasifikasi Sentimen Ulasan OVO,” JTERA (Jurnal Teknol. Rekayasa), vol. 10, no. 2, p. 95, Jan. 2026, doi: 10.31544/jtera.v10.i2.2025.95-104.
[6] J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding,” in Proceedings of the 2019 Conference of the North, Stroudsburg, PA, USA: Association for Computational Linguistics, 2019, pp. 4171–4186. doi: 10.18653/v1/N19-1423.
[7] 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, K.-F. Wong, K. Knight, and H. Wu, Eds., Suzhou, China: Association for Computational Linguistics, Dec. 2020, pp. 843–857. doi: 10.18653/v1/2020.aacl-main.85.
[8] Anugerah Simanjuntak et al., “Research and Analysis of IndoBERT Hyperparameter Tuning in Fake News Detection,” J. Nas. Tek. Elektro dan Teknol. Inf., vol. 13, no. 1, pp. 60–67, Feb. 2024, doi: 10.22146/jnteti.v13i1.8532.
[9] N. P. I. Maharani, A. Purwarianti, Y. Yustiawan, and F. C. Rochim, “Domain-Specific Language Model Post-Training for Indonesian Financial NLP,” Proc. Int. Conf. Electr. Eng. Informatics, 2023, doi: 10.1109/ICEEI59426.2023.10346625.
[10] Anderies, R. Rahutomo, and B. Pardamean, “Finetunning IndoBERT to Understand Indonesian Stock Trader Slang Language,” in 2021 1st International Conference on Computer Science and Artificial Intelligence (ICCSAI), IEEE, Oct. 2021, pp. 42–46. doi: 10.1109/ICCSAI53272.2021.9609746.
[11] W. J. Kusoema and I. Ibrahim, “Sentiment Analysis on the PT Pertamina Corruption Case using IndoBERT and RCNN Methods,” SISTEMASI, vol. 14, no. 5, p. 2246, Sep. 2025, doi: 10.32520/stmsi.v14i5.5392.
[12] B. Kuechler and V. Vaishnavi, “On theory development in design science research: anatomy of a research project,” Eur. J. Inf. Syst., vol. 17, no. 5, pp. 489–504, Oct. 2008, doi: 10.1057/ejis.2008.40.
[13] M. Al-alshaqi, D. B. Rawat, and C. Liu, “A BERT-Based Multimodal Framework for Enhanced Fake News Detection Using Text and Image Data Fusion,” Computers, vol. 14, no. 6, p. 237, Jun. 2025, doi: 10.3390/computers14060237.
[14] L. Afuan, N. Hidayat, H. Hamdani, H. Ismanto, B. C. Purnama, and D. I. Ramdhani, “Optimizing BERT Models with Fine-Tuning for Indonesian Twitter Sentiment Analysis,” J. Wirel. Mob. Networks, Ubiquitous Comput. Dependable Appl., vol. 16, no. 2, pp. 248–267, Jun. 2025, doi: 10.58346/JOWUA.2025.I2.016.
[15] J. Yao, A. Alabousi, and O. Mironov, “Evaluation of a BERT Natural Language Processing Model for Automating CT and MRI Triage and Protocol Selection,” Can. Assoc. Radiol. J., vol. 76, no. 2, pp. 265–272, May 2025, doi: 10.1177/08465371241255895.
[16] M. González-Duque, R. Michael, S. Bartels, Y. Zainchkovskyy, S. Hauberg, and W. Boomsma, “A survey and benchmark of high-dimensional Bayesian optimization of discrete sequences,” in Advances in Neural Information Processing Systems, A. Globerson, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. Tomczak, and C. Zhang, Eds., Curran Associates, Inc., 2024, pp. 140478–140508. [Online]. Available: https://proceedings.neurips.cc/paper_files/paper/2024/file/fe0007fcfd707673660ec0f9014bc48e-Paper-Datasets_and_Benchmarks_Track.pdf
[17] T. Akiba, S. Sano, T. Yanase, T. Ohta, and M. Koyama, “Optuna,” in Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, New York, NY, USA: ACM, Jul. 2019, pp. 2623–2631. doi: 10.1145/3292500.3330701.
[18] S. D. Parameswari, M. Lubis, S. Suakanto, Y. Z. Ramadhan, R. N. Amanah, and R. A. Dila, “Studi Perbandingan Naïve Bayes dan Support Vector Machine (SVM) dalam Analisis Sentimen Pengguna Metaverse,” J. Teknol. dan Manaj. Ind. Terap., vol. 4, no. 3, pp. 1059–1065, Sep. 2025, doi: 10.55826/jtmit.v4i3.1122.
[19] S. Sathyanarayanan, “Confusion Matrix-Based Performance Evaluation Metrics,” African J. Biomed. Res., pp. 4023–4031, Nov. 2024, doi: 10.53555/AJBR.v27i4S.4345.
[20] A. S. Rizkia, W. Wufron, and F. F. Roji, “Analisis Sentimen Coretax: Perbandingan Pelabelan Data Manual, Transformers-Based, dan Lexicon-Based pada Performa IndoBERT,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 5, no. 3, Jul. 2025, doi: 10.57152/malcom.v5i3.2151.
[21] M. A. A. O. Putri, I. W. Sumarjaya, and I. G. N. L. Wijayakusuma, “Aspect-Based Sentiment Analysis of Reviews for Pandawa Beach Using Naive Bayes and SVM Methods,” J. Appl. Informatics Comput., vol. 9, no. 2, pp. 305–313, Mar. 2025, doi: 10.30871/jaic.v9i2.9083.
[22] M. Jefri, R. Fauzi, and R. Y. Fa’rifah, “Sentiment-Aware Feature Recommendations for Maternal Mental-Health Apps via IndoBERT and BERTopic on Indonesian TikTok Data,” in 2025 4th International Conference on Electronics Representation and Algorithm (ICERA), IEEE, Jun. 2025, pp. 575–580. doi: 10.1109/ICERA66156.2025.11087326.

How to Cite

[1]
“Fine-Tuning IndoBERT Untuk Analisis Sentimen Berita Saham Berbahasa Indonesia Dengan Hyperparameter Optimization”, JTERA, vol. 11, no. 1, Jun. 2026, doi: 10.31544/jtera.v11.i1.2026.51-60.