Using Machine Learning to Prevent Losses in the Brazilian Stock Market During the Covid-19 Pandemic
Keywords:
Stock Market, Machine Learning, Covid-19Abstract
The Covid-19 Pandemic caused unprecedented changes in our society, going from human behavior modification areas to stock market crashes around the world. In fact, while the virus spread among several countries, investors watched great stock market losses during the period, especially in Brazil, in which the Ibovespa index presented a fall of almost 50% in its value. Thus, there is a need to investigate strategies to, at least, mitigate the losses during a stock market crisis, and, recently, Machine Learning techniques have played a key role in this process. Therefore, this work aims to propose an investigation of Machine Learning techniques in order to prevent stock market losses in the Brazilian stock market during the Covid-19 pandemic. We study commonly used algorithms in the financial area: Linear Regression, Support Vector Machines, Random Forest, XGBoost, Multilayer Perceptron, and an Ensemble composed by the combination of all of the mentioned models, all of them fed with historical stock prices and technical indicators. Our results show that, when properly tuned, some of the Machine Learning models could even bring a little profit during the Covid-19 pandemic, and, finally, we also present some guidelines for investors’ choice when considering investing in a future market crisis.
Downloads
References
S. Pilz, V. Theiler-Schwetz, C. Trummer, R. Krause, and J. P. A. Ioannidis, “SARS-CoV-2 reinfections: Overview of efficacy and duration of natural and hybrid immunity,” Environ. Res., vol. 209, no. January, p. 112911, 2022.
J. Herby, L. Jonung, and S. H. Hanke, “A literature review and meta-analysis of ethe effects of lockdowns on COVID-19 mortality,” Stud. Appl. Econ., no. 200, 2022.
A. Lo, “The adaptive market hypothesis: market efficiency from an evolutionary perspective,” J. Portf. Manag., vol. 30, no. 5, pp. 15–29, 2004.
S. B. Achelis, “Technical Analysis from A to Z,” Search, vol. 77, pp. 33–4, 2000.
A. Picasso, S. Merello, Y. Ma, L. Oneto, and E. Cambria, “Technical analysis and sentiment embeddings for market trend prediction,” Expert Syst. Appl., vol. 135, pp. 60–70, Nov. 2019.
M. M. Kumbure, C. Lohrmann, P. Luukka, and J. Porras, “Machine learning techniques and data for stock market forecasting: A literature review,” Expert Syst. Appl., vol. 197, p. 116659, Jul. 2022.
J. J. Duarte, S. Montenegro González, and J. C. Cruz, “Predicting Stock Price Falls Using News Data: Evidence from the Brazilian Market,” Comput. Econ., no. 0123456789, 2020.
X. Su, X. Yan, and C.-L. Tsai, “Linear regression,” WIREs Comput Stat, vol. 4, pp. 275–294, 2012.
W. S. Noble, “What is a support vector machine?,” Nat. Biotechnol. 2006 2412, vol. 24, no. 12, pp. 1565–1567, Dec. 2006.
L. Breiman, “Random Forests,” Mach. Learn. 2001 451, vol. 45, no. 1, pp. 5–32, Oct. 2001.
T. Chen and C. Guestrin, “XGBoost: A Scalable Tree Boosting System,” Proc. 22nd ACM SIGKDD Int. Conf. Knowl. Discov. Data Min.
Y. Zhang and A. Haghani, “A gradient boosting method to improve travel time prediction,” Transp. Res. Part C Emerg. Technol., vol. 58, pp. 308–324, Sep. 2015.
M. W. Gardner and S. R. Dorling, “Artificial neural networks (the multilayer perceptron)—a review of applications in the atmospheric sciences,” Atmos. Environ., vol. 32, no. 14–15, pp. 2627–2636, Aug. 1998.
B. M. Henrique, V. A. Sobreiro, and H. Kimura, “Literature review: Machine learning techniques applied to financial market prediction R,” Expert Syst. Appl., vol. 124, pp. 226–251, 2019.
S. Rajabi, P. Roozkhosh, and N. M. Farimani, “MLP-based Learnable Window Size for Bitcoin price prediction,” Appl. Soft Comput., vol. 129, p. 109584, Nov. 2022.
I. Medarhri, M. Hosni, N. Nouisser, F. Chakroun, and K. Najib, “Predicting Stock Market Price Movement using Machine Learning Techniques,” 2022 8th Int. Conf. Optim. Appl., pp. 1–5, Oct. 2022.
Z. Rustam and P. Kintandani, “Application of Support Vector Regression in Indonesian Stock Price Prediction with Feature Selection Using Particle Swarm Optimisation,” Model. Simul. Eng., vol. 2019, 2019.
M. Sedighi, H. Jahangirnia, M. Gharakhani, and S. F. Fard, “A Novel Hybrid Model for Stock Price Forecasting Based on Metaheuristics and Support Vector Machine,” Data 2019, Vol. 4, Page 75, vol. 4, no. 2, p. 75, May 2019.
X. Li, P. Wu, and W. Wang, “Incorporating stock prices and news sentiments for stock market prediction: A case of Hong Kong,” Inf. Process. Manag., p. 102212, Feb. 2020.
G. S. Atsalakis and K. P. Valavanis, “Surveying stock market forecasting techniques – Part II: Soft computing methods,” Expert Syst. Appl., vol. 36, no. 3, pp. 5932–5941, Apr. 2009.