Comparing Artificial Neural Network Architectures for Brazilian Stock Market Prediction
Annals of Data Science
https://doi.org/10.1007/s40745-020-00305-w
Comparing Artificial Neural Network Architectures
for Brazilian Stock Market Prediction
Suellen Teixeira Zavadzki de Pauli1
· Mariana Kleina1 · Wagner Hugo Bonat1
Received: 27 January 2020 / Revised: 20 June 2020 / Accepted: 25 June 2020
© Springer-Verlag GmbH Germany, part of Springer Nature 2020
Abstract
Prediction of financial time series is a great challenge for statistical models. In general, the stock market times series present high volatility due to its sensitivity to
economic and political factors. Furthermore, recently, the covid-19 pandemic has
caused a drastic change in the stock exchange times series. In this challenging context, several computational techniques have been proposed to improve the performance of predicting such times series. The main goal of this article is to compare
the prediction performance of five neural network architectures in predicting the
six most traded stocks of the official Brazilian stock exchange B3 from March 2019
to April 2020. We trained the models to predict the closing price of the next day
using as inputs its own previous values. We compared the predictive performance
of multiple linear regression, Elman, Jordan, radial basis function, and multilayer
perceptron architectures based on the root of the mean square error. We trained all
models using the training set while hyper-parameters such as the number of input
variables and hidden layers were selected using the testing set. Moreover, we used
the trimmed average of 100 bootstrap samples as our prediction. Thus, our approach
allows us to measure the uncertainty associate with the predicted values. The results
showed that for all times series, considered all architectures, except the radial basis
function, the networks tunning provide suitable fit, reasonable predictions, and confidence intervals.
Keywords Artificial neural network · Forecasting · Time series · Stock market
* Suellen Teixeira Zavadzki de Pauli
1
Federal University of Paraná (UFPR), Cel. Francisco H. dos Santos Avenue, 210, Curitiba,
PR 81530‑000, Brazil
13
Vol.:(0123456789)
Annals of Data Science
1 Introduction
The stock market is a popular investment option for investors because of its
expected high returns. In contrast, stock market prediction is a complex task to
achieve with the help of artificial intelligence. It is due to stock prices depend on
many factors, including trends and news in the market [1].
The prediction of financial market times series is challenging. Such information presents high volatility in the observed data, together with the uncertainty
inherent in any forecast. Therefore, wrong decisions based on such predictions
can have economically catastrophic consequences for individuals, institutions,
and nations, as observed in the financial crises [2].
According to [3], financial institutions and banks are among those industries
that have relatively complete and accurate data. Typical cases include stock
investment, loan payment prediction, credit approval, bankruptcy prediction,
and fraud detection. Techniques such as discriminant analysis, linear and logistic
regression, entire programming, decision trees, expert systems, neural networks
and dynamic models are commonly used in financial and banking applications.
It is not surprising that academia and the financial industry have invested a lot
of time in proposing and comparing computational methods for analyzing available data, in order to obtain reliable predictions. Such analyses are used in the prevention of macroeconomic crises, prediction of stock market movement as well as
for composing investment portfolios [2].
Since the 1950s, as computing technology was gradually used in commercial
applications, many companies have developed databases to store and analyze
collected data. Artificial intelligence methods were used to deal with data sets,
including neural networks and decision trees. In the 90s, the term data mining
came to be used, which crosses the human intervention, machine learning, mathematical modeling and databases. The investigation of the theoretical components
of big data, or data science, requires interdisciplinary efforts in mathematics,
sociology, economics, computer science and management science [4].
Big data has been one of the most popular topics since last several years and
how to effectively conduct big data analysis is a big challenge for every field.
According to [5], the process of big data analysis can be described by a general
data analysis, which consists of several steps, including data acquisition and management, data access and processing, data mining and interpretation, and data
applications. The modeling methods can include many techniques and the challenge reflects when and which method is appropriate. In this paper we will limit
ourselves to the study of data interpretation, that still according to authors, corresponds to how to utilize rules and principles of mathematics and statistics in big
data mining and interpretation. [5, 6].
According to [4], three problems are urgent to solve in order to benefit from
using Big Data in science, engineering, and business applications. The first is
transformation of semi- and unstructured data to structured data. The second is
about complexity, uncertainty, and systematic modeling. The third, understanding
of the relationship of data heterogeneity, knowledge heterogeneity, and decision
13
Annals of Data Science
heterogeneity. In this paper we focus on modeling the technique of artificial neural networks (ANN) as well as the inherent uncertainty of the model. ANN is an
artificial intelligence technique for classifying, image processing and predicting
the data [7].
Tkáč and Verner [8] reviewed publications where neural networks were applied
in the business field, for the period from 1994 to 2015. According to the authors,
in the two decades of study, artificial neural networks were widely used in several
business applications. They classified the articles in 15 areas. The stocks and bonds
area had the second-largest volume of publications and showed a significant increase
during the study period. It was also observed that a variety of neural network models
were presented in an attempt to overcome standard statistical techniques and thus
obtain more assertiveness. Consequently, the popularity of new hybrid methods
increased and overcame various difficulties of conventional neural networks in addition to achieving more precise results. The type of network most used, according to
the authors, considering all the articles evaluated, is the feedforward multilayer and
few studies have used other networks. The most common learning algorithm was the
backpropagation performed by a descendent gradient search.
Artificial neural networks (ANNs) are considered flexible computational structures and universal function approximators. In general, ANNs have a high degree of
assertiveness on the (...truncated)