Acta Informatica Pragensia X:X | DOI: 10.18267/j.aip.32891
Operationalising Large Language Models for Financial Sentiment Analysis: The PipeFinePT Modular Pipeline
- 1 Higher Institute of Accounting and Administration, University of Aveiro, Aveiro, Portugal
- 2 Institute of Electronics and Telematics Engineering of Aveiro, University of Aveiro, Aveiro, Portugal
- 3 Research Unit on Governance, Competitiveness and Public Policies, University of Aveiro, Aveiro, Portugal
Background: Financial decision-making increasingly relies on automated analysis of large volumes of textual information. However, financial sentiment analysis resources remain scarce for low-resource linguistic contexts such as European Portuguese, limiting reproducible evaluation and adoption of advanced AI techniques within financial information systems.
Objective: This study aims to design and evaluate a modular pipeline capable of operationalizing large language models (LLMs) for sentiment classification of Portuguese financial news while assessing performance, robustness, and deployment trade-offs across different model categories.
Methods: A domain-specific dataset of 200 European Portuguese financial news articles was constructed and manually annotated by three independent annotators using a positive, neutral, and negative sentiment scheme. The proposed PipeFinePT pipeline integrates data acquisition, preprocessing, prompt-based annotation, and standardized evaluation. Multiple proprietary and open-weights LLMs were evaluated using identical prompts and experimental conditions, with performance measured through accuracy, precision, recall, and F1-score metrics, including robustness testing via reversed input ordering.
Results: Results show that LLMs can perform financial sentiment classification in European Portuguese with moderate reliability, achieving up to 0.781 accuracy, although pairwise differences among the three models with valid outputs were not statistically significant. Higher-tier proprietary models such as GPT 4.1 demonstrated stronger semantic interpretation but at substantially higher inference cost, whereas lighter proprietary variants and the open-weight LLaMA-4-Maverick-17B offered improved efficiency with reduced contextual sensitivity. Robustness experiments revealed generally stable model rankings but performance variability under altered input ordering.
Conclusion: The PipeFinePT pipeline provides a reproducible framework for integrating LLM-based sentiment analysis into applied financial information systems. The findings highlight both the feasibility and limitations of deploying LLMs in low-resource financial language environments and support their use as operational analytical components in multilingual financial analytics workflows.
Keywords: Sentiment analysis; Financial news; LLM; Portuguese; Prompt engineering; Natural language processing.
Received: March 9, 2026; Revised: July 29, 2026; Accepted: August 10, 2026; Prepublished online: August 18, 2026
References
- Araci, D. (2019). FinBERT: Financial sentiment analysis with pre-trained language models. arXiv preprint arXiv:1908.10063. https://arxiv.org/abs/1908.10063
- Ardekani, A. M., Bertz, J., Bryce, C., Dowling, M., & Long, S. (2024). FinSentGPT: A universal financial sentiment engine? International Review of Financial Analysis, 94, 103291. https://doi.org/10.1016/j.irfa.2024.103291
Go to original source... - Bommasani, R., Hudson, D. A., Adeli, E., Altman, R., Arora, S., von Arx, S., Bernstein, M. S., Bohg, J., Bosselut, A., Brunskill, E., Brynjolfsson, E., Buch, S., Card, D., Castellon, R., Chatterji, N., Chen, A., Creel, K., Davis, J. Q., Demszky, D., … Liang, P. (2021). On the opportunities and risks of foundation models. arXiv preprint arXiv:2108.07258. https://arxiv.org/abs/2108.07258
- Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D. M., Wu, J., Winter, C., … Amodei, D. (2020). Language models are few-shot learners. Advances in Neural Information Processing Systems 33 (NeurIPS 2020), (pp. 1877-1901). NIPS.
- Carnaz, G., Carvalho, J. M., & Marques, R. P. (2025). Finance Sentiment Analysis using Large Language Models in the Portuguese Context. In 2025 IEEE International Conference on Advances in Data-Driven Analytics and Intelligent Systems (ADACIS). IEEE. https://doi.org/10.1109/ADACIS65663.2025.11436272
Go to original source... - Carosia, A. E. O., Coelho, G. P., & Silva, A. E. A. da. (2019). Analyzing the Brazilian Financial Market through Portuguese Sentiment Analysis in Social Media. Applied Artificial Intelligence, 34(1), 1-19. https://doi.org/10.1080/08839514.2019.1673037
Go to original source... - Delgadillo, J., Kinyua, J., & Mutigwe, C. (2024). FinSoSent: Advancing Financial Market Sentiment Analysis through Pretrained Large Language Models. Big Data and Cognitive Computing, 8(8), 87. https://doi.org/10.3390/bdcc8080087
Go to original source... - Deng, X., Bashlovkina, V., Han, F., Baumgartner, S., & Bendersky, M. (2023). What do LLMs Know about Financial Markets? A Case Study on Reddit Market Sentiment Analysis. In WWW '23 Companion: Companion Proceedings of the ACM Web Conference 2023, (pp. 107-110). ACM. https://doi.org/10.1145/3543873.3587324
Go to original source... - Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019). BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT), (pp. 4171-4186). ACL. https://doi.org/10.18653/v1/N19-1423
Go to original source... - Huang, A., Wang, H., & Yang, Y. (2022). FinBERT: A Large Language Model for Extracting Information from Financial Text. Contemporary Accounting Research, 40(2), 806. https://doi.org/10.1111/1911-3846.12832
Go to original source... - Loughran, T., & McDonald, B. (2011). When is a liability not a liability? Textual analysis, dictionaries, and 10-Ks. The Journal of Finance, 66(1), 35-65. https://doi.org/10.1111/j.1540-6261.2010.01625.x
Go to original source... - Malo, P., Sinha, A., Takala, P., Korhonen, P., & Wallenius, J. (2014). Good debt or bad debt: Detecting semantic orientations in economic texts. Journal of the Association for Information Science and Technology, 65(4), 782-796. https://doi.org/10.1002/asi.23062
Go to original source... - Meier, L. F., & Althaus Junior, A. A. (2026). FinBERTimbau: Curated Brazilian Portuguese financial text corpus and sentiment annotation data (Version 1.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.18463339
Go to original source... - Meta. (2025). Llama 4 Community License Agreement. Meta Platforms. https://www.llama.com/llama4/license/
- Pang, B., & Lee, L. (2008). Opinion mining and sentiment analysis. Foundations and Trends in Information Retrieval, 2(1-2), 1-135. https://doi.org/10.1561/1500000011
Go to original source... - Pires, H., Paucar, V. L., & Carvalho, J. P. (2025). DeB3RTa: A Transformer-Based Model for the Portuguese Financial Domain. Big Data and Cognitive Computing, 9(3), 51. https://doi.org/10.3390/bdcc9030051
Go to original source... - Rogers, A., Kovaleva, O., & Rumshisky, A. (2020). A primer in BERTology: What we know about how BERT works. Transactions of the Association for Computational Linguistics, 8, 842-866. https://doi.org/10.1162/tacl_a_00349
Go to original source... - Santos, L. L., Bianchi, R. A. da C., & Reali Costa, A. H. (2023). FinBERT-PT-BR: Análise de sentimentos de textos em português do mercado financeiro. In Proceedings of the Brazilian Workshop on Artificial Intelligence in Finance (BWAIF), (pp. 144-155). Sociedade Brasileira de Computação. https://doi.org/10.5753/bwaif.2023.231151
Go to original source... - Tavares, C., Ribeiro, R., & Batista, F. (2021). Sentiment analysis of Portuguese economic news. In Proceedings of the 10th Symposium on Languages, Applications and Technologies (SLATE 2021). Schloss Dagstuhl-Leibniz-Zentrum für Informatik. https://doi.org/10.4230/OASIcs.SLATE.2021.17
Go to original source... - Wu, S., İrsoy, O., Lu, S., Dabravolski, V., Dredze, M., Gehrmann, S., Kambadur, P., Rosenberg, D., & Mann, G. (2023). BloombergGPT: A Large Language Model for Finance. arXiv (Cornell University). https://doi.org/10.48550/arxiv.2303.17564
Go to original source... - Zhang, B., Yang, H., & Liu, X.-Y. (2023a). Instruct-FinGPT: Financial Sentiment Analysis by Instruction Tuning of General-Purpose Large Language Models. SSRN Electronic Journal. https://doi.org/10.2139/ssrn.4489831
Go to original source... - Zhang, B., Yang, H., Zhou, T., Babar, M. A., & Liu, X.-Y. (2023b). Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language Models. In ICAIF '23: Proceedings of the Fourth ACM International Conference on AI in Finance, (pp. 349-356). ACM. https://doi.org/10.1145/3604237.3626866
Go to original source... - Zhao, W. X., Zhou, K., Li, J., Tang, T., Dong, Z., Hou, Y., Zhang, B., Min, Y., Zhang, J., Liu, P., Wang, X., Du, Y., Yang, C., Chen, Y., Chen, Z., Jiang, J., Ren, R., Li, Y., Tang, X., . . . Wen, J. (2026). A survey of large language models. Frontiers of Computer Science, 20(12), 2012627. https://doi.org/10.1007/s11704-026-60308-3
Go to original source...
This is an open access article distributed under the terms of the Creative Commons Attribution 4.0 International License (CC BY 4.0), which permits use, distribution, and reproduction in any medium, provided the original publication is properly cited. No use, distribution or reproduction is permitted which does not comply with these terms.

ORCID...