Prediction of Stock Prices Using Ensemble Models
The financial market encompasses a set of institutions, products, and services aimed at meeting the financial needs of individuals, companies, and governments. Its primary objective is to direct financial resources from investors to projects requiring funding. This is achieved through the issuance and trading of securities such as stocks, debt securities, among others. In this paper, the goal was to develop a machine learning application specifically for the Brazilian financial market, focusing on predicting the market value of eight companies that are representative of the financial sector on the stock exchange. The prediction is based on the closing price history and uses data from the last three years, with the inputs corresponding to the last 60 days immediately preceding the forecast date. For this task, three machine learning models were selected: Long Short-Term Memory (LSTM), Multilayer Perceptron (MLP), and Convolutional Neural Network (CNN). Each of these was fine-tuned using five different optimizers, resulting in a total of 15 models. Subsequently, all 15 models were combined into an Ensemble. After applying data transformations, the models achieved a satisfactory level of error for the analysis. Among the transformations used, the logarithmic transformation stood out as the one that resulted in the most well-adjusted models compared to the others. In second place, the Yeo-Johnson transformation showed slightly higher error but performed better on series with high variation. Additionally, the convolutional models and Ensemble were the most effective.
Authors
- Claudio Silva (ORCID: https://orcid.org/0000-0003-2452-2295)
- Ricardo Menezes Salgado (ORCID: https://orcid.org/0000-0002-0989-6259)
Institutions
- Universidade Federal de Alfenas (BR)
Publication Details
- Journal
- Revista de Informática Teórica e Aplicada
- Published
- 2024-09-04
- DOI
- https://doi.org/10.22456/2175-2745.136072
- Primary Topic
- Stock Market Forecasting Methods
- Type
- article
- Field-Weighted Citation Impact
- 0.00