Smart Buy and Hold

Purchase Signaling for Blue-Chip Stocks with Random Forest

Authors

  • Marcus Cezar Moreira Ferraz Centro Universitário de Maceió
  • Gabriel Canuto de Alencar Centro Universitário de Maceió
  • João Gabriel Gama Vila Nova Centro Universitário de Maceió

Keywords:

Machine Learning, Portfolio Optimization, Random Forest, Buy and Hold, Backtesting

Abstract

The optimization of entry points is a critical factor in enhancing long-term returns within the Buy and Hold strategy. This project addresses this challenge by developing and evaluating a framework that utilizes Random Forest models to predict opportune buying moments in a portfolio of blue-chip stocks. The effectiveness of the signals generated by the models is validated through a backtesting system, which compares the performance of dynamic allocation strategies against passive benchmarks. The results indicate that Machine Learning-guided timing can offer significant advantages, and the project also contributes its methodological structure for testing quantitative strategies.

References

Achelis, S. B. & Achelis, S. (2001). Technical Analysis from A to Z. McGraw Hill New York.

Aziz, S., Dowling, M., Ghandour, A., & Trigonometricio, P. (2022). Machine learning in finance: A topic modeling approach. European Financial Management, 28(3), 744–770.

B3. (2025). B3 - Brasil, Bolsa, Balcão. Disponível em: https://www.b3.com.br/. Acesso em: 13 de agosto de 2024.

B3. (2024). Pessoas Físicas na B3. Acessado em 13 de agosto de 2024, de https://www.b3.com.br/pt_br/noticias/pessoas-fisicas-na-b3.htm

Ballings, M., Van den Poel, D., Hespeels, N., & Gryp, R. (2015). Evaluating multiple classifiers for stock price direction prediction. Expert systems with Applications, 42(20), 7046–7056.

Botache, D., Pérez, D., & Arbeláez, P. (2023). Unraveling the complexity of splitting sequential data: tackling challenges in video and time series analysis. arXiv preprint arXiv:2307.14294.

Brader, T. (2020). Campaigning for hearts and minds: How emotional appeals in political ads work. University of Chicago Press.

Campbell, S. D. (2005). A review of backtesting and backtesting procedures. Finance and Economics Discussion Series 2005-21, Board of Governors of the Federal Reserve System (U.S.).

Cooper, B. S. (2018). Interactive Planning and Sensing for Aircraft in Uncertain Environments with Spatiotemporally Evolving Threats [Tese de Doutorado, The Pennsylvania State University].

da Silva SANTOS, G. F., da Silva SANTOS, C. A., & MARQUES, N. L. (2021). A estratégia de buy and hold na composição da carteira de jovens investidores da baixada fluminense. Caderno de Administração, 29(2), 6–31.

Damodaran, A. (1997). Avaliação de investimentos: ferramentas e técnicas para determinação do valor. Qualitymark Editora Ltda.

Deboeck, G. J. (1994). Trading on the edge: neural, genetic, and fuzzy systems for chaotic financial markets. John Wiley & Sons.

El Naqa, I. & Murphy, M. J. (2015). What is machine learning?. Em Machine learning in radiation oncology: theory and applications (pp. 3–11). Springer International Publishing, Cham.

Haryanto, J. T. (2024). Short-Term Versus Long-Term Portfolio Management Strategies and the Selection of Securities. Advances in Management & Financial Reporting, 2(1), 11–23.

Investidor10. (2025). Investidor10 - Ajudando você a investir melhor. Disponível em: https://investidor10.com.br/. Acesso em: 13 de agosto de 2024.

Ma, Y., Han, R., & Wang, W. (2021). Portfolio optimization with return prediction using deep learning and machine learning. Expert Systems with Applications, 165, 113973.

Malek, N. H. A., Wan Yaacob, W. H. M., Mohammad, N. A., & Abdul-Ghaffar, A. (2022). Prediction of water quality classification of the Kelantan River Basin, Malaysia, using machine learning techniques. Water, 14(7), 1067.

Navlani, A., Fandango, A., & Idris, I. (2021). Python Data Analysis: Perform data collection, data processing, wrangling, visualization, and model building using Python. Packt Publishing Ltd.

Newman, J. L., Fuqua, D. R., Gray, E. A., & Simpson, D. B. (2006). Gender differences in the relationship of anger and depression in a clinical sample. Journal of Counseling & Development, 84(2), 157-162.

Oğuz, R. F., Eyercioğlu, Ö. K., & Avci, D. (2019). On the use of technical analysis indicators for stock market price movement direction prediction. Em 2019 27th Signal Processing and Communications Applications Conference (SIU) (pp. 1–4). IEEE.

Pixley, J. (2004). Emotions in finance: Distrust and uncertainty in global markets. Cambridge University Press.

Scikit-learn developers. (2024). sklearn.pipeline.Pipeline. Acessado em 29 de julho de 2025, de https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html

Status Invest. (2025). Status Invest - Análise de Ações, Fundos Imobiliários e muito mais. Disponível em: https://statusinvest.com.br/. Acesso em: 13 de agosto de 2024.

Shaik, A. B. & Srinivasan, S. (2018). A brief survey on random forest ensembles in classification model. Em International Conference on Innovative Computing and Communications: Proceedings of ICICC 2018, Volume 2 (pp. 253–260). Springer Singapore.

Silva, N. F., de Andrade, L. P., da Silva, W. S., de Melo, M. K., & Tonelli, A. O. (2024). Portfolio optimization based on the pre-selection of stocks by the Support Vector Machine model. Finance Research Letters, 61, 105014.

Zheng, J., Xin, D., Cheng, Q., Tian, M., & Yang, L. (2024). The random forest model for analyzing and forecasting the us stock market in the context of smart finance. arXiv preprint arXiv:2402.17194.

Downloads

Published

2026-08-03

Issue

Section

Research Papers (Artigos Completos WANDA 2025)