Conference PaperPDF Available

Abstract and Figures

In this paper, a neural network-based stock price prediction and trading system using technical analysis indicators is presented. The model developed first converts the financial time series data into a series of buy-sell-hold trigger signals using the most commonly preferred technical analysis indicators. Then, a Multilayer Perceptron (MLP) artificial neural network (ANN) model is trained in the learning stage on the daily stock prices between 1997 and 2007 for all of the Dow30 stocks. Apache Spark big data framework is used in the training stage. The trained model is then tested with data from 2007 to 2017. The results indicate that by choosing the most appropriate technical indicators, the neural network model can achieve comparable results against the Buy and Hold strategy in most of the cases. Furthermore, fine tuning the technical indicators and/or optimization strategy can enhance the overall trading performance.
Content may be subject to copyright.
An Artificial Neural Network-based Stock Trading System
Using Technical Analysis and Big Data Framework
Omer Berat Sezer
TOBB University of Economics
and Technology
Ankara, Turkey
A. Murat Ozbayoglu
TOBB University of Economics
and Technology
Ankara, Turkey
Erdogan Dogdu
Georgia State University (adj.)
Cankaya University
Ankara, Turkey
In this paper, a neural network-based stock price predic-
tion and trading system using technical analysis indicators
is presented. The model developed first converts the finan-
cial time series data into a series of buy-sell-hold trigger sig-
nals using the most commonly preferred technical analysis
indicators. Then, a Multilayer Perceptron (MLP) artificial
neural network (ANN) model is trained in the learning stage
on the daily stock prices between 1997 and 2007 for all of
the Dow30 stocks. Apache Spark big data framework is used
in the training stage. The trained model is then tested with
data from 2007 to 2017. The results indicate that by choos-
ing the most appropriate technical indicators, the neural net-
work model can achieve comparable results against the Buy
and Hold strategy in most of the cases. Furthermore, fine
tuning the technical indicators and/or optimization strategy
can enhance the overall trading performance.
General Terms
Algorithmic trading, trading strategy, machine learning, neu-
ral networks, stock market technical analysis
Stock market, Artificial neural network, multi layer percep-
tron, algorithmic trading, technical analysis
Stock market forecasting and developing profitable trad-
ing models have always attracted researchers and practition-
ers [2]. However, it is very challenging to come up with a
model that works reliably under different market conditions.
In the last few decades, thanks to the advancements in com-
puter and communications technologies, computational in-
telligence models started emerging as viable alternatives to
the traditional decision support systems. Previous models
are mostly based on static rules and analyses, hence can
easily be outdated. At the same time, due to the excessive
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee provided that copies are not
made or distributed for profit or commercial advantage and that copies bear
this notice and the full citation on the first page. Copyrights for components
of this work owned by others than ACM must be honored. Abstracting with
credit is permitted. To copy otherwise, or republish, to post on servers or to
redistribute to lists, requires prior specific permission and/or a fee. Request
permissions from
ACM SE ’17, April 13-15, 2017, Kennesaw, GA, USA
Copyright 2017 ACM 978-1-4503-5024-2/17/04 $15.00
manual interactions, these models are not immune from hu-
man emotions, resulting in inconsistent, poor returns. Com-
putational intelligence models on the other hand, such as
neural networks [8, 5, 7], neuro-fuzzy models [9], support
vector machines (SVM) [4], and genetic algorithms-based
systems [1], demonstrated good performance achievements.
Creamer utilized machine-learning algorithms to develop ef-
fective trading strategies and accordingly built automated
trading agents. The agent they developed generated higher
profits using Logitboost method than the simple “buy and
hold” strategy [3]. But their experiments are very limited.
They tested on two European index futures (FESX and
FDAX) for only 21 trading days for March of 2009.
As implementing machine learning models using big data
is becoming mainstream, such models started to emerge as
part of algorithmic trading systems that now originates the
majority of all transactions executed in NYSE. In this pa-
per we aim to create such a profitable model using technical
analysis indicators as features for a neural network model.
Section 2 explains the model and the features we use, sec-
tion 3 presents the method and the results are evaluated in
section 4.
Technical analysis indicators have been used for identify-
ing appropriate entry-exit points for trading models. Even
though there are over 100 different indicators, some of them
are more frequently used then the others, mostly because of
easiness and/or effectiveness. Three of the most commonly
used technical indicators are RSI, MACD and Williams %R.
These are the features that we selected to use in our neuro-
trading model due to their wide acceptance. Below we briefly
explain these indicators.
2.1 Relative Strength Index (RSI)
Relative Strength Index (RSI) is a technical momentum
indicator that shows historical strength or weakness of stock
prices. It also compares losses and gains in a specified time
period as follows.
RSI = 100 100
(1 + RS)(1)
RS =AverageGain
AverageLoss (2)
2.2 Moving Average Convergence and Diver-
gence (MACD)
Figure 1: Labelling Points with Window
MACD is a technical indicator that illustrates the trend
of the stock prices. It is equal to the difference of the 12-day
Exponential Moving Average (EMA) and 26-day EMA.
MACD = (12DaysE M A 26DaysEM A) (3)
2.3 Williams %R
Williams %R is momentum based technical indicator that
shows the overbought and oversold conditions for stock prices.
%R=(HighestHigh C urrentClose)
(HighestHigh LowestLow)x100 (4)
For big data analytics, commonly used open source tools
are Apache Hadoop1and Apache Spark2. In our work, we
used Spark. Apache Spark has a built-in machine learning
library called MLlib implementing many algorithms. In gen-
eral, for analyzing time series data and forecasting problems,
Recurrent Neural Networks (RNN) are used in the litera-
ture. Meanwhile, Multilayer Perceptron (MLP) is also used
for time series forecasting when appropriate feature process-
ing is implemented. For this purpose, in our study, we used
the aforementioned technical indicator outcomes as model
features. Furthermore, we used Spark MLlib library’s MLP
classifier to analyse time-series data.
In our approach, we aim to predict buy and sell (entry-
exit) points of the stock prices by using MLP artificial neural
network. There are three main phases in our model for pre-
dicting the buy-sell points from the stock prices. There is
an extra Phase 4 for calculating the efficiency of the system,
however, that is not part of the trading model. Algorithm 1
shows the steps of all phases.
In our study, the daily stock prices for Dow 30 stocks,
which are obtained from, are used as train-
ing and test datasets. In the first phase, open and close
prices, daily high and low price values for each stock are ob-
tained. Then, for each day, all daily close prices are labelled
as “Hold”, “Buy”, or “Sell” by automatically analyzing the
peak and valley points indicating highest and lowest points
for a specified perio d. The p eak points are marked as “Sell”,
the valley points are marked as “Buy” and the remaining
points are marked as “Hold” (Figure 1)3.
3Base graph is adapted from
Table 1: Confusion Matrix of WMT (Walmart
0889 429 868
141 110 4
221 0 139
Table 2: Evaluation Of WMT
Class 0 Class 1 Class 2
Precision 0.93 0.20 0.14
Recall 0.41 0.71 0.87
F1 Score 0.57 0.32 0.24
In the second phase, RSI, WilliamR and MACD values are
calculated for each daily stock price. In our framework, we
used TA4J4(Techical Analysis For Java) library to calculate
the RSI, WilliamR and MACD of the daily prices. After-
wards, corresponding label value, close price, RSI, WilliamR
and MACD values are normalized in order to be suitable for
the learning stage.
In addition, in the second phase, the data imbalance prob-
lem is also solved. Normally, the occurrence of “Hold” labels
is much greater than the number of the “Sell” and “Buy”
labels in the training data. This effects the learning stage
such that the model only learns the majority classes better
(Hold), ignoring the smaller classes causing misclassification
and misprediction of data. There are different solutions in
literature for this problem. We preferred the approach of
resampling the minority classes. In other words, we created
multiple copies of “Buy” and “Sell” labeled data and intro-
duced those to the training dataset. Thus, the number of
three class labels are approximately equal solving the class
imbalance problem.
In the third phase, training and test data are fed to the
multilayer perceptron (MLP) using Apache Spark. Our topol-
ogy for MLP has four layers that consist of 4 nodes in the
input layer, 5 nodes in the second layer, 4 nodes in the third
layer and 3 nodes in the fourth layer (one for each output
class Buy, Hold, and Sell). MLP is run with 200 epochs
to train the learning model using the labeled training data.
Figure 2 depicts the whole process graphically.
As explained in Section 3, we used the three phases of the
algorithm to train and test the model, and then measure the
overall performance in Phase 4. The stock data obtained for
Dow 30 is split into two sets, the training data is the stock
prices between the dates of 1/1/1997 and 12/31/2006, and
the test data is the stock prices from 1/1/2007 to 1/1/2017.
We analyzed the performance of our framework with differ-
ent criteria. Our focus is on the correct prediction of labels
as an output of MLP model. Walmart (WMT) stock is
chosen to provide an example for the evaluation. Table 1 il-
lustrates the confusion matrix for WMT, and Table 2 shows
the precision, recall and F1 scores. The overall prediction
rate accuracy for WMT is 65.52%.
Moreover, we evaluated our system based on the success
Figure 2: Phases of Our Algorithm
Algorithm 1 Predicting label of Dow30 Stocks using MLP
1: procedure AllPhases()
2: P hase 1 :
3: dataset =read(open, close, hig h, low, adj ustedClose, vol ume)
4: dataset.adj ustRatio =dataset.close/dataset.adjustedClose
5: adj ust(, dataset.close, dataset.high, dataset.low )with adjustRatio
6: calculate Label (Buy/Sell/H old)
7: P hase 2 :
8: calculate RSI , W illiamR, MAC D f or each line in dataset
9: trainingD ataset, testDataset =dataset.split(dates = 1997 2006, dates = 2007 2016)
10: trainingDataset =resample(trainingDataset)
11: P hase 3 :
12: model =M LP (layers = [4,5,4,3], epochs = 200, block size = 128, seed = 1234L)
13: model.train(trainingDataset)
14: model.test(testDataset)
15: P hase 4 :
16: evaluateResults()
of our trading strategy. In our model, a stock is bought, sold
or held according to its predicted label result. For instance,
if the predicted label equals to ”1” (buy), (the correspond-
ing output neuron is activated) the stock is bought using
the capital that exists at that particular point. We start
with a total capital of $10,000. All available capital is used
during each transaction. If the predicted label equals to ”2”
(sell), the stock is sold and we get back to an all cash po-
sition. If predicted label equals to 0” (hold), system does
not do anything. As a result, during trading, if the same
label is repeated one after another, only the first label gets
triggered, the system ignores the repeating signals until the
label changes. Also, in our scenario, we used a realistic trad-
ing environment that includes trading commission ($1 per
transaction, 0.001 of the starting capital). Stop loss situa-
tions (%5) are also implemented in our scenario.
Transaction Number, Interval, Gain, Instant Capital
1.(21-25) =>-516.19 Capital: $9481.81
62.(831-836) =>-1532.45 Capital: $19428.23
168.(2463-2465) =>1061.5 Capital: $49181.78
The box above shows a sample of JPM (JPMorgan) trades
by our framework. There are 168 transactions for JMP be-
tween 2007-2017. Starting capital is $10,000 in 1/1/2007.
The ending capital reaches $49,181.78 at the end.
We also applied “Buy and Hold” (BaH) as the base strat-
egy for Dow 30 stocks for the same testing period. In BaH,
a stock is bought at the beginning and sold at the end of
the testing period. This is the preferred strategy for most
long-term investors and works very well for bull markets,
but not so good in trendless or bear markets.
Table 3 shows the comparative performance of our model
against the BaH for all Dow 30 stocks. Our proposed frame-
work’s average annualized return is 10.3%, and the aver-
age annualized return of BaH strategy is 13.83%. Our pro-
posed strategy’s annualized return performed better than
BaH strategy’s annualized return in only 9 out of 29 (Visa
stock [V] did not have enough data points in the same pe-
riod). The average success percentage of all transactions
(buy then sell) in our system is 67.33% indicating that ev-
ery 2 out of 3 transactions resulted in a profit.
Generally it is very difficult to beat Buy and Hold during
such a lengthy time period. However, our model provided
mixed results (sometimes better, sometimes worse) in com-
parison to BaH. This is mainly because of using the same
standard values for the chosen technical parameters for all of
the stocks. Since, we have not implemented any new indica-
tor and/or parameter optimization, the performances of the
stocks vary accordingly. However, it is seen in previous stud-
ies that implementing such optimization techniques might
increase the overall trading performance considerably [6].
Fine tuning the technical indicator parameters individually
for each stock might improve the overall performance of the
trading model.
Table 3: Evaluation of Our Proposed System with Dow30 Shares - Total Capital with Our Prosed Strategy
(OUR), Total Capital with Buy and Hold Strategy (BaH), Our Annualized Return (OURr), Buy and Hold
Annualized Return (BaHr), Annualized Number of Transaction (AnT), Percent of Success (PoS), Average
Percent Profit Per Transactions (ApT), Average Transaction Length (L), Maximum Profit Percentage in
Transaction (MpT), Maximum Loss Percentage in Transaction (MlT), Maximum Capital (MxC)
Share OUR BaH OURr BaHr AnT Pos ApT L MpT MlT MxC
MMM $15234.16 $29324.88 6.33% 16.99% 12.0 67.07% 0.63% 5 12.54% -8.20% $15505.23
AXP $14727.15 $15157.78 5.80% 6.25% 15.6 57.01% 0.68% 13 43.09% -13.75% $21180.43
AAPL $14742.93 $104256.20 5.83% 40.79% 5.8 60.00% 1.26% 20 23.28% -7.33% $17804.25
BA $17010.05 $22809.31 8.05% 12.78% 20.3 66.91% 0.50% 5 6.17% -8.90% $18302.59
CAT $10252.42 $21030.51 0.36% 11.44% 31.0 62.91% 0.12% 4 11.54% -8.31% $12895.92
CVX $17907.21 $22968.13 8.87% 12.89% 20.6 67.38% 0.48% 3 12.53% -9.98% $18349.65
CSCO $21182.93 $13126.52 11.57% 4.05% 22.0 66.89% 0.64% 7 8.96% -9.39% $21594.89
KO $17258.98 $23354.41 8.29% 13.18% 8.6 76.27% 1.03% 9 4.53% -12.17% $17258.98
DIS $28859.03 $34368.91 16.71% 19.72% 22.3 70.59% 0.82% 8 11.85% -5.41% $30457.32
DD $17750.91 $22197.39 8.74% 12.34% 18.0 66.67% 0.60% 5 19.97% -6.65% $19297.54
XOM $18385.49 $15946.05 9.30% 7.05% 23.7 66.67% 0.47% 5 20.27% -5.78% $18868.03
GE $12663.52 $12399.64 3.50% 3.19% 21.9 65.33% 0.31% 6 15.30% -14.68% $13237.47
GS $14230.22 $12238.97 5.28% 2.99% 23.2 64.78% 0.39% 5 24.93% -15.50% $14230.22
HD $15088.71 $43768.70 6.19% 24.04% 24.7 68.64% 0.36% 6 2.89% -7.65% $18299.88
IBM $17151.82 $21143.52 8.19% 11.55% 17.2 70.34% 0.54% 5 5.66% -7.86% $19265.33
INTC $27965.75 $23656.29 16.21% 13.40% 22.2 68.42% 0.80% 6 7.05% -7.18% $31877.34
JNJ $19043.10 $23687.77 9.86% 13.42% 17.8 73.77% 0.58% 6 8.85% -6.99% $19279.80
JPM $49181.78 $22092.57 26.17% 12.26% 24.5 67.26% 1.21% 5 27.14% -8.62% $49181.78
MCD $17519.35 $38489.77 8.53% 21.75% 15.5 70.75% 0.56% 2 3.79% -4.01% $18445.34
MRK $29081.32 $18865.70 16.86% 9.71% 22.5 69.48% 0.79% 6 8.86% -6.71% $29389.65
MSFT $37923.78 $25820.00 21.48% 14.85% 22.6 69.03% 0.97% 6 6.28% -5.77% $37923.78
NKE $22940.48 $48496.06 12.89% 25.93% 16.9 67.24% 0.93% 13 28.39% -8.50% $28257.09
PFE $11094.86 $18953.47 1.53% 9.78% 22.9 64.33% 0.16% 6 7.07% -8.52% $11653.85
PG $20278.23 $17434.55 10.88% 8.46% 18.8 68.99% 0.62% 9 10.23% -5.48% $20278.23
TRV $64371.78 $31098.53 31.23% 18.01% 24.1 75.15% 1.26% 7 33.97% -6.54% $64371.78
UTX $18540.16 $20932.55 9.43% 11.38% 24.1 68.48% 0.47% 5 21.00% -10.23% $19360.46
UNH $9343.90 $34464.65 -0.99% 19.80% 15.2 57.69% 0.25% 9 10.67% -17.73% $12030.98
VZ $12147.37 $24315.17 2.88% 13.83% 16.2 61.26% 0.26% 6 22.05% -5.97% $13267.72
WMT $32230.01 $18389.92 18.63% 9.30% 18.5 73.23% 0.98% 7 11.07% -8.07% $32230.01
In this paper, we presented a new stock trading and pre-
diction model based on a MLP neural network utilizing tech-
nical analysis indicator values as features. Big data frame-
work Apache Spark is used in implementation. The model
is trained and tested on Dow 30 stocks in order to see the
evaluate the model. The results indicate that comparable
results are obtained against the baseline Buy and Hold strat-
egy even without fine tuning and/or optimizing the model
parameters. For future work, some optimization stages will
be added to the model and deep learning models will be used
in the learning stage.
[1] R. Araujo and T. Ferreira. A morphological-rank-linear
evolutionary method for stock market prediction.
Information Sciences, 237:3–17, 2013.
[2] G. S. Atsalakis and K. P. Valavanis. Surveying stock
market forecasting techniques-part ii: Soft computing
methods. Expert Systems with Applications,
36:5932–5941, 2009.
[3] G. Creamer. Model calibration and automated trading
agent for euro futures. Quantitative Finance,
12(4):531–545, 2012.
[4] K. Kim. Financial time series forecasting using support
vector machines. Neurocomputing, 55(1–2):307–319,
[5] Z. Liao and J. Wang. Forecasting model of global stock
index by stochastic time effective neural network.
Expert Systems with Applications, 37(1):834–841, 2010.
[6] A. Ozbayoglu and U. Erkut. Stock market technical
indicator optimization by genetic algorithms. Intelligent
Engineering Systems through Artificial Neural
Networks, 20:589–596, 2010.
[7] K. Park and H. Shin. Stock price prediction based on a
complex interrelation network of economic factors.
Engineering Applications of Artificial Intelligence,
26:1550–1561, 2013.
[8] J. Wang, J. Wang, Z. Zhang, and S. Guo. Forecasting
stock indices with back propagation neural network.
Expert Systems with Apps., 38(11):14346–14355, 2011.
[9] F. Zarandi, B. Rezaee, I. Turksen, and E. Neshat.
Forecasting model of global stock index by stochastic
time effective neural network. Expert Systems with
Applications, 36:139–154, 2009.
... The predictor variables are technical analysis indicators that are highly correlated. Neural networks using technical indicators have shown predictive capabilities comparable to a buy-and-hold strategy [24]. Technical analysis assumes that prices reflect all relevant information and predicts price movements based on asset price history and volume trends [25]. ...
Full-text available
Algorithmic trading is a common topic researched in the neural network due to the abundance of data available. It is a phenomenon where an approximately linear relationship exists between two or more independent variables. It is especially prevalent in financial data due to the interrelated nature of the data. The existing feature selection methods are not efficient enough in solving such a problem due to the potential loss of essential and relevant information. These methods are also not able to consider the interaction between features. Therefore, we proposed two improvements to apply to the Long Short-Term Memory neural network (LSTM) in this study. It is the Multicollinearity Reduction Module (MRM) based on correlation-embedded attention to mitigate multicollinearity without removing features. The motivation of the improvements is to allow the model to predict using the relevance and redundancy within the data. The first contribution of the paper is allowing a neural network to mitigate the effects of multicollinearity without removing any variables. The second contribution is improving trading returns when our proposed mechanisms are applied to an LSTM. This study compared the classification performance between LSTM models with and without the correlation-embedded attention module. The experimental result reveals that a neural network that can learn the relevance and redundancy of the financial data to improve the desired classification performance. Furthermore, the trading returns of our proposed module are 46.82% higher without sacrificing training time. Moreover, the MRM is designed to be a standalone module and is interoperable with existing models.
... The present weight invested and the economic state of all assets is stored in each state of the MDP. Application of MDP modelling for financial markets has been widely studied [40], [41]. MDP can be described as a sequential decision problem and can be used to determine the probability distribution on states. ...
Full-text available
Trading strategies to maximize profits by tracking and responding to dynamic stock market variations is a complex task. This paper proposes to use a multilayer perceptron method (a part of artificial neural networks (ANNs)), that can be used to deploy deep reinforcement strategies to learn the process of predicting and analyzing the stock market products with the aim to maximize profit making. We trained a deep reinforcement agent using the four algorithms: proximal policy optimization (PPO), deep Q-learning (DQN), deep deterministic policy gradient (DDPG) method, and advantage actor critic (A2C). The proposed system, comprising these algorithms, is tested using real time stock data of two products: Dow Jones (DJIA-index), and Qualcomm (shares). The performance of the agent linked to the individual algorithms was evaluated, compared and analyzed using Sharpe ratio, Sortino ratio, Skew and Kurtosis, thus leading to the most effective algorithm being chosen. Based on the parameter values, the algorithm that maximizes profit making for the respective financial product was determined. We also extended the same approach to study and ascertain the predictive performance of the algorithms on trading under highly volatile scenario, such as the pandemic coronavirus disease 2019 (COVID-19).
... Indeed, the universal approximation theorem of neural networks [14,15] proved that an MLP with a single hidden layer could approximate any continuous functions. Therefore, MLPs are more widely employed than SLPs in complex or data-intensive tasks such as pattern recognition [16,17], time-series prediction [18,19], signal processing and control [20,21], and bigdata analysis [22,23]. Like the output layer of an SLP, the extra hidden layers of an MLP adopt activation functions to consider nonlinear properties. ...
Full-text available
By combining multilayer perceptrons (MLPs) and radial basis function neural networks (RBF-NNs), an efficient multilayer RBF network is proposed in this work for regression problems. As an extension to the existing multilayer RBF network (RBF-MLP-I), the new multilayer RBF network (RBF-MLP-II) first nonlinearly transforms the multi-dimensional input data by adopting a set of multivariate basis functions. Then, linear weighted sums of these basis functions, i.e., the RBF approximations, are computed in the first hidden layer and used as the features of this layer. Subsequently, in the following hidden layers, each feature of the preceding hidden layer is fed into a univariate RBF characterized by the trainable scalar center and width, and then, RBF approximations are also applied to these basis functions. Finally, the features of the last hidden layer are linearly transformed to approximate the target output data. RBF-MLP-II reduces the number of parameters in basis functions and thus the network complexity of RBF-MLP-I. Verified by four regression problems, it is demonstrated that the proposed RBF-MLP-II exhibits the best approximation accuracy and fastest training convergence compared to conventional MLPs, RBF-NNs, and RBF-MLP-I.
... ese are achieved through the development of algorithmic techniques that deploys intelligent agents drawn from the simulation of nature to solve real-life problems. Computational intelligence methods have been applied to solve classification problems, time-series prediction problems, examination scheduling [6], stock market problems, weather forecasting, national economic forecasting, job scheduling [7], electric voltage regulation, agricultural production, industrial site location, vehicle-routing, etc. [8,9]. ...
Full-text available
This paper presents a comparative performance analysis of some metaheuristics such as the African Buffalo Optimization algorithm (ABO), Improved Extremal Optimization (IEO), Model-Induced Max-Min Ant Colony Optimization (MIMM-ACO), Max-Min Ant System (MMAS), Cooperative Genetic Ant System (CGAS), and the heuristic, Randomized Insertion Algorithm (RAI) to solve the asymmetric Travelling Salesman Problem (ATSP). Quite unlike the symmetric Travelling Salesman Problem, there is a paucity of research studies on the asymmetric counterpart. This is quite disturbing because most real-life applications are actually asymmetric in nature. These six algorithms were chosen for their performance comparison because they have posted some of the best results in literature and they employ different search schemes in attempting solutions to the ATSP. The comparative algorithms in this study employ different techniques in their search for solutions to ATSP: the African Buffalo Optimization employs the modified Karp–Steele mechanism, Model-Induced Max-Min Ant Colony Optimization (MIMM-ACO) employs the path construction with patching technique, Cooperative Genetic Ant System uses natural selection and ordering; Randomized Insertion Algorithm uses the random insertion approach, and the Improved Extremal Optimization uses the grid search strategy. After a number of experiments on the popular but difficult 15 out of the 19 ATSP instances in TSPLIB, the results show that the African Buffalo Optimization algorithm slightly outperformed the other algorithms in obtaining the optimal results and at a much faster speed.
A convolutional neural network (CNN) is applied to forecast stock price changes in the Chinese stock market. We use 27 technical indicators and 5 original price series as benchmark models and further explore the model forecasting performance with social media sentiment. Our results show that our model could obtain 70% forecasting accuracy. Moreover, social media sentiment could increase the forecast performance for both index and individual stocks.
Stock price prediction is a difficult task. This article takes on this challenge and proposes a 3D Convolutional Neural Network based approach to classify the directional trends in a stock’s price. To do that, five companies from a sector are grouped together, and the overall trend in each is predicted simultaneously. This is done to analyze the influence of one company on another. For each company, multiple technical indicators are chosen, and the stock prices are converted into a 3D image of size 15×15×5. To find the best features, we experiment with hierarchical clustering. To complement the 3D Convolutional Neural Network, we also examine the idea of ensemble learning. The proposed method and several existing models are combined to improve the performance of the system. Experimentation is performed on forty-five different companies of the National Stock Exchange. Compared to other similar techniques in literature, our work has achieved up to 35% annual returns for some stocks, with the average being 9.19%. Lastly, we also try to show that grouping companies together and making the prediction on a sector could serve as a new benchmark for stock trend classification.
It has always been a challenge to accurately forecast the behavior of a stock market due to its extremely non-linear and dynamic nature. Numerous studies have shown that technical indicators describing stocks in conjunction with machine learning models can serve as useful tools for forecasting in the stock market. There are various challenges, and one of them is the choice of the right technical indicators and prediction models. It is believed that there is no optimal set of technical indicators that work well in all market scenarios in a dynamic environment such as the stock market. The statement also applies to different prediction models. There is no definite winner, and different settings can emerge as winners in different market scenarios. On this premise, we propose DSdT: A Dynamic Scenario-driven Technique for Stock Price Prediction and Trading Strategy Enhancement. The proposed novel technique uses the scenario recognition and integration module to identify and integrate the current market scenario into the forecasting pipeline, resulting in a scenario-driven stock price prediction. We use a large set of technical indicators and a shallow neural network equipped with a gating mechanism to capture and integrate the current market scenario in the prediction process. Experiments are performed on 11 stocks of the Indian Stock Market. The proposed approach yields mean absolute percentage error (MAPE) of 1:67% compared to 2:4% of its closest non-scenario-driven counterpart for the next day's stock price prediction task. A trading strategy is also devised using the proposed technique and the returns are compared with different baselines. Results show that the devised trading strategy yields an approximate average return of 54% compared to 25% of the return obtained by the nearest benchmark.
Financial services are increasingly personalized due to the rapid development of artificial intelligence. In particular, precision marketing is the ultimate goal in providing financial services. However, precision marketing is hindered by problems in model scalability, cold starts, and insufficient transaction data points for many customers and products. Some researchers have attempted to solve these problems by incorporating deep learning into the collaborative filtering algorithm. This has improved the performance of the traditional matrix factorization algorithm, but it comes at the cost of imposing a limit on the capacity of the recommendation model to capture the complex interaction features. In this paper, we propose a graphical deep collaborative filtering (GraphDCF) algorithm for providing personalized mutual fund recommendations. The graph-structured network is constructed by connecting customer nodes with similar purchases and redeemed trading orders in the sequential view. In this manner, we can model different latent relationships among customers who have similar shopping habits. Subsequently, the corresponding embedding vector for each customer node is generated through an aggregate function based on similarity in transaction behaviors. Finally, to provide personalized recommendations, in addition to customer features and mutual fund attributes, the proposed deep embedded collaborative filtering framework predicts how willing a customer is to purchase a mutual fund. Experimental results on a real-world dataset from Taiwan Commercial bank demonstrated indicated that DECF approaches outperformed deep learning methods such as DCF and NCF. The proposed GraphDCF algorithm outperformed (by up to 2.3%) other frequently used approaches.
Full-text available
Technical analysis indicators are widely used in the field of quantitative investment, and they are usually utilized to assist in the search for profitable buy and sell points. In order to make better use of technical indicators, a method of trying to improve the performance of technical indicators by using neural network models is proposed in this work. The method tries to utilize neural network models to learn the possible patterns or features of price and volume before the profitable buy or sell points indicated by technical indicators. In modeling, a certain length of historical market data before the buy and sell points indicated by technical indicators is taken as model inputs, and whether or not can these buy and sell points meet certain profit standard is taken as labels. We validate our method on stock indexes, stocks and futures, and the results show that our method can improve the performance of several simple but common strategies based on technical analysis indicators.
Although the bond market provides a basis for determining the capital cost of a corporation by forming the fair value of issued bonds, studies regarding the financial market has mainly focused on the stock market. Because the bond market is affected by several variables, it is a good candidate for machine learning applications. Specifically, traders create trading strategies that involves the difference between long- and short-term bond yields to minimize market risks; hence, if this spread can be predicted, it can serve as the data-driven long-term direction of the bond market and generate additional profits. Therefore, a prediction model that predicts the spreads between 10- and 3-year treasury bonds is proposed herein; subsequently, back-testing is applied to verify the performance of the prediction model. Consequently, the AdaBoost outperformed other prediction models. Moreover, when back-testing was applied based on the results of predictive models, we achieved up to 54.2% in return on investment over 6-month. This study establishes a novel adaptive trading system that integrates machine learning and back-testing for the bond market. In the future, this study will be extended using complex data or the reflection of real constraints based on its use as initial research in the bond market.
Full-text available
We explored the application of a machine learning method, Logitboost, to automatically calibrate a trading model using different versions of the same technical analysis indicators. This approach takes advantage of boosting's feature selection capability to select an optimal combination of technical indicators and design a new set of trading rules. We tested this approach with high-frequency data of the Dow Jones EURO STOXX 50 Index Futures (FESX) and the DAX Futures (FDAX) for March 2009. Our method was implemented with different learning algorithms and outperformed a combination of the same group of technical analysis indicators using the parameters typically recommended by practitioners. We incorporated this method of model calibration in a trading agent that relies on a layered structure consisting of the machine learning algorithm described above, an online learning utility, a trading strategy, and a risk management overlay. The online learning layer combines the output of several experts and suggests a short or long position. If the expected position is positive (negative), the trading agent sends a buy (sell) limit order at prices slightly lower (higher) than the bid price at the top of the buy (sell) order book less (plus) transaction costs. If the order is not 100% filled within a fixed period (i.e. 1 minute) of being issued, the existent limit orders are cancelled, and limit orders are reissued according to the new experts' forecast. As part of its risk management capability, the trading agent eliminates any weak trading signal. The trading agent algorithm generated positive returns for the two major European index futures (FESX and FDAX) and outperformed a buy-and-hold strategy.
Stock price prediction is a field that has been continuously interesting. Stock prices are influenced by many factors such as oil prices, exchange rates, money interest rates, stock price indexes in other countries, and economic situations. Although these factors affect the stock price independently, they have an influence on the stock price through a complex interrelation, i.e., a network structure between these factors. In the stock prediction, the conventional methods represent limitations in reflecting the interrelation and complexity in these factors. In this paper, a stock prediction method using a semi-supervised learning (SSL) algorithm is proposed to circumvent such limitations. The SSL algorithm is a method that can implement a network consisting of nodes of the factors and edges of similarities between them. Through the network structure, the SSL algorithm is able to reflect the reciprocal and cyclic influences among the factors to prediction. The proposed model is applied to the stock price prediction from January 2007 to August 2008, using the global economic index and the stock prices of 200 individual companies listed to the KOSPI200.
This work presents an evolutionary morphological-rank-linear approach in order to overcome the random walk dilemma for financial time series forecasting. The proposed Evolutionary Morphological-Rank-Linear Forecasting (EMRLF) method consists of an intelligent hybrid model composed of a Morphological-Rank-Linear (MRL) filter combined with a Modified Genetic Algorithm (MGA), which performs an evolutionary search for the minimum number of relevant time lags capable of a fine tuned characterization of the time series, as well as for the initial (sub-optimal) parameters of the MRL filter. Then, each individual of the MGA population is improved using the Least Mean Squares (LMS) algorithm to further adjust the parameters of the MRL filter, supplied by the MGA. After built the prediction model, the proposed method performs a behavioral statistical test with a phase fix procedure to adjust time phase distortions that can appear in the modeling of financial time series. An experimental analysis is conducted with the method using four real world stock market time series according to a group of performance metrics and the results are compared to both MultiLayer Perceptron (MLP) networks and a more advanced, previously introduced, Time-delay Added Evolutionary Forecasting (TAEF) method.
In this paper, we investigate the statistical properties of the fluctuations of the Chinese Stock Index, and we study the statistical properties of HSI, DJI, IXIC and SP500 by comparison. According to the theory of artificial neural networks, a stochastic time effective function is introduced in the forecasting model of the indices in the present paper, which gives an improved neural network – the stochastic time effective neural network model. In this model, a promising data mining technique in machine learning has been proposed to uncover the predictive relationships of numerous financial and economic variables. We suppose that the investors decide their investment positions by analyzing the historical data on the stock market, and the historical data are given weights depending on their time, in detail, the nearer the time of the historical data is to the present, the stronger impact the data have on the predictive model, and we also introduce the Brownian motion in order to make the model have the effect of random movement while maintaining the original trend. In the last part of the paper, we test the forecasting performance of the model by using different volatility parameters and we show some results of the analysis for the fluctuations of the global stock indices using the model.
Support vector machines (SVMs) are promising methods for the prediction of financial time-series because they use a risk function consisting of the empirical error and a regularized term which is derived from the structural risk minimization principle. This study applies SVM to predicting the stock price index. In addition, this study examines the feasibility of applying SVM in financial forecasting by comparing it with back-propagation neural networks and case-based reasoning. The experimental results show that SVM provides a promising alternative to stock market prediction.
Stock prices as time series are non-stationary and highly-noisy due to the fact that stock markets are affected by a variety of factors. Predicting stock price or index with the noisy data directly is usually subject to large errors. In this paper, we propose a new approach to forecasting the stock prices via the Wavelet De-noising-based Back Propagation (WDBP) neural network. An effective algorithm for predicting the stock prices is developed. The monthly closing price data with the Shanghai Composite Index from January 1993 to December 2009 are used to illustrate the application of the WDBP neural network based algorithm in predicting the stock index. To show the advantage of this new approach for stock index forecast, the WDBP neural network is compared with the single Back Propagation (BP) neural network using the real data set.
In this paper, a type-2 fuzzy rule based expert system is developed for stock price analysis. Interval type-2 fuzzy logic system permits us to model rule uncertainties and every membership value of an element is interval itself. The proposed type-2 fuzzy model applies the technical and fundamental indexes as the input variables. This model is tested on stock price prediction of an automotive manufactory in Asia. Through the intensive experimental tests, the model has successfully forecasted the price variation for stocks from different sectors. The results are very encouraging and can be implemented in a real-time trading system for stock price prediction during the trading period.
The key to successful stock market forecasting is achieving best results with minimum required input data. Given stock market model uncertainty, soft computing techniques are viable candidates to capture stock market nonlinear relations returning significant forecasting results with not necessarily prior knowledge of input data statistical distributions. This paper surveys more than 100 related published articles that focus on neural and neuro-fuzzy techniques derived and applied to forecast stock markets. Classifications are made in terms of input data, forecasting methodology, performance evaluation and performance measures used. Through the surveyed papers, it is shown that soft computing techniques are widely accepted to studying and evaluating stock market behavior.
Model calibration and automated trading agent for euro futures Financial time series forecasting using support vector machines
  • G Creamer
G. Creamer. Model calibration and automated trading agent for euro futures. Quantitative Finance, 12(4):531-545, 2012. [4] K. Kim. Financial time series forecasting using support vector machines. Neurocomputing, 55(1-2):307-319, 2003.
Stock market technical indicator optimization by genetic algorithms. Intelligent Engineering Systems through
  • A Ozbayoglu
  • U Erkut
A. Ozbayoglu and U. Erkut. Stock market technical indicator optimization by genetic algorithms. Intelligent Engineering Systems through Artificial Neural Networks, 20:589-596, 2010.