Ítem
Acceso Abierto

Predicción del comportamiento de un índice bursátil usando Deep Learning y Procesamiento de Lenguaje Natural

dc.contributor.advisorSánchez Salazar, Fabián
dc.creatorMoreno Vahos, Samuel David
dc.creator.degreeProfesional en Matemáticas Aplicadas y Ciencias de la Computación
dc.creator.degreeLevelPregrado
dc.date.accessioned2025-09-25T19:49:39Z
dc.date.available2025-09-25T19:49:39Z
dc.date.created2025-09-15
dc.descriptionEn este trabajo de grado se estudió la predicción del comportamiento del índice bursátil colombiano MSCI COLCAP mediante técnicas de aprendizaje profundo y procesamiento de lenguaje natural. Para esto, se entrenaron redes neuronales LSTM con los precios y volúmenes históricos del índice, la tasa de cambio representativa del mercado (TRM) y el sentimiento de noticias económicas y financieras. Con estos datos, se predijeron los cambios en el precio de cierre del COLCAP con 1, 2 y 3 días de anticipación. Al mismo tiempo, se implementaron modelos tanto de regresión como de clasificación, evaluando diferentes combinaciones de variables y ventanas temporales. Los modelos de regresión no generalizaron bien, ya que presentaron sobreajuste, valores negativos de R^2 en prueba y errores absolutos mayores al cambio promedio del índice. En contraste, al simplificar el problema como una tarea de clasificación binaria (aumento o disminución del COLCAP), los modelos exhibieron métricas de exactitud consistentes. También se destaca que la inclusión del análisis de sentimiento y de la TRM aportó mejoras relevantes en el desempeño, sobre todo para predicciones a uno y tres días en el futuro. Además, al simplificar los datos de entrada (utilizando únicamente sus signos), se redujo el ruido y se mejoró la generalización de los modelos, obteniendo valores de exactitud entre 52% y 59% en datos desconocidos, especialmente con ventanas de 20 a 50 días. Finalmente, se concluye que predecir la dirección del mercado, es decir, si aumenta o disminuye el valor del COLCAP, es más viable que estimar con precisión la variación exacta de este índice, y que el sentimiento de mercado aporta información valiosa para las predicciones.
dc.description.abstractIn this undergraduate thesis, the prediction of the behavior of the Colombian stock market index MSCI COLCAP was studied using deep learning techniques and natural language processing. To this end, LSTM neural networks were trained with the historical prices and volumes of the index, the market representative exchange rate (TRM, for its acronym in Spanish), and the sentiment of economic and financial news articles. With these data, changes in the COLCAP’s closing price were predicted at 1, 2, and 3 days in advance. At the same time, both regression and classification models were implemented, evaluating different combinations of variables and sliding time windows. The regression models did not generalize well, as they showed overfitting, negative R^2 values on the test set, and absolute errors greater than the average change of the index. In contrast, by simplifying the problem into a binary classification task (increase or decrease of the COLCAP), the models showed consistent accuracy metrics. It is also highlighted that the inclusion of sentiment analysis and TRM provided relevant improvements in performance, especially for predictions one and three days in the future. Furthermore, by simplifying the input data (using only their signs), noise was reduced and generalization of the models was improved, obtaining accuracy scores between 52% and 59% on unknown data, especially with windows of 20 to 50 days. Finally, it is concluded that predicting the direction of the market, that is, whether the value of the COLCAP increases or decreases, is more feasible than precisely estimating the exact variation of the index, and that market sentiment provides valuable information for predictions.
dc.format.extent42 pp
dc.format.mimetypeapplication/pdf
dc.identifier.doihttps://doi.org/10.48713/10336_46630
dc.identifier.urihttps://repository.urosario.edu.co/handle/10336/46630
dc.language.isospa
dc.publisherUniversidad del Rosario
dc.publisher.departmentEscuela de Ciencias e Ingeniería
dc.publisher.programPrograma de Matemáticas Aplicadas y Ciencias de la Computación - MACC
dc.rightsAttribution-NonCommercial-ShareAlike 4.0 International*
dc.rights.accesRightsinfo:eu-repo/semantics/openAccess
dc.rights.accesoAbierto (Texto Completo)
dc.rights.urihttp://creativecommons.org/licenses/by-nc-sa/4.0/*
dc.source.bibliographicCitationK. Rojas-Jimenez, Ciencia de Datos para Ciencias Naturales. Bookdown, 2022, ch. Análisis de Series de Tiempo. [Online]. Available: https://bookdown.org/keilor_rojas/CienciaDatos/análisis-de-series-de-tiempo.html
dc.source.bibliographicCitationW. W. S. Wei, Time Series Analysis: Univariate and Multivariate Methods, 2nd ed. Pearson Education, 2006.
dc.source.bibliographicCitationP. J. Brockwell and R. A. Davis, Introduction to Time Series and Forecasting, 2nd ed., ser. Springer Texts in Statistics, G. Casella, S. Fienberg, and I. Olkin, Eds. Springer, 2010.
dc.source.bibliographicCitationM. F. Dixon, I. Halperin, and P. Bilokon, Machine Learning in Finance: From Theory to Practice. Springer Nature, 2020, ch. Advanced Neural Networks.
dc.source.bibliographicCitationH. Lane, C. Howard, and H. M. Hapke, Natural Language Processing in Action: Understanding, analyzing, and generating text with Python. Shelter Island, NY: Manning Publications, 2019.
dc.source.bibliographicCitationGamco, “LSTM: Long short-term memory.” [Online]. Available: https://gamco.es/glosario/lstm-long-short-term-memory/
dc.source.bibliographicCitationI. Goodfellow, Y. Bengio, and A. Courville, Deep Learning. MIT Press, 2016, ch. Sequence Modeling: Recurrent and Recursive Nets.
dc.source.bibliographicCitationBolsa de Valores de Colombia, “Los elementos más relevantes de los índices.” [Online]. Available: https://www.bvc.com.co/indices-descripcion-general
dc.source.bibliographicCitationBanco Santander, “¿Qué es un índice bursátil?” [Online]. Available: https://www.bancosantander.es/glosario/indice-bursatil
dc.source.bibliographicCitationBloomberg, “Bloomberg Terminal.” [Online]. Available: https://www.bloomberg.com/professional/terminal-overview/
dc.source.bibliographicCitationBolsa de Valores de Colombia, “MSCI COLCAP.” [Online]. Available: https://www.bvc.com.co/msci-colcap
dc.source.bibliographicCitationBanco de la República | Colombia, “Tasa de cambio o tasa de cambio representativa del mercado (TRM).” [Online]. Available: https://www.banrep.gov.co/es/glosario/tasa-cambiotrm
dc.source.bibliographicCitationBanco de la República | Colombia, “Estadísticas económicas: Tasa de cambio Representativa del Mercado (TRM).” [Online]. Available: https://suameca.banrep.gov.co/estadisticaseconomicas/informacionSerie/1/tasa_cambio_peso_colombiano_trm_dolar_usd
dc.source.bibliographicCitationO. Blanchard and D. Pérez-Enrri, Macroeconomía: Aplicaciones para Latinoamérica, 2nd ed. Buenos Aires: Pearson Education, 2011, ch. El mercado de bienes en una economía abierta.
dc.source.bibliographicCitationThe Data Visualisation Catalogue, “Gráfico de Velas.” [Online]. Available: https://datavizcatalogue.com/ES/metodos/grafico_de_velas.html
dc.source.bibliographicCitationJ. J. Murphy, Análisis Técnico de los Mercados Financieros. Barcelona: Ediciones Gestión 2000, 2000.
dc.source.bibliographicCitationGoogle Research, “TensorFlow code and pre-trained models for BERT.” [Online]. Available: https://github.com/google-research/bert
dc.source.bibliographicCitationJ. Devlin et al., “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, vol. 1, 2019, pp. 4171–4186. [Online]. Available: https://api.semanticscholar.org/CorpusID:52967399
dc.source.bibliographicCitationS. Shen, H. Jiang, and T. Zhang, “Stock Market Forecasting Using Machine Learning Algorithms,” Department of Electrical Engineering, Stanford University, Stanford, CA, 2012.
dc.source.bibliographicCitationY. Song, Y. Zhou, and R. Han, “Neural networks for stock price prediction,” arXiv preprint, May 2018, doi: 10.48550/arXiv.1805.11317.
dc.source.bibliographicCitationM. Roondiwala, H. Patel, and S. Varma, “Predicting Stock Prices Using LSTM,” International Journal of Science and Research (IJSR), vol. 6, no. 4, pp. 1754–1756, Apr 2017, doi: 10.21275/ART20172755.
dc.source.bibliographicCitationX. Sha, “Time Series Stock Price Forecasting Based on Genetic Algorithm (GA)-Long ShortTerm Memory Network (LSTM) Optimization,” arXiv preprint, May 2024, doi: 10.48550/arXiv.2405.03151.
dc.source.bibliographicCitationA. Deep, “A Multifactor Analysis Model for Stock Market Prediction,” International Journal of Computer Science and Telecommunications, vol. 14, no. 1, Feb 2023.
dc.source.bibliographicCitationS. Zhong and D. Hitchcock, “S&P 500 Stock Price Prediction Using Technical, Fundamental and Text Data,” Statistics, Optimization & Information Computing, vol. 9, no. 4, p. 769–788, Nov 2021, doi: 10.19139/soic-2310-5070-1362.
dc.source.bibliographicCitationD. S. Osorio-Aristizábal, “Comparación de modelos de series temporales ARIMA, SARIMAX y LSTM para la predicción del índice COLCAP,” Master’s thesis, Universidad EAFIT, Medellín, 2024. [Online]. Available: https://hdl.handle.net/10784/34670
dc.source.bibliographicCitationPortafolio, “Noticias económicas de Colombia y el Mundo.” [Online]. Available: https://www.portafolio.co/
dc.source.bibliographicCitationLa República, “Noticias de Economía, Finanzas, Empresas y Negocios de Colombia y el mundo.” [Online]. Available: https://www.larepublica.co/
dc.source.bibliographicCitationLa República, “BVC no abrió sesión de negociación de renta variable por dificultades técnicas.” [Online]. Available: https://www.larepublica.co/finanzas/operacion-en-la-bvc-noiniciara-en-su-horario-habitual-por-dificultades-tecnicas-2977227
dc.source.bibliographicCitationLa República, “Expectativa por la Bolsa de Valores de Colombia tras una jornada sin negociación.” [Online]. Available: https://www.larepublica.co/finanzas/expectativa-por-labolsa-de-valores-de-colombia-tras-una-jornada-sin-negociacion-2978044
dc.source.bibliographicCitationJ. Cañete et al., “Spanish Pre-Trained BERT Model and Evaluation Data,” in PML4DC at ICLR 2020, 2020. [Online]. Available: https://huggingface.co/dccuchile/bert-base-spanishwwm-cased
dc.source.bibliographicCitationbards.ai, “Finance Sentiment ES (base).” [Online]. Available: https://huggingface.co/bardsai/finance-sentiment-es-base
dc.source.instnameinstname:Universidad del Rosario
dc.source.reponamereponame:Repositorio Institucional EdocUR
dc.subjectMSCI COLCAP
dc.subjectÍndice bursátil
dc.subjectAprendizaje profundo
dc.subjectProcesamiento de lenguaje natural
dc.subjectLSTM
dc.subjectAnálisis de sentimiento
dc.subjectPredicción de mercado
dc.subject.keywordMSCI COLCAP
dc.subject.keywordStock index
dc.subject.keywordMarket prediction
dc.subject.keywordDeep learning
dc.subject.keywordNatural language processing
dc.subject.keywordLSTM
dc.subject.keywordSentiment analysis
dc.titlePredicción del comportamiento de un índice bursátil usando Deep Learning y Procesamiento de Lenguaje Natural
dc.title.TranslatedTitlePrediction of the Behavior of a Stock Index using Deep Learning and Natural Language Processing
dc.typebachelorThesis
dc.type.hasVersioninfo:eu-repo/semantics/acceptedVersion
dc.type.spaTrabajo de grado
local.department.reportEscuela de Ciencias e Ingeniería
local.regionesBogotá
Archivos
Bloque original
Mostrando1 - 1 de 1
Cargando...
Miniatura
Nombre:
Prediccion_del_comportamiento_de_un_indice_bursatil.pdf
Tamaño:
1.08 MB
Formato:
Adobe Portable Document Format
Descripción: