Stock Price Prediction With Optimized Deep LSTM Network With Artificial Rabbits Optimization Algorithm
Stock Price Prediction With Optimized Deep LSTM Network With Artificial Rabbits Optimization Algorithm
Stock price prediction with optimized deep LSTM network with artificial
rabbits optimization algorithm
Burak Gülmez a, b, *
a
Leiden Institute of Advanced Computer Science, Leiden University, Leiden, the Netherlands
b
Mine Apt, Altay Mah. Sehit A. Taner Ekici Sk. No: 6, 06820, Etimesgut, Ankara, Türkiye
A R T I C L E I N F O A B S T R A C T
Keywords: The stock market is a financial market where shares of publicly listed corporations are purchased and sold. It is
Artificial intelligence an indicator of a country’s economic health, reflecting the performance of companies and the overall business
Artificial rabbits optimization algorithm environment. The prices of stocks are determined by supply and demand. Investing in the stock market can be
Deep learning
risky, but it can offer the potential for significant returns over the long term. Artificial intelligence, including the
LSTM
Stock price prediction
stock market, has become increasingly prevalent in the financial sector. Long Short-Term Memory (LSTM) is a
type of artificial neural network that is often used in time series analysis. It can effectively predict stock market
prices by handling data with multiple input and output timesteps. Metaheuristic algorithms, such as Artificial
Rabbits Optimization algorithm (ARO), can be used to optimize the hyperparameters of an LSTM model and
improve the accuracy of stock market predictions. In this paper, an optimized deep LSTM network with the ARO
model (LSTM-ARO) is created to predict stock prices. DJIA index stocks are used as the dataset. LSTM-ARO is
compared with one artificial neural network (ANN) model, three different LSTM models, and LSTM optimized by
Genetic Algorithm (GA) model. All the models are tested on MSE, MAE, MAPE, and R2 evaluation criteria. The
results show that LSTM-ARO overcomes the other models.
* Corresponding author.
E-mail address: [email protected].
https://doi.org/10.1016/j.eswa.2023.120346
Received 30 January 2023; Received in revised form 19 April 2023; Accepted 30 April 2023
Available online 4 May 2023
0957-4174/© 2023 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).
B. Gülmez Expert Systems With Applications 227 (2023) 120346
decisions than they could with manual trading. Algorithmic trading ARO algorithm can be used to optimize the hyperparameters of
systems analyze market data in real-time and identify trading opportu LSTM networks. Optimizing the hyperparameters of an LSTM network
nities. They execute trades based on predefined rules and make decisions can be challenging, as many different parameters can be adjusted,
based on various factors, including market trends, news events, and including the number of layers, the number of neurons per layer, and the
technical indicators. Both individuals and institutions, including hedge learning rate. However, a ARO algorithm can be used to optimize these
funds, can use algorithmic trading to trade various financial in hyperparameters by treating them as a set of variables in a search space.
struments, such as stocks, futures, options, and forex. However, algo
rithmic trading is not without its risks, and traders must be aware of its 2. Literature review
potential downsides (Li et al., 2019; Park & Lee, 2021; Tao et al., 2021;
Théate & Ernst, 2021). In the literature, there are lot of research on predicting stock prices.
In recent years, artificial intelligence (AI) has become more preva Some of them are listed below.
lent in the financial industry, including the stock market. AI algorithms Xie et al. (2021) attempted to solve the issue of typical offline neuro-
have the capability to analyze vast amounts of data and make pre fuzzy systems needing training data to fully reflect all system behaviors,
dictions or decisions based on that analysis. This can be useful for pre which may be challenging owing to dramatic swings in data distribu
dicting stock prices, identifying trends, and making investment tions. The authors developed a unique technique that combines a neuro-
decisions. For example, AI algorithms can analyze data like historical fuzzy system with the Hammerstein-Wiener model, establishing an
stock prices, company financial statements, and market trends in the indivisible five-layer network. The efficacy of the suggested model was
stock market to predict future performance. AI can also monitor market examined on three financial stock datasets and found to outperform
conditions in real time and identify opportunities for buying or selling existing neuro-fuzzy systems and the standard Hammerstein-Wiener
stocks. All in all, AI has the potential to significantly improve the effi model.
ciency and accuracy of stock market analysis and decision-making, Li et al. (2020) investigated the predictability of investor sentiment
which can ultimately lead to better investment outcomes for investors in the Chinese stock market by utilizing online user-generated material
(Ashta & Herrmann, 2021; Milana & Ashta, 2021). to gauge sentiment and by comparing various text classification algo
Long Short-Term Memory (LSTM) is a type of computer program that rithms, price forecasting models, time horizons, and information update
is designed to analyze and understand data that has long-term de systems. The findings demonstrated that daily investor sentiment only
pendencies. It is often used in analyzing time series data, such as stock provided predicted information for opening prices, but hourly investor
market prices. Time series data refers to the sequence of past stock prices sentiment provided two hours of predictive information for closing
and other financial data, and LSTM can use this data to identify patterns prices. This indicates that investors adjust their expectations during
and trends that can be used to predict future stock prices. LSTM is market hours.
particularly useful in analyzing stock market data because it can handle Chen et al. (2019) aimed to develop a stock market trend prediction
data with multiple input and output timesteps. For example, a com model using an anticipatory computing approach and public mood and
pany’s stock price may be influenced by various factors such as eco emotion data. The model was tested on a real-world stock market
nomic indicators, market trends, and company-specific news. These dataset and found to accurately predict stock market trends.
factors may have a direct or indirect impact on the stock price, and the Adhikari et al. (2021) proposed a hybrid deep learning model for
LSTM model is able to capture these relationships and use them to make stock price prediction using sentiment analysis and found that the model
more accurate predictions. Overall, LSTM and time series analysis can be was able to improve prediction accuracy compared to traditional ma
a powerful tools for investors who want to make informed investment chine learning methods. This suggests that the use of deep learning
decisions based on the analysis of stock market data (Gülmez, 2022b; Hu techniques in combination with traditional machine learning ap
et al., 2021; Mehtab & Sen, 2020). proaches can lead to improved performance in stock price prediction.
Metaheuristic algorithms are optimization techniques that can be Rezaei et al. (2021) presented hybrid algorithms, CEEMD-CNN-
used to optimize the hyperparameters of an LSTM model. These algo LSTM and EMD-CNN-LSTM, which employ full ensemble empirical
rithms are beneficial because they can search for optimal hyper mode decomposition (CEEMD) and empirical mode decomposition
parameters more efficiently and effectively than traditional (EMD) to extract deep features and time sequences for one-step-ahead
optimization methods. One benefit of using metaheuristic algorithms is stock price prediction. The results demonstrated that the combination
that they can explore a larger search space and find the optimal global of CNN, LSTM, and CEEMD or EMD improved prediction accuracy and
solution. Traditional optimization methods may get stuck in a local beat other models.
minimum and not find the best solution. In contrast, metaheuristic al Hammoudeh et al. (2021) used the nonparametric causality-in-
gorithms can escape from local minima and find the best solution across quantiles test to investigate the causal connections between oil prices
the entire search space. Another benefit of metaheuristic algorithms is and five clean energy stock indexes. During normal market circum
their ability to handle complex and noisy data. LSTM models can have stances, oil returns produced renewable stock index returns, but this was
many hyperparameters, and finding the optimal values for these not the case during difficult market situations. Lower quantiles of the
hyperparameters can be difficult due to the complex nature of the data. volatility study revealed the considerable bidirectional correlation be
However, Metaheuristic algorithms are able to handle this complexity tween oil price volatility and renewable energy stock volatility. There
and noise and find the optimal hyperparameters even in these chal were no substantial causal correlations between oil prices and renew
lenging situations (Gülmez, 2023b,a; Kumar & Haider, 2021; Öztürk, able energy stocks during the COVID-19 epidemic.
2022). Maguluri and Ragupathy (2020) used the Auto-Regressive Integrated
ARO is a metaheuristic algorithm that is inspired by the behaviour of Moving Average (ARIMA) model to forecast stock prices. Results showed
the rabbits in the nature. It is used to find approximate solutions to that the model was effective in predicting future prices and forecasting
optimization and search problems. The basic idea is to use techniques the stock market.
inspired by survival strategies of rabbits, such as foraging, hiding, to
generate new solutions to a problem. The solutions, which are often 3. Material and method
represented as strings of numbers or characters, are evolved over many
generations through the application of these algorithm operators until 3.1. Time series analysis
an acceptable solution is found. ARO is a novel metaheuristic algorithm
and can be used in a wide range of fields, including artificial intelligence, Time series analysis is a statistical method used to analyze data that
machine learning, and engineering (Gülmez, 2023a; Wang et al., 2022). is collected over a period of time. It involves examining the patterns and
2
B. Gülmez Expert Systems With Applications 227 (2023) 120346
trends in the data to make predictions about future events or to under Error: This is the difference between the predicted output of the
stand the underlying processes that are driving the data. Time series neuron and the actual output, which is used to adjust the weights and
analysis can be used to forecast demand for a product, predict the stock biases in order to improve the accuracy of the network.
market, or understand the trends in economic indicators such as un A layer in an ANN is a group of interconnected neurons that work
employment or inflation. Time series models use past data to forecast together to process and transmit information. There are typically mul
future values and can be used to understand the underlying trends, tiple layers in an ANN, with the input layer receiving the raw data and
seasonality, and noise in the data. Time series analysis can also be used the output layer producing the final result. Between the input and output
to identify and forecast the impact of exogenous variables, such as layers are hidden layers, which are responsible for performing the
changes in government policies or technological innovations, on the necessary computations and transformations on the input data to pro
data. There are several factors that can impact a time series (Chatfield, duce the desired output. The number of hidden layers and the number of
2003; Hamilton, 2020; Gülmez, 2021): neurons in each layer can vary depending on the specific task the ANN is
Trend: A trend refers to the overall direction of the time series, designed to perform. A layer can be seen in Fig. 1.
whether it is increasing, decreasing, or stable over time.
Seasonality: Seasonality refers to the presence of repeating patterns 3.3. Lstm
in the data, such as spikes in sales during the holiday season.
Cyclicality: Cyclicality refers to the presence of longer-term patterns LSTM is a type of artificial neural network designed to process
in the data, such as economic booms and busts. sequential data, such as time series, audio, or text. It is particularly
Irregularity: Irregularity refers to random or unpredictable fluctua useful for processing data with long-term dependencies, where the
tions in the data. output at a given time step depends on information from previous time
Exogenous factors: Exogenous factors are external factors that can steps. LSTM networks are able to remember this information over a
affect the time series, such as economic policies, natural disasters, or longer period of time by using memory cells, input gates, output gates,
social trends. and forget gates. These gates control the flow of information into and out
of the memory cells, allowing the network to selectively store and
3.2. Ann retrieve information as needed. LSTMs are commonly used for tasks such
as language translation, speech recognition, and stock price prediction.
Artificial neural networks (ANNs) are computational models inspired The elements of an LSTM network include (Gers et al., 2000; Yu et al.,
by the structure and function of the human brain. They consist of layers 2019):
of interconnected nodes or “neurons” that process and transmit infor Input gate: Controls the flow of data into the memory cell.
mation. Each neuron receives input from other neurons and applies a
mathematical function to this input to produce an output. The output is inputgate = σ (Wi*[ht − 1, xt] + bi) (1)
then passed on to other neurons in the next layer (Gülmez & Kulluk, Forget gate: Controls the flow of data out of the memory cell.
2019).
The structure and function of ANNs can be adjusted through a pro forgetgate = σ (Wf *[ht − 1, xt] + bf ) (2)
cess called training. During training, the network is presented with a set Output gate: Controls the output of the memory cell to the rest of the
of inputs and their corresponding outputs, and the network adjusts its network.
weights and biases to minimize the difference between its predicted
output and the actual output. This process allows the network to “learn” outputgate = σ (Wo*[ht − 1, xt] + bo) (3)
and improve its performance on tasks such as classification, regression, Cell state: Stores the information in the memory cell.
and clustering (Askarzadeh & Rezazadeh, 2013).
A neuron, also known as a perceptron or processing element, is the memorycell = ft*ct − 1 + it*tanh(Wc*[ht − 1, xt] + bc) (4)
fundamental unit of computation in an artificial neural network. It re Hidden state: Output of the LSTM unit, used to make predictions or
ceives input from other neurons or external sources, processes the input pass information to the next LSTM unit.
using a set of weights and biases, and produces an output based on that
processing. The processing occurs through the application of an acti hiddenstate = ot*tanh(ct) (5)
vation function, which determines the output of the neuron based on the
input and weights. Neurons are connected to each other in layers, with 3.4. Genetic algorithm (GA)
the input layer receiving external data and the output layer producing
the final result of the network. The intermediate layers, known as hidden GA is a computational method that mimics the process of natural
layers, process the data and pass it along to the next layer. Neurons selection to find solutions to optimization and search problems. The idea
within a layer are connected to every neuron in the next layer, allowing behind it is to use a population of candidate solutions, called individuals,
the network to learn complex relationships and patterns in the data and repeatedly apply genetic operators such as selection, crossover
(Gülcü, 2022). (recombination), and mutation to generate new individuals. The new
There are several elements that make up a neuron in an ANN. These individuals are then evaluated using a fitness function that measures the
include (Krogh, 2008): quality of the solution. This process is repeated over multiple genera
Inputs: These are the data that are fed into the neuron, which are tions until an acceptable solution is found (Gülmez, 2023a; Gülmez &
typically numerical values. Korhan, 2021).
Weights: These are the values assigned to each input, which are used GA has three essential components (Alkafaween et al., 2021):
to determine the importance of that input in the overall calculation of Encoding: Each individual is encoded as a string of numbers or
the neuron. characters, called a chromosome. The encoding is chosen based on the
Bias: This is a constant value that is added to the weighted sum of the specific problem being solved.
inputs. Evaluation: The fitness function is used to evaluate the quality of the
Activation function: This is a mathematical function that determines solution represented by each individual. The fitness function is designed
the output of the neuron based on the inputs and weights. The most based on the problem at hand.
common activation functions used in ANNs are sigmoid, tanh, and ReLU. Evolutionary Operators: These operators are used to create new in
Output: This is the final result of the neuron’s calculation, which is dividuals from existing ones. The most commonly used operators are
then passed on to other neurons in the network. selection, crossover, and mutation. Selection is used to pick the best
3
B. Gülmez Expert Systems With Applications 227 (2023) 120346
individuals to reproduce. Crossover is used to merge the chromosomes (Gülmez, 2022a; Wang, Cao, Zhang, Mirjalili, & Zhao, 2022).
of two individuals to form a new individual. The mutation is used to ARO has two stages. They are detour foraging (exploration) and
introduce small random changes into the chromosomes of individuals. random hiding (exploitation).
It is worth noting that GA is a heuristic optimization method, and it is When rabbits forage, they often go far away and ignore nearby grass.
not guaranteed to find the optimal global solution, but it can provide a This behavior is called detour foraging. In ARO, each rabbit has its own
good solution with reasonable computational cost. However, it may be region with grass and burrows. They randomly visit each other’s regions
computationally intensive and time-consuming for large-scale problems, to forage and may perturb around a food source. This means they update
especially if the dataset is large and the training process is prolonged their position towards another rabbit in the swarm and add a pertur
(Gülmez, 2022c). bation. A model has been proposed to describe this behavior.
→
v i (t + 1) = →
x j (t) + R⋅(→
x i (t) − →
x j (t)) + round(0.5⋅(0.05 + r1 ))⋅n1 , (6)
3.5. Artificial rabbits optimization (ARO)
R = L⋅c (7)
ARO is a novel algorithm created by Wang et al. (Wang et al., 2022).
(8)
t− 1 2
Rabbits are plant-eaters, feeding mainly on grass, forbs, and leafy weeds. L = (e − e( T ) )⋅sin(2πr2 )
They have evolved various survival strategies over time. One of their {
strategies is to avoid eating the grass close to their burrows to prevent c(k) =
1 ifk == g(l)
k = 1, ⋯, d andl = 1, ⋯, ⌈r3 ⋅d⌉ (9)
predators from finding their nests. Rabbits have an extensive field of 0 else
vision, with most of it devoted to overhead scanning, making it easier for
g = randperm(d) (10)
them to find food over a large area. This strategy of foraging away from
their nests is known as exploration and is reflected in the Chinese idiom
n1 ∼ N(0, 1) (11)
“rabbits do not eat the grass near its own nest.” Another strategy is
random hiding. Rabbits are skilled at creating burrows to evade preda The candidate position of each rabbit at time t + 1 is vi(t + 1), while
tors or hunters. They dig multiple burrows around their nest and select xi(t) is its position at time t. Other variables include n (rabbit population
one randomly as a shelter from predators. With short forelegs and long size), d (problem dimension), and T (maximal number of iterations).
back legs, rabbits can run quickly due to strong muscles and tendons. Perturbation and running length (L) aid in global search, with longer
They can also abruptly stop while running, turn sharply, or even run step sizes promoting exploration and shorter ones promoting exploita
back in a zigzag motion to confuse their enemies and increase their tion. The mapping vector c helps randomly select search individuals to
chances of survival. This strategy is called exploitation. Since rabbits are mutate. The running operator (R) simulates rabbit running behavior,
at the bottom of the food chain and have many predators, they must probing the search space with sudden turns in random directions. Detour
conserve energy to survive. To do this, they adaptively switch between foraging enables rabbits to move to other regions, promoting the
detour foraging and random hiding based on their energy levels
4
B. Gülmez Expert Systems With Applications 227 (2023) 120346
exploration and the global search capability of the algorithm. Eq. (6) Table 1
perturbation helps avoid local extrema and perform the global search, ANN model architecture.
while Eq. (8) generates longer steps during initial iterations and shorter Layer Parameter
steps later. Mapping vector c selects individuals for mutation during
Input 20
foraging. The running operator R simulates rabbit movements. Eq. (6) Dense 10
shows that search individuals explore by randomly searching for food Dense 10
based on the position of other rabbits. This unique behavior allows them Dropout 0.5
to venture far from their own territory and discover new regions, Dense 1
3.6. Models
Table 2
In this study, one ANN and five LSTM model are used. The LSTM LSTM1D architecture.
models are LSTM1D, LSTM2D, LSTM3D, LSTM-GA, and the last and Layer Parameter
proposed model, the LSTM model optimized by ARO (LSTM-ARO). Input 20
LSTM 10
3.6.1. Ann Dense 10
Table 1 shows ANN architecture. The input layer has 20 neurons, and Dropout 0.5
Dense 1
this is the input dimension of the network. The first dense layer has 10
5
B. Gülmez Expert Systems With Applications 227 (2023) 120346
Table 3 Table 5
LSTM2D architecture. LSTM-GA and LSTM-ARO architectures.
Layer Parameter Layer Parameter
Input 20 Input 20
LSTM 10 LSTM x0
LSTM 10 LSTM (x1) x2
Dense 10 LSTM (x3) x4
Dropout 0.5 Dense x5
Dense 1 Dropout x6
Dense 1
Table 4
LSTM3D architecture. Table 6
Hyperparameter alternatives.
Layer Parameter
Hyperparameter Alternatives
Input 20
LSTM 10 Number of neurons 1, 2, 3, …, 18, 19, 20
LSTM 10 Layer exist or not exist 0, 1
LSTM 10 Dropout rate 0.3, 0.4, 0.5, 0.6, 0.7
Dense 10 Optimizer algorithm Adagrad, Adam, Adamax, RMSprop, SGD
Dropout 0.5 Learning rate 0.01, 0.001, 0.0001, 0.00001, 0.000001
Dense 1
Also optimizer and learning rate are other variables. GA and ARO find 1∑n
MAE = |yi − ̂y i | (22)
the best variable values for the architecture. n 1
Hyperparameter alternatives of the LSTM-GA and LSTM-ARO models
MAPE is a measure of the accuracy of a model that is expressed as a
are seen in Table 6. GA and ARO search and try to find best
percentage. It is calculated by taking the absolute value of the difference
hyperparameters.
between the predicted and actual values and dividing it by the actual
LSTM-ARO model can be seen in Fig. 2.
value, then taking the average of all these percentages. This value is used
to assess the accuracy of the model and the lower the MAPE, the better
4. Results and discussion
the model.
4.2. Evaluation criteria In this study, various algorithms, including LSTM1D, LSTM2D,
LSTM3D, ANN, LSTM-GA, and optimized LSTM with ARO (LSTM-ARO)
Evaluation criteria for regression models are used to measure the are tested on the DJIA stock dataset from 2018 to 2023. The results of
accuracy and effectiveness of the model in predicting the output values these algorithms are then carefully analyzed and recorded. The aim is to
based on the input data (Gülmez, 2022a). determine which algorithm performs best in terms of accuracy and ef
MSE is a measure of the difference between the predicted values and ficiency for predicting stock prices. The evaluation criteria used include
the actual values. It is calculated by taking the difference between the MSE, MAE, MAPE, and R2 score. The results of the testing are crucial in
predicted and actual values and squaring them, then taking the average determining the most effective approach for predicting stock prices in
of all these squared differences. This value is used to assess the accuracy the DJIA market.
of the model, and the lower the MSE, the better the model. The proposed model LSTM-ARO gives successful results. The graphs
1∑n of the results can be seen Fig. 3. Blue and dotted line is the real values,
MSE = (yi − ̂y i )2 (21) orange lines are predictions. The figure shows generally predictions are
n i
successful. Also, Fig. 4 shows LSTM-GA results, Fig. 5 shows LSTM1D
MAE is another measure of the difference between the predicted and results, Fig. 6 shows LSTM2D results, Fig. 7 shows LSTM3D results, and
actual values. It is calculated by taking the absolute value of the dif Fig. 8 shows ANN results.
ference between the predicted and actual values and taking the average For MSE evaluation criteria, the models are compared. The com
of all these differences. This value is also used to assess the accuracy of parison and the results are seen in Table 7. The results appear to be a
the model and the lower the MAE, the better the model. table of mean squared errors (MSE) for various ticker symbols and
6
B. Gülmez Expert Systems With Applications 227 (2023) 120346
different models. The lower the MSE, the better the model is at pre appears that the LSTM-ARO model generally has the highest R2 scores,
dicting the true values. From the table, it can be seen that the LSTM-ARO although there are some outliers where other models perform better. It is
model has the lowest MSE for most of the ticker symbols, indicating that also worth noting that some of the models, such as LSTM1D and
it may be the best model for predicting the stock prices. LSTM2D, have negative R2 scores for certain tickers, indicating that they
Table 8 shows the MAE results of the models. The MAE is a measure are performing worse than a simple average of the data. Overall, it looks
of how accurate the predictions made by each model are, with lower like the LSTM-ARO is the best model for fitting the data.
values indicating better performance. It appears that in general, the The paper proposes using various deep learning models, such as
LSTM-ARO model has the lowest MAE across most of the stocks, indi LSTM-ARO, ANN, LSTM1D, LSTM2D, and LSTM3D, to predict future
cating that it is the most accurate model. However, it’s important to stock market prices using the DJIA dataset. The results show that the
notice that the results vary depending on the stock. Some stocks are LSTM-ARO model outperforms the other models in terms of MSE, MAE,
better predicted by different models. MAPE, and R2 scores. This suggests that using ARO algorithm optimi
Table 9 shows the results of MAPE values for different stock tickers zation in combination with LSTM is an effective approach for predicting
and different models. The MAPE is a measure of the prediction accuracy stock market prices in this dataset.
of a model, where a lower MAPE value indicates a better fit. From the Table 11 shows the time spent predicting DIAJ stocks’ future prices.
table, it appears that the LSTM-ARO model generally has the lowest It is in second. ANN is the fastest algorithm. Then LSTM1D, LSTM-GA,
MAPE values across all tickers, followed by the ANN model. The LSTM-ARO, LSTM2D, and LSTM3D follow. LSTM-ARO and LSTM-GA
LSTM1D, LSTM2D, and LSTM3D models generally have higher MAPE algorithms are worked with 50 iterations and 50 population numbers.
values, indicating lower prediction accuracy. So, the total time of the response of the algorithms is 754,890 s (8.737
Table 10 shows the results of R2 score for each stock ticker, using days) and 721,660 s (8.353 days). The total time is used only one time to
different models. R2 is a measure of how well the model fits the data, get the best models. Then in a real dynamic trading system, the models
where a score of 1.0 means a perfect fit and a score of 0 means the model will run one time per day. So, the execution times are about 5 min for the
does not explain any of the variance in the data. From the results, it total of the DJIA stocks. It is so enough.
7
B. Gülmez Expert Systems With Applications 227 (2023) 120346
8
B. Gülmez Expert Systems With Applications 227 (2023) 120346
9
B. Gülmez Expert Systems With Applications 227 (2023) 120346
10
B. Gülmez Expert Systems With Applications 227 (2023) 120346
11
B. Gülmez Expert Systems With Applications 227 (2023) 120346
12
B. Gülmez Expert Systems With Applications 227 (2023) 120346
13
B. Gülmez Expert Systems With Applications 227 (2023) 120346
Table 7
Comparison of the models for MSE criteria.
MSE
Ticker LSTM-ARO LSTM-GA LSTM1D LSTM2D LSTM3D ANN
Table 8
Comparison of the models for MAE criteria. Table 9
Comparison of the models for MAPE criteria.
MAE
Ticker LSTM- LSTM- LSTM1D LSTM2D LSTM3D ANN MAPE
ARO GA Ticker LSTM-ARO LSTM-GA LSTM1D LSTM2D LSTM3D ANN
AXP 3.804 3.848 5.159 5.415 5.082 4.704 AXP 0.024 0.024 0.032 0.033 0.031 0.029
AMGN 3.318 3.425 9.614 7.867 11.513 6.193 AMGN 0.014 0.014 0.038 0.031 0.045 0.025
AAPL 3.846 3.955 5.851 4.878 6.632 7.673 AAPL 0.025 0.026 0.037 0.032 0.042 0.050
BA 4.425 4.805 15.994 14.042 15.369 13.813 BA 0.027 0.030 0.108 0.095 0.105 0.089
CAT 4.947 4.748 8.875 10.310 8.661 9.235 CAT 0.025 0.024 0.043 0.049 0.042 0.045
CSCO 0.744 0.813 0.828 1.176 1.430 0.988 CSCO 0.016 0.017 0.017 0.025 0.029 0.021
CVX 3.830 3.531 12.940 5.969 16.006 10.518 CVX 0.025 0.023 0.080 0.037 0.098 0.066
GS 7.060 7.272 9.653 10.129 8.844 12.525 GS 0.022 0.022 0.029 0.031 0.027 0.038
HD 6.206 6.026 6.046 14.317 7.487 10.753 HD 0.021 0.020 0.020 0.047 0.025 0.035
HON 2.876 3.068 5.851 5.413 3.854 5.769 HON 0.015 0.016 0.030 0.028 0.020 0.030
IBM 2.113 2.096 2.652 3.117 3.755 2.836 IBM 0.017 0.016 0.020 0.024 0.028 0.022
INTC 1.092 1.072 4.107 4.486 5.064 3.059 INTC 0.031 0.031 0.136 0.150 0.170 0.096
JNJ 1.912 1.795 3.436 3.860 4.525 2.139 JNJ 0.011 0.011 0.020 0.023 0.026 0.013
KO 0.738 0.751 2.584 2.624 3.217 1.439 KO 0.012 0.013 0.043 0.043 0.053 0.024
JPM 2.523 2.894 4.570 3.415 3.380 4.569 JPM 0.020 0.024 0.036 0.027 0.027 0.036
MCD 3.630 3.646 5.864 10.878 8.596 8.233 MCD 0.015 0.015 0.023 0.043 0.034 0.033
MMM 2.602 2.532 6.410 5.845 6.210 5.538 MMM 0.020 0.019 0.052 0.048 0.051 0.044
MRK 1.551 1.212 3.810 5.563 5.906 3.165 MRK 0.017 0.014 0.041 0.060 0.063 0.035
MSFT 6.584 7.583 8.889 8.659 8.784 9.363 MSFT 0.025 0.029 0.033 0.033 0.033 0.035
NKE 2.907 3.050 3.371 4.501 3.939 4.563 NKE 0.026 0.027 0.030 0.040 0.034 0.039
PG 2.180 2.105 5.392 5.186 5.357 5.968 PG 0.015 0.015 0.037 0.035 0.037 0.041
TRV 2.853 2.808 2.796 7.112 7.962 7.323 TRV 0.017 0.017 0.017 0.041 0.046 0.043
UNH 9.016 7.852 40.169 45.718 29.796 13.116 UNH 0.018 0.016 0.079 0.089 0.058 0.026
CRM 5.024 5.879 7.527 6.616 6.419 6.931 CRM 0.029 0.034 0.044 0.039 0.038 0.041
VZ 0.618 0.609 1.274 1.274 1.258 1.303 VZ 0.014 0.014 0.031 0.031 0.030 0.030
V 3.724 3.849 5.347 4.752 5.583 6.540 V 0.018 0.019 0.026 0.023 0.027 0.032
WBA 0.667 0.693 1.124 1.270 1.313 1.153 WBA 0.017 0.018 0.030 0.034 0.035 0.030
WMT 2.291 2.309 3.314 3.464 3.648 4.770 WMT 0.017 0.017 0.024 0.025 0.026 0.035
DIS 2.923 2.935 4.472 5.300 5.338 3.431 DIS 0.026 0.026 0.041 0.050 0.050 0.032
DOW 1.059 1.114 1.178 1.203 1.489 2.337 DOW 0.020 0.021 0.022 0.023 0.027 0.043
14
B. Gülmez Expert Systems With Applications 227 (2023) 120346
15
B. Gülmez Expert Systems With Applications 227 (2023) 120346
Hu, Z., Zhao, Y., & Khushi, M. (2021). A survey of forex and stock price prediction using Öztürk, M. M. (2022). Initializing hyper-parameter tuning with a metaheuristic-
deep learning. Applied System Innovation, 4(1), 9. ensemble method: A case study using time-series weather data. Evolutionary
Kim, A., Yang, Y., Lessmann, S., Ma, T., Sung, M.-C., & Johnson, J. E. V. (2020). Can deep Intelligence, 1–13.
learning predict risky retail investors? A case study in financial risk behavior Park, D.-Y., & Lee, K.-H. (2021). Practical algorithmic trading using state representation
forecasting. European Journal of Operational Research, 283(1), 217–234. https://doi. learning and imitative reinforcement learning. IEEE Access, 9, 152310–152321.
org/10.1016/j.ejor.2019.11.007 Rezaei, H., Faaljou, H., & Mansourfar, G. (2021). Stock price prediction using deep
Krogh, A. (2008). What are artificial neural networks? Nature Biotechnology, 26(2), learning and frequency decomposition. Expert Systems with Applications, 169, Article
195–197. 114332. https://doi.org/10.1016/j.eswa.2020.114332
Kumar, K., & Haider, M. T. U. (2021). Enhanced prediction of intra-day stock market Shah, D., Isah, H., & Zulkernine, F. (2019). Stock market analysis: A review and
using metaheuristic optimization on RNN–LSTM network. New Generation taxonomy of prediction techniques. International Journal of Financial Studies, 7(2), 26.
Computing, 39, 231–272. Tao, R., Su, C.-W., Xiao, Y., Dai, K., & Khalid, F. (2021). Robo advisors, algorithmic
Li, Y., Bu, H., Li, J., & Wu, J. (2020). The role of text-extracted investor sentiment in trading and investment management: Wonders of fourth industrial revolution in
Chinese stock price prediction with the enhancement of deep learning. International financial markets. Technological Forecasting and Social Change, 163, Article 120421.
Journal of Forecasting, 36(4), 1541–1562. https://doi.org/10.1016/j. Teweles, R. J., & Bradley, E. S. (1998). The stock market (Vol. 64). John Wiley & Sons.
ijforecast.2020.05.001 Théate, T., & Ernst, D. (2021). An application of deep reinforcement learning to
Li, Y., Zheng, W., & Zheng, Z. (2019). Deep robust reinforcement learning for practical algorithmic trading. Expert Systems with Applications, 173, Article 114632.
algorithmic trading. IEEE Access, 7, 108014–108022. Wang, L., Cao, Q., Zhang, Z., Mirjalili, S., & Zhao, W. (2022). Artificial rabbits
Lim, H., & Rokhim, R. (2020). Factors affecting profitability of pharmaceutical company: optimization: A new bio-inspired meta-heuristic algorithm for solving engineering
An Indonesian evidence. Journal of Economic Studies, 48(5), 981–995. https://doi. optimization problems. Engineering Applications of Artificial Intelligence, 114, Article
org/10.1108/JES-01-2020-0021 105082. https://doi.org/10.1016/j.engappai.2022.105082
Maguluri, L., & Ragupathy, R. (2020). An efficient stock market trend prediction using Xie, C., Rajan, D., & Chai, Q. (2021). An interpretable Neural Fuzzy Hammerstein-Wiener
the real-time stock technical data and stock social media data. Int. J. Intell. Eng. Syst, network for stock price prediction. Information Sciences, 577, 324–335. https://doi.
13(4), 316–332. org/10.1016/j.ins.2021.06.076
Mehtab, S., & Sen, J. (2020). Stock price prediction using CNN and LSTM-based deep Yahoo Finance. (2023). Yahoo Finance. Quotes, Business and Finance News: Yahoo
learning models. International Conference on Decision Aid Sciences and Application Finance - Stock Market Live. https://finance.yahoo.com/.
(DASA), 2020, 447–453. Yu, Y., Si, X., Hu, C., & Zhang, J. (2019). A Review of Recurrent Neural Networks: LSTM
Milana, C., & Ashta, A. (2021). Artificial intelligence techniques in finance and financial Cells and Network Architectures. Neural Computation, 31(7), 1235–1270. https://
markets: A survey of the literature. Strategic Change, 30(3), 189–209. doi.org/10.1162/neco_a_01199
Nguyen, T. N. L., & Nguyen, V. C. (2020). The determinants of profitability in listed
enterprises: A study from Vietnamese stock exchange. The Journal of Asian Finance,
Economics and Business, 7(1), 47–58.
16