Application of machine learning algorithm to predict the behavior of stocks marketed in Brazil - Gabriel Donadio Costa; Rogério João Lunkes (Contabilidad y Negocios: Revista del Departamento Académico de Ciencias Administrativas)
Modern economy offers several investment options, making capital assignments complex, slow and risky. In order to assist investors in the decision-making process, artificial intelligence tools aim at finding patterns hidden in data and providing useful, timely and accurate information. This work analyzes the application of machine learning algorithms in the selection of portfolios in the Brazilian market. Recent research intended to predict the stock market behavior implementing machine learning with conventional methods such as technical or fundamental analysis (Anghel, 2021; Kamara et al., 2022; Nti et al., 2020b); while few combine analyses in emerging and volatile markets like Brazil. Thus, three machine learning models were trained using variables from the technical and/or fundamental analysis. The sample included 40,562 observations from six companies listed on B3, from August 1994 to December 2021. Models trained only with fundamental or technical variables evidenced low accuracy, which was translated into low learning and generalization capacity of the algorithm. In contrast, the model including the combination of technical and fundamental variables revealed an average accuracy of 70,7 % on 5 folds, which was supported by the literature that indicates that hybrid models can provide greater accuracy and lower volatility. In addition, results exceed the accuracy of previous studies (e.g. Emir et al., 2012; Kim, 2003; Zhang & Zhao, 2009), which indicates that the Support Vector Machine - SVM can also be applied to emerging markets, even in crisis times, such as COVID-19 pandemic.