Estimación de la incertidumbre en Ecopetrol: aplicación de PNL y modelos Bert para la caracterización empresarial
Estimating uncertainty at Ecopetrol: Applying NLP and BERT models for business characterization
Fernando Cárdenas García
,
Gregorio Izquierdo Llanes
, [popup_anything id=»6815″
Suma de Negocios, 16(35), 140-156, julio-diciembre 2025, ISSN 2215-910X
https://doi.org/10.14349/sumneg/2025.V16.N35.A4
Recibido: 29 de diciembre de 2024
Aceptado: 20 de julio de 2025
Online: 22 de septiembre de 2025
Introducción/objetivo: este estudio busca desarrollar un indicador de incertidumbre para Ecopetrol, una de las principales empresas del sector energético en Colombia, mediante el análisis de sentimientos en noticias y reportes financieros. La investigación aborda un vacío en la literatura al combinar análisis de sentimientos con datos específicos del sector energético.
Metodología: mediante técnicas avanzadas de procesamiento de lenguaje natural (PLN) y modelos de aprendizaje profundo como BERT, se busca cuantificar de qué manera la percepción del mercado, reflejada en textos, influye en la volatilidad de los activos de la compañía. Se emplearon modelos de lenguaje como FinBERT, XLM-RoBERTa, BETO y DeBERTa, para analizar sentimientos en textos multilingües (español e inglés).
Resultados: los picos de entropía en titulares (español/inglés) coincidieron con eventos clave, mostrando una correlación con la volatilidad de Ecopetrol; mientras que los análisis con FinBERT y XLM-RoBERTa, se destacan en la precisión para textos financieros y la captura de percepciones multilingües.
Conclusiones: se identifica una relación negativa entre sentimiento positivo y volatilidad, sugiriendo que el optimismo reduce la incertidumbre del mercado. El estudio demuestra que el análisis de sentimientos con IA es una herramienta valiosa para predecir volatilidad en mercados emergentes.
Palabras clave:
Incertidumbre,
procesamiento de lenguaje natural,
modelos BERT,
análisis de sentimientos,
volatilidad financiera,
Ecopetrol.
Códigos JEL:
G14, G41, C45, Q40
Introduction/Objective: This study aims to develop an uncertainty indicator for Ecopetrol, one of the leading companies in Colombia’s energy sector, through sentiment analysis of news articles and financial reports. The research addresses a gap in the literature by combining sentiment analysis with energy sector-specific data.
Methodology: Using advanced Natural Language Processing (NLP) techniques and deep learning models such as BERT, the study seeks to quantify how market perception—reflected in textual data—affects the volatility of the company’s assets. Language models such as FinBERT, XLM-RoBERTa, BETO, and DeBERTa were used to analyze sentiment in multilingual texts (Spanish and English).
Results: Spikes in headline entropy (Spanish/English) aligned with key events, showing a correlation with Ecopetrol’s volatility. Sentiment analyses using FinBERT and XLM-RoBERTa stood out for their accuracy in financial texts and their ability to capture multilingual perceptions.
Conclusions: A negative relationship was identified between positive sentiment and volatility, suggesting that optimism reduces market uncertainty. The study demonstrates that AI-based sentiment analysis is a valuable tool for forecasting volatility in emerging markets.
Keywords:
Uncertainty,
natural language processing,
BERT,
sentiment analysis,
financial volatility,
Ecopetrol.
Atif, M., Raza Rabbani, M., Bawazir, H., Hawaldar, I. T., Chebab, D., Karim, S., & AlAbbas, A. (2022). Oil price changes and stock returns: Fresh evidence from oil exporting and oil importing countries. Cogent Economics & Finance, 10(1), 2018163. https://doi.org/10.1080/23322039.2021.2018163
Araci, D. (2019). Finbert: Financial sentiment analysis with pre-trained language models. arXiv preprint arXiv:1908.10063.
Baker, S. R., Bloom, N., & Davis, S. J. (2016). Measuring economic policy uncertainty. The Quarterly Journal of Economics, 131(4), 1593-1636. https://doi.org/10.1093/qje/qjw024
Baker, S. R., Bloom, N., Davis, S. J., & Kost, K. J. (2019). Policy news and stock market volatility (NBER Working Paper No. 25720). National Bureau of Economic Research. https://doi.org/10.3386/w25720
Bermpei, T., Kalyvas, A. N., Neri, L., & Russo, A. (2022). Does economic policy uncertainty matter for financial reporting quality? Evidence from the United States. Review of Quantitative Finance and Accounting, 58(2), 795-845. https://doi.org/10.1007/s11156-021-01010-2
Biktimirov, E. N., Sokolyk, T., & Ayanso, A. (2021). Sentiment and hype of business media topics and stock market returns during the COVID-19 pandemic. Journal of Behavioral and Experimental Finance, 31, 100542. https://doi.org/10.1016/j.jbef.2021.100542
Bloom, N. (2009). The impact of uncertainty shocks. Econometrica, 77(3), 623-685. https://doi.org/10.3982/ECTA6248
Candelo Viáfara, J. M., Oviedo Gómez, A., & Lozano Mejía, E. (2023). Macroeconomía y mercado bursátil: el impacto y la transmisión de volatilidad de las variables macroeconómicas al mercado bursátil colombiano. Revista Facultad de Ciencias Económicas, 31(1), 103-117. https://doi.org/10.18359/rfce.6413
Chauhan, Y., & Jaiswall, M. (2023). Economic policy uncertainty and incentive to smooth earnings. International Review of Economics & Finance, 85, 93-106. https://doi.org/10.1016/j.iref.2023.01.014
Chen, P., Boukouvalas, Z., & Corizzo, R. (2024). A deep fusion model for stock market prediction with news headlines and time series data. Neural Computing & Applications, 36, 21229-21271. https://doi.org/10.1007/s00521-024-10303-1
Chen, X., Xie, H., Li, Z., Zhang, H., Tao, X., & Wang, F. L. (2025). Sentiment analysis for stock market research: A bibliometric study. Natural Language Processing Journal, 10, 100125. https://doi.org/10.1016/j.nlp.2025.100125
Chen, Y., Dong, S., Qian, S., & Chung, K. (2024). Impact of oil price volatility and economic policy uncertainty on business investment-Insights from the energy sector. Heliyon, 10(5), e26533. https://doi.org/10.1016/j.heliyon.2024.e26533
Choi, S., & Yoon, C. (2022). Uncertainty, financial markets, and monetary policy over the last century. The BE Journal of Macroeconomics, 22(2), 397-434. https://doi.org/10.1515/bejm-2020-0013
Conneau, A., Khandelwal, K., Goyal, N., Chaudhary, V., Wenzek, G., Guzmán, F., & Lample, G. (2020). Unsupervised cross-lingual representation learning at scale. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, 8440-8451. https://doi.org/10.48550/arXiv.1911.02116
Das, N., Sadhukhan, B., Chatterjee, R., & Chakrabarti, S. (2024a). Integrating sentiment analysis with graph neural networks for enhanced stock prediction: A comprehensive survey. Decision Analytics Journal, Article 100417. https://doi.org/10.1016/j.dajour.2024.100417
Das, N., Sadhukhan, B., Bhakta, S.S., Chakrabarti, S. (2024b). Integrating EEMD and ensemble CNN with X (Twitter) sentiment for enhanced stock price predictions. Social Network Analysis and Mining, 14(1), Article 29. https://doi.org/10.1007/s13278-023-01190-w
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
Devlin, J., Chang, M., Lee, K., & Toutanova, K. (2018). 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. Volume 1 (Long and Short Papers), (pp. 4171-4186). Association for Computational Linguistics. https://aclanthology.org/N19-1423/
Du, K., Xing, F., Mao, R., & Cambria, E. (2024). Financial sentiment analysis: Techniques and applications. ACM Computing Surveys, 56(1), 1-42. https://doi.org/10.1145/3649451
Dzielinski, M. (2012). Measuring economic uncertainty and its impact on the stock market. Finance Research Letters, 9(3), 167-175. https://doi.org/10.1016/j.frl.2011.10.003
Fama, E. F. (1970). Efficient capital markets: A review of theory and empirical work. The Journal of Finance, 25(2), 383-417. https://doi.org/10.2307/2325486
Fatouros, G., Soldatos, J., Kouroumali, K., Makridis, G., & Kyriazis, D. (2023). Transforming sentiment analysis in the financial domain with ChatGPT. Machine Learning with Applications, 14, 100508. https://doi.org/10.1016/j.mlwa.2023.100508
Hao, J., He, F., Ma, F., Zhang, S., & Zhang, X. (2025). Machine learning vs deep learning in stock market investment: An international evidence. Annals of Operations Research, 348(1), Article 105654, 93-115. https://doi.org/10.1007/s10479-023-05286-6
Heydarian, P., Bifet, A., & Corbet, S. (2025). Understanding market sentiment analysis: A survey. Journal of Economic Surveys, 39(3), 1125-1147. https://doi.org/10.1111/joes.12645
Inserte, P. R., Nakhlé, M., Qader, R., Caillaut, G., & Liu, J. (2024). Large language model adaptation for financial sentiment analysis. arXiv preprint arXiv:2401.14777.
https://doi.org/10.48550/arXiv.2401.14777
Kellogg, R. (2014). The effect of uncertainty on investment: Evidence from Texas oil drilling. American Economic Review, 104(6), 1698-1734. https://doi.org/10.1257/aer.104.6.1698
Kjærland, F., Kosberg, F., & Misje, M. (2021). Accrual earnings management in response to an oil price shock. Journal of Commodity Markets, 22, 100138. https://doi.org/10.1016/j.jcomm.2020.100138
Liapis, C. M., Karanikola, A., & Kotsiantis, S. (2023). Investigating deep stock market forecasting with sentiment analysis. Entropy, 25(2), 219. https://doi.org/10.3390/e25020219
Liu, C., Arulappan, A., Naha, R., Mahanti, A., Kamruzzaman, J., & Ra, I. H. (2024). Large language models and sentiment analysis in financial markets: A review, datasets and case study. Ieee Access. https://doi.org/10.1109/ACCESS.2024.3445413
Loginova, E., Tsang, W. K., van Heijningen, G., Kerkhove, L. P., & Benoit, D. F. (2024). Forecasting directional bitcoin price returns using aspect-based sentiment analysis online text data. Machine Learning, 113(7), 4761-4784. https://doi.org/10.1007/s10994-021-06095-3
Mamman, S. O., Iliyasu, J., Ahmed, U. A., & Salami, F. (2024). Global uncertainties, geopolitical risks and price exuberance: Evidence from international energy market. OPEC Energy Review, 48(2), 63-120. https://doi.org/10.1111/opec.12297
Nannepagu, M., Babu, D. B., & Madhuri, C. B. (2024). Leveraging hybrid AI models: DQN, Prophet, BERT, ART-NN, and transformer-based approaches for advanced stock market forecasting. International Journal of Engineering Science and Advanced Technology, 24(12), 144-151. https://www.ijesat.com/ijesat/files/V24I1220_1735359632.pdf
Panousi, V., & Papanikolaou, D. (2012). Investment, idiosyncratic risk, and ownership. The Journal of Finance, 67(3), 1113-1148. https://doi.org/10.1111/j.1540-6261.2012.01743.x
Paule Vianez, J. (2020). Influencia de la incertidumbre de política económica en los mercados financieros [tesis doctoral, Universidad Rey Juan Carlos]. http://hdl.handle.net/10115/17553
Rao, A., Tedeschi, M., Mohammed, K. S., & Shahzad, U. (2024). Role of economic policy uncertainty in energy commodities prices forecasting: Evidence from a hybrid deep learning approach. Computational Economics, 64(6), 3295-3315. https://doi.org/10.1007/s10614-024-10550-3
Rigamonti, A. P., Greco, G., Pierotti, M., & Capocchi, A. (2024). Macroeconomic uncertainty and earnings management: Evidence from commodity firms. Review of Quantitative Finance and Accounting, 62(4), 1615-1649. https://doi.org/10.1007/s11156-024-01246-8
Sáenz del Río, D. (2016). El impacto de los precios del petróleo y el dólar en los estados financieros de Ecopetrol S. A. [tesis de pregrado, Universidad de La Sabana]. http://hdl.handle.net/10818/21908
Sayeed, M. S., Mohan, V., & Sonai Muthu Anbananthen, K. (2023). Bert: A review of applications in sentiment analysis. HighTech and Innovation Journal, 4(2), 453-462. https://doi.org/10.28991/HIJ-2023-04-02-015
Shobayo, O., Adeyemi-Longe, S., Popoola, O., & Ogunleye, B. (2024). Innovative sentiment analysis and prediction of stock price using FinBERT, GPT-4 and logistic regression: A data-driven approach. Big Data and Cognitive Computing, 8(11), 143. https://doi.org/10.3390/bdcc8110143
Siddique, M. T., Jamee, S. S., Sajal, A., Mou, S. N., Mahin, M. R. H., Obaid, M. O., …, & Hasan, M. (2025). Enhancing automated trading with sentiment analysis: Leveraging large language models for stock market predictions. The American Journal of Engineering and Technology, 7(03), 185-195. https://doi.org/10.37547/tajet/Volume07Issue03-16
Smales, L. A. (2021). Geopolitical risk and volatility spillovers in oil and stock markets. Quarterly Review of Economics and Finance, 80, 358-366. https://doi.org/10.1016/j.qref.2021.03.008
Szczygielski, J. J., Charteris, A., Bwanya, P. R., & Brzeszczyński, J. (2024). Google search trends and stock markets: Sentiment, attention or uncertainty? International Review of Financial Analysis, 91, 102549. https://doi.org/10.1016/j.irfa.2023.102549
Tedeschi, M., Foglia, M., Bouri, E., & Dai, P. F. (2024). How does climate policy uncertainty affect financial markets? Evidence from Europe. Economics Letters, 234, 111443. https://doi.org/10.1016/j.econlet.2023.111443
Trust, P., Zahran, A., & Minghim, R. (2023). Understanding the influence of news on society decision making: Application to economic policy uncertainty. Neural Computing and Applications, 35(20), 14929-14945. https://doi.org/10.1007/s00521-023-08438-8
Yin, H., & Yang, Q. (2023). Investor sentiment mining based on Bi-LSTM model and its impact on stock price bubbles. Studies in Nonlinear Dynamics & Econometrics, 27(1), 1-25. https://doi.org/10.1515/snde-2022-0028
Zhao, L., Li, L., Zheng, X., & Zhang, J. (2021). A BERT based sentiment analysis and key entity detection approach for online financial texts. In 2021 IEEE 24th International conference on computer supported cooperative work in design (CSCWD) (pp. 1233-1238). IEEE.
Dimensions
PlumX
Instituciones
Universidad Militar Nueva Granada, Bogotá, Colombia
Universidad Nacional de Educación a Distancia, Madrid, España
Universidad Sergio Arboleda, Bogotá, Colombia
Copyright © 2025. Fundación Universitaria Konrad Lorenz, Colombia