Sentiment Analysis of US-China Tariffs using IndoBERT and Economic Impact on Indonesia
DOI:
https://doi.org/10.30871/jaic.v9i6.11544Keywords:
IndoBERT, Natural Language Processing, Sentiment Analysis, Spearman Correlation, US-China Trade WarAbstract
The US-China trade war has influenced public perception due to its potential economic impact on developing countries like Indonesia. This study analyses Indonesian sentiment towards the tariff policies and their correlation with economic indicators. The dataset consisted of 38,739 social media comments collected through web scraping. The data were processed through data cleaning, case folding, stopword removal, normalization, and stemming. Each comment was labeled as positive, negative, and neutral. The dataset was split into 80% training and 20% testing sets, followed by an oversampling process to balance the class distribution. The data is fine-tuned using the IndoBERT model with the Python programming language. The model achieved its highest performance with an accuracy of 93.03%, precision of 93.42%, recall of 93.03%, and F1-score of 92.94%. Spearman correlation revealed a weak to moderate positive and significant correlation (ρ = 0.434, p-value < 0.05) between public sentiment and global soybean prices. These findings underscore the effectiveness of combining a deep learning model like IndoBERT with statistical analysis to link digital discourse to tangible economic indicators, highlighting the method's potential as a data-driven tool for policy evaluation.
Downloads
References
[1] Q. Gallea and D. Rohner, “Globalization mitigates the risk of conflict caused by strategic territory,” Proc Natl Acad Sci U S A, vol. 118, no. 39, 2021, doi: 10.1073/pnas.2105624118.
[2] D. Furceri, S. A. Hannan, J. D. Ostry, and A. K. Rose, “Are tariffs bad for growth? Yes, say five decades of data from 150 countries,” J Policy Model, vol. 42, no. 4, 2020, doi: 10.1016/j.jpolmod.2020.03.009.
[3] C. Nurul Fadilah, E. Jumhana, T. Salsabilla, N. Septiani, and R. Zamir, “Perang Dagang Dan Proteksionisme: Kajian Ekonomi Politik Atas Kebijakan Tarif Dalam Hubungan Dagang Bilateral,” Jurnal Riset Ilmu Hukum, vol. 2, pp. 220–229, 2025, doi: 10.62383/mahkamah.v2i3.860.
[4] H. Y. Jong, “The Art of Trade War: Spurring Investments in Indonesia Amidst the US–China Trade War,” Global Journal of Emerging Market Economies, vol. 14, no. 2, 2022, doi: 10.1177/09749101211034110.
[5] R. Purwono, U. Heriqbaldi, M. A. Esquivias, and M. K. Mubin, “The American–China Trade War and Spillover Effects on Value-Added Exports from Indonesia,” Sustainability (Switzerland), vol. 14, no. 5, 2022, doi: 10.3390/su14053093.
[6] P. N. Reis, A. P. S. Pinto, and A. Guimarães, “‘The influence of consumer, manager, and investor sentiment on US stock market returns,’” Investment Management and Financial Innovations, vol. 22, no. 1, pp. 231–256, 2025, doi: 10.21511/imfi.22(1).2025.18.
[7] R. Agrawal, S. Mishra, and P. Mathur, “Psychological Impact Of Social Media On Investor Confidence,” South Eastern European Journal of Public Health (SEEJPH), vol. XXV, pp. 5–12, 2024.
[8] W. Purbaratri, H. D. Purnomo, D. Manongga, I. Setyawan, and H. Hendry, “Sentiment Analysis of e-Government Service Using the Naive Bayes Algorithm,” MATRIK : Jurnal Manajemen, Teknik Informatika dan Rekayasa Komputer, vol. 23, no. 2, pp. 441–452, Mar. 2024, doi: 10.30812/matrik.v23i2.3272.
[9] V. Brilian Adiguna, M. Aqqad, J. S. Pt, and H. R. Dp, “Improving Performance Sentiment Analysis Movie Review Film using Random Forest with Feature Selection Information Gain,” International Journal of Artificial Intelegence Research, vol. 8, no. 1, p. 1, 2024, [Online]. Available: http://ijair.id
[10] A. Karanikola, G. Davrazos, C. M. Liapis, and S. Kotsiantis, “Financial sentiment analysis: Classic methods vs. deep learning models,” Intelligent Decision Technologies, vol. 17, no. 4, 2023, doi: 10.3233/IDT-230478.
[11] F. Koto, A. Rahimi, J. H. Lau, and T. Baldwin, “IndoLEM and IndoBERT: A Benchmark Dataset and Pre-trained Language Model for Indonesian NLP,” in COLING 2020 - 28th International Conference on Computational Linguistics, Proceedings of the Conference, 2020. doi: 10.18653/v1/2020.coling-main.66.
[12] N. P. I. Maharani, A. Purwarianti, Y. Yustiawan, and F. C. Rochim, “Domain-Specific Language Model Post-Training for Indonesian Financial NLP,” in Proceedings of the International Conference on Electrical Engineering and Informatics, 2023. doi: 10.1109/ICEEI59426.2023.10346625.
[13] D. Setiawan, D. Utari Iswavigra, and E. Anggiratih, “Implementation of IndoBERT for Sentiment Analysis of the Constitutional Court’s Decision Regarding the Minimum Age of Vice Presidential Candidates,” Scientific Journal of Informatics, vol. 12, no. 3, 2025, doi: 10.15294/sji.v12i3.26360.
[14] Fransiscus and A. S. Girsang, “Sentiment Analysis of COVID-19 Public Activity Restriction (PPKM) Impact using BERT Method,” International Journal of Engineering Trends and Technology, vol. 70, no. 12, 2022, doi: 10.14445/22315381/IJETT-V70I12P226.
[15] C. Li and X. Hu, “Medical Artificial Intelligence in Scholarly and Public Perspective: BERTopic-Based Analysis of Topic-Sentiment Collaborative Mining,” Data Science and Informetrics, May 2025, doi: 10.1016/J.DSIM.2025.05.001.
[16] I. Fitriani and A. Amalyah Agus, “Tweeting the economy: Analyzing social media sentiments and macroeconomic indicators,” Journal of Innovation in Business and Economics, vol. 7, no. 02, 2023, doi: 10.22219/jibe.v7i02.28227.
[17] G. La Cava, “Smells like animal spirits: the sensitivity of corporate investment to sentiment,” Macroecon Dyn, vol. 27, no. 8, 2023, doi: 10.1017/S1365100522000608.
[18] J. Yoon and G. Oh, “Investor herding behavior in social media sentiment,” Front Phys, vol. 10, 2022, doi: 10.3389/fphy.2022.1023071.
[19] S. Daida, Y. Yadav, K. Kaustubh Sontakke, A. Bagkar, K. Arvind Sontakke, and A. Pathak, “Behavioral Finance and Investor Psychology: Understanding Market Volatility in Crisis Scenarios,” Advances in Consumer Research, vol. 2, no. 5, pp. 851–863, Oct. 2025, [Online]. Available: https://acr-journal.com/
[20] M. N. Ibnu Sina and E. B. Setiawan, “Stock Price Correlation Analysis with Twitter Sentiment Analysis Using The CNN-LSTM Method,” sinkron, vol. 8, no. 4, pp. 2190–2202, Oct. 2023, doi: 10.33395/SINKRON.V8I4.12855.
[21] A. P. Nugraha, A. Kurnia, P. Irawan, P. Putra, A. Rahman, and D. Dikrurahman, “The Impact of Social Media on Social Interaction and Self-Identity in Indonesian Society,” Journal of Social Research, vol. 3, no. 9, Aug. 2024, doi: 10.55324/JOSR.V3I9.2254.
[22] J. Ohme et al., “Digital Trace Data Collection for Social Media Effects Research: APIs, Data Donation, and (Screen) Tracking,” Commun Methods Meas, vol. 18, no. 2, 2024, doi: 10.1080/19312458.2023.2181319.
[23] L. N. Sulistiyowati and S. V. Pratama, “Indonesia’s macroeconomic conditions during United States-China trade war,” Jurnal Ekonomi dan Bisnis, vol. 26, no. 2, pp. 509–530, Dec. 2023, doi: 10.24914/JEB.V26I2.6252.
[24] W. Ben Khalifa, “Using Natural Language Processing Techniques for Indexing and Analyzing Archive Documents,” Journal of Posthumanism, vol. 5, no. 1, pp. 1520–1540, May 2025, doi: 10.63332/joph.v5i1.1394.
[25] M. Siino, I. Tinnirello, and M. La Cascia, “Is text preprocessing still worth the time? A comparative survey on the influence of popular preprocessing methods on Transformers and traditional classifiers,” Inf Syst, vol. 121, pp. 306–4379, 2024, doi: 10.1016/j.is.2023.102342.
[26] J. Kaur and P. K. Buttar, “A Systematic Review on Stopword Removal Algorithms,” International Journal on Future Revolution in Computer Science & Communication Engineering, vol. 4, no. 4, 2018.
[27] A. R. Lubis and M. K. M. Nasution, “Twitter Data Analysis And Text Normalization In Collecting Standard Word,” Journal of Applied Engineering and Technological Science, vol. 4, no. 2, 2023, doi: 10.37385/jaets.v4i2.1991.
[28] M. D. Purbolaksono, F. D. Reskyadita, Adiwijaya, A. A. Suryani, and A. F. Huda, “Indonesian text classification using back propagation and sastrawi stemming analysis with information gain for selection feature,” Int J Adv Sci Eng Inf Technol, no. 1, 2020, doi: 10.18517/ijaseit.10.1.8858.
[29] A. H. Nasution and A. Onan, “ChatGPT Label: Comparing the Quality of Human-Generated and LLM-Generated Annotations in Low-Resource Language NLP Tasks,” IEEE Access, vol. 12, pp. 71876–71900, 2024, doi: 10.1109/ACCESS.2024.3402809.
[30] L. A. Martini, G. A. Pradipta, and R. R. Huizen, “Analysis of the Impact of Data Oversampling on the Support Vector Machine Method for Stroke Disease Classification,” Journal of Electronics, Electromedical Engineering, and Medical Informatics, vol. 7, no. 2, pp. 404–421, Mar. 2025, doi: 10.35882/JEEEMI.V7I2.698.
[31] G. Eom and H. Byeon, “Searching for Optimal Oversampling to Process Imbalanced Data: Generative Adversarial Networks and Synthetic Minority Over-Sampling Technique,” Mathematics, vol. 11, no. 16, 2023, doi: 10.3390/math11163605.
[32] R. Oktafiani, A. Hermawan, and D. Avianto, “Pengaruh Komposisi Split data Terhadap Performa Klasifikasi Penyakit Kanker Payudara Menggunakan Algoritma Machine Learning,” Jurnal Sains dan Informatika, vol. 9, no. 1, pp. 19–28, Jun. 2023, doi: 10.34128/JSI.V9I1.622.
[33] O. Rainio, J. Teuho, and R. Klén, “Evaluation metrics and statistical tests for machine learning,” Sci Rep, vol. 14, no. 1, p. 6086, Dec. 2024, doi: 10.1038/S41598-024-56706-X.
[34] S. Syahrial and R. P. F. Afidh, “Fine-Tuning Topic Modelling: A Coherence-Focused Analysis of Correlated Topic Models,” Infolitika Journal of Data Science, vol. 2, no. 2, pp. 82–87, Nov. 2024, doi: 10.60084/ijds.v2i2.236.
[35] M. Grootendorst, “BERTopic: Neural topic modeling with a class-based TF-IDF procedure,” Mar. 2022, [Online]. Available: http://arxiv.org/abs/2203.05794
[36] A. B. Dieng, F. J. R. Ruiz, and D. M. Blei, “Topic Modeling in Embedding Spaces”, doi: 10.1162/tacl.
[37] S. Rivas, Y. Hernandez, R. Urraca, and P. Barbosa, “A comparative analysis to depict underlying attributes that might determine successful implementation of local adaptation plans,” Environ Sci Policy, vol. 117, pp. 25–33, Mar. 2021, doi: 10.1016/J.ENVSCI.2020.12.002.
[38] I. Fitriani and A. A. Agus, “Tweeting the economy: Analyzing social media sentiments and macroeconomic indicators,” Journal of Innovation in Business and Economics, vol. 7, no. 02, pp. 129–138, Nov. 2023, doi: 10.22219/JIBE.V7I02.28227.
[39] C. A. Makridis, “The social transmission of economic sentiment on consumption,” Eur Econ Rev, vol. 148, p. 104232, Sep. 2022, doi: 10.1016/J.EUROECOREV.2022.104232.
[40] S. K. Eden, C. Li, and B. E. Shepherd, “Spearman-like correlation measure adjusting for covariates in bivariate survival data,” Biom J, vol. 65, no. 8, p. e2200137, Dec. 2023, doi: 10.1002/BIMJ.202200137.
[41] M. Winistörfer and I. Zhdankin, “Measure of Dependence for Financial Time-Series,” SSRN Electronic Journal, Nov. 2023, doi: 10.2139/SSRN.4641504.
[42] L. J. Yacoubian, G. S. Ketenchian, G. H. F. de Carvalho, and K. Merdinian, “Market Dynamics in Diverging Economies: A Comparative Study of the MERVAL and S&P 500 Indices,” Revista JRG de Estudos Acadêmicos, vol. 5, no. 11, pp. 623–632, Dec. 2022, doi: 10.55892/JRG.V5I11.2364.
[43] A. F. Suherman, P. P. Lisnaeni, S. A. Izqiatullailiyah, T. Herlinawati, and A. Ahman, “A Comparative Analysis Of Spearman And Pearson Correlation Using SPSS,” OPTIMA: Journal Of Guidance and Counseling, vol. 5, no. 1, pp. 1–15, Mar. 2025, Accessed: Nov. 21, 2025. [Online]. Available: https://ejournal.upi.edu/index.php/optima/article/view/79415
[44] G. W. Imbens, “Statistical significance, p-values, and the reporting of uncertainty,” 2021. doi: 10.1257/jep.35.3.157.
[45] R. J. Janse et al., “Conducting correlation analysis: important limitations and pitfalls,” Clin Kidney J, vol. 14, no. 11, p. 2332, Nov. 2021, doi: 10.1093/CKJ/SFAB085.
[46] F. Moons and E. Vandervieren, “Measuring agreement among several raters classifying subjects into one or more (hierarchical) categories: A generalization of Fleiss’ kappa,” Behav Res Methods, vol. 57, no. 10, Oct. 2025, doi: 10.3758/s13428-025-02746-8.
[47] A. Bandyopadhyay and P. Rajib, “The impact of Sino–US trade war on price discovery of soybean: A double-edged sword?,” Journal of Futures Markets, vol. 43, no. 7, 2023, doi: 10.1002/fut.22415.
[48] S. Qu, L. Rodriguez, and E. Cork, “Media frames and farmers’ support for the 2018 U.S. trade dispute with China,” Journal of International Communication, vol. 30, no. 1, 2024, doi: 10.1080/13216597.2024.2311714.
[49] F. D. da C. Mello, P. Kumar, and E. G. Sperandio Nascimento, “Advancements in Soybean Price Forecasting: Impact of AI and Critical Research Gaps in Global Markets,” MDPI, vol. 12, no. 11, Nov. 2024, doi: 10.3390/economies12110310.
[50] M. Sajid Nazir, H. Younus, A. Kaleem, and Z. Anwar, “Impact of political events on stock market returns: empirical evidence from Pakistan,” Journal of Economic and Administrative Sciences, vol. 30, no. 1, 2014, doi: 10.1108/JEAS-03-2013-0011.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Fitriyana Nuril Khaqqi, Lathifah Alfat, Ida Nurhaida

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).








