Next Article in Journal
Natural Frequency Prediction Method for 6R Machining Industrial Robot
Next Article in Special Issue
Heatwave Damage Prediction Using Random Forest Model in Korea
Previous Article in Journal
Prevention and Management of Gestational Diabetes Using Vitamin D Supplementation: An Overview and Appraisal of Clinical Trials
Previous Article in Special Issue
An Improvement on Estimated Drifter Tracking through Machine Learning and Evolutionary Search
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Prediction of Stock Performance Using Deep Neural Networks

1
College of Information Science and Engineering, Ritsumeikan University, Kusatsu, Shiga 525-8577, Japan
2
Daiwa Asset Management Co. Ltd., Tokyo 100-6753, Japan
3
Institute of Industrial Science, The University of Tokyo, Tokyo 153-8505, Japan
*
Author to whom correspondence should be addressed.
Appl. Sci. 2020, 10(22), 8142; https://doi.org/10.3390/app10228142
Submission received: 1 October 2020 / Revised: 5 November 2020 / Accepted: 10 November 2020 / Published: 17 November 2020
(This article belongs to the Special Issue Applied Machine Learning)

Abstract

:
Stock performance prediction is one of the most challenging issues in time series data analysis. Machine learning models have been widely used to predict financial time series during the past decades. Even though automatic trading systems that use Artificial Intelligence (AI) have become a commonplace topic, there are few examples that successfully leverage the proven method invented by human stock traders to build automatic trading systems. This study proposes to build an automatic trading system by integrating AI and the proven method invented by human stock traders. In this study, firstly, the knowledge and experience of the successful stock traders are extracted from their related publications. After that, a Long Short-Term Memory-based deep neural network is developed to use the human stock traders’ knowledge in the automatic trading system. In this study, four different strategies are developed for the stock performance prediction and feature selection is performed to achieve the best performance in the classification of good performance stocks. Finally, the proposed deep neural network is trained and evaluated based on the historic data of the Japanese stock market. Experimental results indicate that the proposed ranking-based stock classification considering historical volatility strategy has the best performance in the developed four strategies. This method can achieve about a 20% earning rate per year over the basis of all stocks and has a lower risk than the basis. Comparison experiments also show that the proposed method outperforms conventional methods.

1. Introduction

Stock performance prediction is one of the most challenging issues in time series data analysis. How to accurately predict stock performance changing is an open question with respect to the financial world and academia field. Stock performance prediction is a difficult task, due to the complexity and dynamic of the markets and many inexplicit, intertwined factors involved. Economic analysts and stock traders are the earliest pioneers who perform the prediction of stock performance. In the past several decades, thousands of books in stock trading have been published.
Many economic analysts and stock traders have studied the historical patterns of financial time series data and have proposed various methods to predict stock performance. In order to achieve a promising performance, most of these methods require careful selection of index variables and finding the sharing features among the distinguished stocks. William J. O’Neil and M. Weinstein are two representatives of successful traders. They summarized their stock trading experience in the publications [1,2,3,4]. William J. O’Neil’s CAN SLIM method has a huge following, and also performed well in American Association of Individual Investors (AAII)’s implementation of his model [5]. M. Minervini revealed the proven, time-tested trading system he used to achieve triple-digit returns for five consecutive years, averaging 220% per year [6]. Many followers referred to their methodology in stock trading due to their remarkable achievement.
On the other hand, machine learning models, such as Artificial Neural Networks (ANNs) [7,8,9,10,11,12], Support Vector Regression (SVR) [13,14,15], Genetic Algorithms (GA) [16], as well as hybrid models [17] have been widely used to predict financial time series during recent decades. In addition, the time-series problem considers Dynamic Time Warping (DTW) that handles scaling and shifting, which is common in the stock market. The recently developed DTW Network is an algorithm candidate for financial time series data processing [18]. Ramos-Requena et al. [19] used the Hurst exponent to measure the correlation and co-movement between two different series. Krollner et al. [20] surveyed papers using machine learning techniques for financial time series forecasting based on technique categories, such as ANN-based, evolutionary and optimization techniques, and multiple/hybrid methods. Cavalcante et al. [21] provided a comprehensive overview of the most important primary studies, which cover techniques such as ANN, SVM, hybrid mechanisms, optimization, and ensemble methods. The surveys indicate that the approaches differ regarding the number and types of variables used in modeling financial behavior; however, there is no consensus on which input variables are the best to be used. In addition, it is important to note that there is no well-established methodology to guide the construction of a successful intelligent trading system. The profit evaluation of the proposed methods when used in real-world applications are generally neglected [21].
Recently, deep learning, as an advanced version of ANN, has attracted attention in the machine learning field because of its high performance in areas such as image recognition and speech recognition. In the field of financial forecasting, a similar new trend considers that a deep neural network has the possibility to increase the accuracy of stock market prediction [22,23]. There are two main deep learning approaches that have been used in stock market prediction: Recurrent Neural Networks (RNN) and Convolutional Neural Networks (CNN). Rout et al. made use of a low complexity RNN for stock market prediction [24]. Pinheiro et al. explored RNN with character-level language model pre-training for both intraday and interday stock market forecasting. The proposed automated trading system that, given the release of news information about a company, predicted changes in stock prices [25]. Li et al. adopted the Long Short-Term Memory (LSTM) neural network, which is an improved version of RNN, and incorporates investor sentiment and market factors to analyze the irrational component of stock price [26]. Nelson et al. studied the usage of LSTM networks to predict future trends of stock prices based on the price history, alongside with technical analysis indicators [27]. Bao et al. presented a deep learning framework where wavelet transforms (WT), stacked autoencoders (SAEs), and LSTM are combined for stock price forecasting [28]. Fischer et al. used deep learning, random forests, gradient-boosted trees, and different ensembles as forecasting methods on all S&P 500 constituents from 1992 to 2015. One key finding in their research is that LSTM networks outperform memory-free classification methods [29]. In order to show accountability to their customers, Nakagawa et al. proposed to approximate and linearize the learned LSTM models by layer-wise relevance propagation [30].
Compared to RNN and LSTM, there are a relatively few examples of applying CNN for stock market prediction. Sezer et al. proposed a novel algorithmic trading model CNN-TA using a 2-D convolutional neural network based on 2-D images converted from financial time series data [31]. Zhou et al. proposed a generic framework employing LSTM and CNN for adversarial training to forecast high-frequency stock market [32]. On the whole, the LSTM network is the most widely used deep learning technology for stock performance prediction.
As mentioned above, automatic trading systems that use Artificial Intelligence (AI) have become a commonplace topic, but there are few examples that successfully leverage the proven method invented by human stock traders to build automatic trading systems. The first contribution of this study is the development of an intelligent trading system by integrating AI and the knowledge of human stock traders. In this study, the important index variables suggested by economic analysts and stock traders are used in a deep neural network to predict future stock performance. The second contribution of this study is the verification of the effectiveness of the knowledge of human stock traders and various investment strategies for constructing a successful intelligent trading system. In this study, what index variables are the most significant, and how to perform the stock performance prediction to maximize earning and minimize the risk of investment are investigated. This study is focused on Japanese stock data to explore a reliable investment algorithm for the Japanese stock market. This also aims to verify whether the method invented based on United State (US) stocks is also effective in Japanese stocks, because the traders William J. O’Neil and M. Minervini summarize their experience based on US stocks.
The rest of the paper is organized as follows: Section 2 describes the important index variables and four strategies for stock classification. Section 3 presents the proposed deep neural network to classify the distinguished stocks with good performance. Section 4 shows the evaluation of the proposed systems. Finally, Section 5 concludes this paper.

2. Important Index Variables and Stock Classification

2.1. Important Index Variables for Stock Performance Prediction

In the current stock market, there are hundreds of index variables indicating the value of a stock from different aspects. Professional analysts and stock traders have tried hard to find the correlation between variables and the future performance of stocks. William J. O’Neil and M. Minervini provided many important points and rules for successful stock trading [1,2]. Table 1 lists the 21 index variables (are also called features) that are the most frequently used for recognizing the distinguished stocks in their related publications [1,2].
Among the most important issues in the development of an intelligent trading system is to decide what features should be used for stock performance prediction. One way is just following the suggestions of human stock traders and feeding all features into the developed system. In addition to using all these suggested features, this study presents a feature selection test and verifies the effectiveness of those features. Based on the definition and characteristic of the features, the 21 features are categorized into four groups: price-related features, trading volume features, company financial status-related features, and others. The results of the feature selection test are discussed in Section 4.
In this study, the related data of the important indices with a weekly resolution are downloaded from the stock database and these important features are used as the input of the deep learning algorithm. Daily price-related data and daily trading volume data are also used as the input data of the deep learning algorithm because these two kinds of data (price and trading volume) are the most important for the prediction of stock price from the viewpoint of human stock traders. Using the additional daily resolution data can avoid missing significant dynamic in each week. When the weekly and daily data are used together, the two kinds of data should be synchronized based on time. The solution for data synchronization is explained in Section 3.

2.2. Definition of Positive Samples for Stock Classification

One of the simplest ways of constructing an intelligent trading system is to employ the binary classification algorithm to classify all stocks as two groups: positive samples which are the stocks with good future performance, and negative samples which are the rest of the stocks. This study presents four strategies for classification, and evaluates the strategies from the aspects of both earning rate and risk of investment.

2.2.1. Constant Threshold-Based Stock Classification

Fund managers are concerned about the rising rate α C of stock price—expressed in Equation (1). For example, if the price rising rate of a stock could surpass a threshold in the next 12 weeks, this stock could be a good candidate for investment. In Equation (1), CP is the closing price in the current week, and HP in _ next _ 12 weeks denotes the highest price in the next 12 weeks. In this constant threshold-based stock classification, α C is used to classify stocks. It means that if α C of a stock is higher than the threshold, the stock will be defined as a positive sample in the stock classification; otherwise, the stock is a negative sample. In this study, 70% was chosen as the threshold based on the experience of fund managers. If the developed intelligent trading system uses the constant threshold-based method to select stocks, the system will simply predict whether α C of the stock is over the threshold or not. The system will buy the positive stock in the current week, and sell the positive stock when its α C reaches the threshold in the next 12 weeks.
α C = HP in _ next _ 12 weeks CP CP

2.2.2. Ranking-Based Stock Classification

Because the situation of the market is different every year, in a “good” year, many stocks have good performance and have a high price rising rate. In a “bad” year, the number of stocks with a high price rising rate becomes fewer. In this case, the investment will focus on fewer stocks if the constant threshold method is used for selecting stocks. However, it is necessary to maintain the number of selected stocks and distribute the investment in different stocks to reduce risk.
This study proposes the second strategy in the stock classification. All the stock samples are ranked based on the rising rate α R expressed in Equation (2), then the top x% samples are defined as positive samples and the rest (100 − x)% of the samples are negative samples. In Equation (2), CP is the closing price in the current week, and CP after _ 12 weeks denotes the closing price after 12 weeks. In this ranking-based stock classification, α R is used to classify the stocks. The value of x was empirically decided as 10 in this research. When the developed intelligent trading system uses this method to select stocks, the system will predict whether the stock is ranked as the top 10% or not, and select the 10% stocks as the positive samples for investment. In this method, there is no constant threshold to decide whether the stocks are in the top 10% or not; therefore, it is impossible to use the strategy of the constant threshold-based method (sell the positive stock when α C of the stock reaches the threshold) for trading. In this method, the developed intelligent trading system will predict whether the α R of the stock is in the top 10%, and keep the detected top 10% stocks for 12 weeks before selling them. Therefore, α R is defined as the price rising rate after 12 weeks, which is different from Equation (1).
α R = CP after _ 12 weeks CP CP

2.2.3. Constant Threshold-Based Stock Classification Considering Historical Volatility

In addition to the price rising rate, volatility is also a factor that needs to be considered in the investment. It is necessary to select the stocks which have both a high price rising rate and low volatility. Therefore, this study proposes the third strategy: constant threshold-based stock classification considering historical volatility. In this method, the target rate β C is defined as Equation (3).
β C = α C STD C P in _ past _ 12 weeks / CP
where α C can be calculated using Equation (1), and C P in _ past _ 12 weeks is a vector which includes the daily closing price in the past 12 weeks.   STD C P in _ past _ 12 weeks / CP is the standard deviation of the normalized price in the past 12 weeks. The value of STD C P in _ past _ 12 weeks / CP can indicate the historical volatility. In this method, if β C of a stock is higher than a threshold, the stock will be defined as a positive sample in the stock classification; otherwise, the stock is a negative sample. In this study, 8 was chosen as the threshold based on the experience of fund managers. When the developed intelligent trading system uses this strategy, the system will predict whether β C of the stock is over the threshold or not. The system will buy the positive stock in the current week, and sell the positive stock when β C of the stock reaches the threshold in the next 12 weeks.

2.2.4. Ranking Threshold-Based Stock Classification Considering Historical Volatility

Similar to the idea in the second strategy, it is also possible to develop the ranking threshold-based stock classification considering historical volatility. In this method, the target rate β R is defined as Equation (4).
β R = α R STD C P in _ past _ 12 weeks / CP
where α R can be calculated using Equation (2). The developed intelligent trading system will predict whether β R of the stock is in the top 10%, and keep the detected top 10% stocks for 12 weeks before selling them.
The designed four strategies are summarized in Table 2. Section 4 presents the performance of the stock trading system developed based on the proposed 4 strategies.

3. Deep Neural Network-Based Model for Stock Performance Prediction

3.1. Long Short-Term Memory Networks

Long Short-Term Memory networks—usually just called “LSTMs”—are a special kind of RNN equipped with a special gating mechanism that controls access to memory cells. Since the introduction of the gates, LSTM and its variant have shown great promise in tackling various sequence modeling tasks in machine learning—e.g., natural language processing, image captioning, and speech recognition. Basically, a LSTM unit consists of an input gate, a forget gate, and an output gate. The architecture of an LSTM unit is shown in Figure 1.
Suppose that x t is the input and h t 1 is the hidden output from the last time step t-1, the input gate decides how much of the new information will be added to the cell state c t , and generates a candidate c ˜ t by:
i t = σ W x i x t + W h i h t 1 + b i
c ˜ t = ϕ W x c x t + W h c h t 1 + b c
where i t can be thought of as a knob that the LSTM learns to selectively consider c ˜ t for the current time step. σ is the logistic sigmoid function and ϕ is tanh. Generally, W terms denote weight matrices (e.g., W x i is the matrix of weights from the input to the input gate), and b terms are the bias vectors. The forget gate decides how previous information will be kept in the new time step, and is defined as:
f t = σ W x f x t + W h f h t 1 + b f
Then, the cell state c t is updated by:
c t = f t c t 1 + i t c ˜ t
where is the element-wise product of the vectors. Then, the output gate uses the output o t to control what is then read from the new cell state c t onto the hidden vector h t as follows:
o t = σ W x o x t + W h o h t 1 + b o
h t = o t ϕ c t
In this study, the functional LSTM(·,·,·) is used as shorthand for the LSTM model in Equation (11):
h t , c t = LSTM x t , h t 1 , c t 1 , W , b
where W and b include the weight matrices and bias vectors indicated in Equations (5)–(9). The value of W and b are determined in the training step.

3.2. Concatenated Double-Layered LSTM for Stock Performance Prediction

This study proposes a LSTM-based network to predict the future performance of stocks by classification. The proposed network classifies stocks into two categories (buying or not) based on the historical sequence data. The “Many to one” model has been widely used in sequence data processing. To fully use the memory and forget ability of LSTM, our proposed network is also a “many to one” model. The architecture of the proposed classification network is shown in Figure 2. This means that when classifying the stocks into two categories (buying or not), the historical sequence data from time tn to t: r t n , , r t are input into the network together. In the proposed network, n was empirically decided as 52 by considering the experience of professional traders.
Figure 3 corresponds to the model in Figure 2. It shows the architecture of the model block. There are double-layered LSTMs. Finally, the output is connected with the last LSTM layer. Here, x t denotes the input data at week t. The double-layered LSTM model can be explained by:
h t 1 , c t 1 = LSTM 1 x t , h t 1 1 , c t 1 1 , W 1 , b 1
h t 2 , c t 2 = LSTM 2 h t 1 , h t 1 2 , c t 1 2 , W 2 , b 2
In Figure 3, s t n stands for h t n , c t n , n = 1   o r   2 . To reduce the complexity of the task, in this study, a binary-class classification system was developed for stock performance prediction. This means that the classification system is expected to recognize two categories. Therefore, the output of the final hidden layer connects two nodes to indicate the probabilities for two categories, the probabilities can be estimated from the output of the second LSTM layer as:
P t = W 2   h t 2 + b 2
where W 2 is a weight matrix from the hidden layer to the output layer, and b 2 is the bias vector. P t is a vector to indicate the probability of the sample for two categories: 0 and 1. The category “0” means not buying a stock, and the category “1” means buying a stock. The softmax layer and classification layer are responsible for normalization and category selection which are explained in the following equations:
Normalization σ P t i = e P t , i k = 0 1 e P t , k   for     i = 0     or     1     and     P t = P t , 0 , P t , 1  
Category   selection   = { 1 , 0     if   σ P t 0 > σ P t 1   0 , 1   else                                                                
The double-layer LSTM model can predict whether the automatic trading system should buy or not buy a stock, given the past 52-week history information of that stock. The output of the double-layer LSTM model could be [1, 0] or [0, 1]. [1, 0] means not buying the stock, and [0, 1] means buying the stock. The output ([1, 0] or [0, 1]) is decided in the category selection block based on the comparison of the normalized probabilities provided by the softmax layer. If the probability of category “0” (not buying a stock) is higher than the probability of category “1” (buying a stock), the output is [1, 0]. Otherwise, the output will be [0, 1].
In the training of the network, r t n , , r t ; Ground   Truth   1 , 0 or 0 , 1 is used as the sample data because of the “many to one” architecture. The training algorithm automatically adjusts the parameters in the model based on the principle of the gradient descent. In the training, the loss function is a cross entropy:
L o s s =   j = 1 N T j log σ P j ,   t T
where, N is the number of samples in the training dataset. T j is the row vector format ground truth for sample j. The objective of the training process is to minimize the value of Loss Function Equation (17). In Figure 3, both weekly and daily data are used as the input of the LSTM-based deep learning network; one weekly datum can be connected with five daily data from Monday to Friday.
Considering the particularity of the stock classification, the mistakes in the classification have different practical meanings. For example, in comparison to false negative (stocks with good performance are missed in detection), the false positive (stocks are incorrectly detected as good performance stocks) has a higher risk in the real investment. It is possible to give a higher weighting to false positive in the loss function to force the training to reduce the false positive. For example, the ratio of the weighting of false negative and false positive could be 1:2, 1:3, and so on. Therefore, the loss function is reformed as Equation (18). In the experiments, this research presents an attempt to find the best option for parameter W L o s s in order to achieve good performance of the developed trading system.
L o s s =   j = 1 N T j W L o s s log σ P j ,   t T

4. Experiment Results

4.1. Experiment Setup and Evaluation Criteria

In this study, a deep neural network was adopted and 52-week historical data of features were used as the input of the deep neural network for a binary classification. For example, when the system performed the classification on 2018/04/01 to select the stocks with good performance in the next 12 weeks, the historical data of 2017/04/03–2018/04/01 (52 weeks) were input into the deep neural network. The ground truth of each historical data is binary data: buying the stock or not, when talking about the future 12-week performance. Because the data are organized weekly, one stock can provide 52 samples per year. For example, the historical data of the samples could be 2017/04/03–2018/04/01, 2017/04/10–2018/04/08, 2017/04/17–2018/04/15, …, 2018/03/27–2019/03/25. The future 12-week data of these samples are 2018/04/01–2018/06/25, 2018/04/08–2018/07/02, 2018/04/15–2018/07/09, …, 2019/03/25–2019/06/17, as shown in Figure 4. In the following description, this paper uses the time of the end of data to denote the 52-week length historical data input into the deep neural network. For example, “2018/04/01” denotes the historical data “2017/04/03–2018/04/01”.
In this study, the training dataset, validation dataset, and test dataset were separated based on the year and month as shown in Table 3. In order to verify the repeatability of the proposed method, this study presents the evaluation of the different datasets. For example, when the system was tested on the dataset of the period from 2018/04/01 to 2018/09/30 (as indicated in the final row of Table 3), the data from 2017/04/01 to 2017/12/31 were used for validation, and the data from 2001/04/01 to 2016/09/30 were used for training. The datasets in each row of Table 3 are considered as one set. Averagely, the number of samples in each training, validation, and test dataset is about 450,000, 45,000, and 30,000, respectively. It is important to note that there is no overlap among training, validation, and test data in each set. The basic process in the evaluation of each set of datasets is to use the training dataset for training the model and obtaining multiple classifiers. After that, the best classifier is selected based on the validation dataset. Finally, the selected classifier is evaluated in the test dataset. This process was conducted on each set of datasets to demonstrate the repeatability of the proposed methods.
The training dataset was used to train the model. Training is an iteration process with multiple epochs. One epoch means that all training data have been used once for backpropagation. In this study, the number of epochs was set as 50, because 50 epochs are enough for the convergency of the training process. The training process output one classifier after each epoch. Therefore, 50 different classifiers were generated after 50 epochs. Theoretically, the final classifier should have the best performance. However, the performance of the classifiers did not change too much in the training process. One reason is that enough training data were provided for the deep learning algorithm. After several epochs, the training processing converged, and the parameters of the classifier were optimal.
However, how to choose the best classifier is a problem. In this study, a validation dataset was used to choose the best classifier. As shown in Table 3, the validation dataset is the most recent year before the test dataset. In addition, there is three-month gap between the validation data and test data. When the system works on the day of 2018/03/31 and predicts the future of stocks in the next 12 weeks, the validation dataset should be the data from 2017/04/01 to 2018/03/31. However, the future 12-week data for the historical data from 2018/01/01 to 2018/03/31 are not available on the day 2018/03/31. Therefore, the data from 2018/01/01 to 2018/03/31 cannot be used for validation, and the validation dataset has a 9-month period.
In addition, as described in Section 3, the low false positive value is also expected in the stock selection. Therefore, when choosing the classifier, it is also necessary to consider which one has a low false positive value and maintain the high true positive value at the same time. In this study, the following best precision criterion was adopted to select the classifier in the validation dataset:
Argmax i = 1 , 50 Precision ,   where   Precision = TP TP + FP
where TP is the number of true positive samples and FP is the number of false positive samples.
In the repeatability evaluation, the test dataset had half a year period, and the validation dataset had a 9-month period. The training dataset is the data excluding the test and validation dataset. For example, when the test dataset is data from 2011/04/01 to 2011/09/30, the validation dataset is data from 2010/04/01 to 2010/12/31. In this case, the training dataset was the data from 2001/04/01 to 2010/03/31 and the data from 2012/10/01 to 2018/09/30. In this study, future data after the test data were used for training, because the deep learning needs huge training data to achieve good performance. Using the data after the test data period increases the number of training samples. It is important to note that there is a one-year gap from the end of the test data period to the training data period, because excluding the data in that one year can strictly guarantee that any part of the test data is not used in the training.
In this study, True Positive Rate (TPR, Recall), True Negative Rate (TNR), Average Correction Rate (ACR), and Precision were used to evaluate the performance of the developed prediction systems. The evaluation criteria are denoted in Equations (20)–(23):
TPR = Recall = TP P = TP TP + FN
TNR = TN   N   = TN   TN + FP  
ACR = TPR + TNR 2
Precision = TP TP + FP
where P is the number of all positive samples, and N is the number of all negative samples. TP is the number of true positive samples, FP is the number of false positive samples, TN is the number of true negative samples, and FN is the number of false negative samples.
In addition to the four criteria, the average maximum price rising rate of stocks and average maximum price decreasing rate of stocks were also used in the evaluation. Moreover, this study also presents a simulation of stock trading to evaluate the performance of the proposed methods, and the details of the simulation are presented in each following each subsection.

4.2. Results of Constant Threshold-Based Stock Classification

In the evaluation of the method of constant threshold-based stock classification, two factors should be discussed: W L o s s parameter in Equation (18), and features in Table 1. Table 4 shows the performance of the classification using all features and W L o s s (1:1) values.
The first column indicates the time period of the test dataset. True negative rate, true positive rate (recall), average correction rate, and precision are listed from the second to fifth columns. The average of the maximum rising rate of detected good performance stocks and all stocks are demonstrated in the sixth and seventh columns. The average of the maximum decreasing rate of detected good performance stocks and all stocks are shown in the eighth and ninth columns.
Moreover, this study also presents a simulation of a real stock trading system. In the case of the binary-class classification system using 70% rising rate threshold, the system sets up a 70% rising rate as the selling point. The system will firstly buy all selected stocks. If a selected stock (detected positive sample) achieves 70% rising rate, the system sells it immediately. Otherwise, the stock is kept and sold by the end of 12 weeks. The tenth and eleventh columns of Table 4 show the earning rate of the simulated stock trading system. In addition, the twelfth column of Table 4 provides the basis of all stocks. The basis is the average earning rate from present to 12 weeks later.
In addition, the other two criteria are used in the evaluation of risk: Sharpe ratio with trading on selling point and Sharpe ratio without trading on selling point. The two criteria are defined as Equations (24) and (25):
SR T = P selling CP / CP STD C P until _ selling / CP
SR NT = CP after _ 12 weeks CP / CP STD C P in _ next _ 12 weeks / CP
where CP is the closing price in the current week, P selling is the price when selling the stock, and CP after _ 12 weeks is the close price after 12 weeks. In Equation (24), C P until _ selling is a vector which includes the daily closing price from the current week to selling. C P in _ next _ 12 weeks is a vector which includes the daily closing price in the next 12 weeks.
In fact, the Sharpe ratio without trading on selling point means the stocks will be sold at the end of 12 weeks. The thirteenth and fourteenth columns of Table 4 show the Sharpe ratio with trading on selling point, the fifteenth and sixteenth columns of Table 4 illustrate the Sharpe ratio without trading on selling point. In addition, the average of all tests is listed in the last row of Table 4. This study presents the evaluation of different features and W L o s s values. Because of the limitation of the page length, Table 5 shows the summary of these evaluations. In this study, the results generated using different W L o s s values were compared, and then the best W L o s s values were chosen for the feature selection. The following conclusions can be obtained from the data in Table 5:
(1)
Values of parameter W L o s s affect the earning rate.
(2)
Price features can provide the best performance compared to all features.
(3)
The best earning rate happens when the stock classification uses W L o s s (1:2), price features. A 2.146% (6.037–3.891%) earning rate per 12 weeks above basis is achieved in constant threshold-based stock classification.
(4)
The Sharpe ratio of the detected stock is lower than all stocks, which indicates that the constant threshold-based stock classification method has a relatively high risk in stock classification. The reason for this is that the stock volatility is not considered in this method.

4.3. Results of Ranking-Based Stock Classification

Similar to the constant threshold-based stock classification, this study also presents multiple evaluations for the ranking-based stock classification. In the evaluation, the effect of different values of W L o s s and input features was tested. In the ranking-based stock classification, the top 10% stocks were considered as positive samples. Table 6 shows results generated using the different configurations. There was no fixed threshold for stock trading; therefore, the simulated stock trading system kept the detected or all stocks until the end of the following 12 weeks and then sold them. Thus, there was no Sharpe ratio with trading. The following conclusions can be obtained from the data in Table 6.
(1)
Values of parameter W L o s s affect the earning rate.
(2)
Price and trading volume-related features can provide the best performance compared to all features.
(3)
The best earning rate happens when the stock classification uses W L o s s (1:2), price and trading volume-related features. A 6.984% (10.875–3.891%) earning per 12 weeks above basis is achieved in the ranking-based stock classification.
(4)
The Sharpe ratio of the detected stock is lower than all stocks, which indicates the ranking-based stock classification method has a relatively high risk for the stock classification. The reason is that the stock volatility is not considered in this method.
(5)
From the aspect of the earning rate, the ranking-based stock classification method is more effective than the constant threshold-based stock classification method.

4.4. Results of Constant Threshold-Based Stock Classification Considering Historical Volatility

Similar to the constant threshold-based stock classification, this study also presents multiple evaluations for the constant threshold-based stock classification considering historical volatility. In the evaluation, the effect of different values of the parameter W L o s s and input features was tested. Table 7 shows results using different configurations. In the ranking-based stock classification, the threshold for target rate β C was set as eight to classify positive samples. In the simulated trading system, the target rate eight was set as the selling point. If the stock achieves the target rate eight, it will be sold immediately. Otherwise, the system will keep the stock and sell it by the end of 12 weeks. The following conclusion can be obtained from the data in Table 7.
(1)
Values of parameter W L o s s affect the earning rate.
(2)
Price and trading volume-related features can provide the best performance compared to all features.
(3)
The best earning rate happens when the stock classification uses W L o s s (1:1), price and trading volume-related features. A 2.504% (6.395–3.891%) earning per 12 weeks above basis is achieved.
(4)
The Sharpe ratio of the detected stock is higher than all stocks, which indicates this method can also reduce risk in stock selection. The reason is that stock volatility is considered in this method.
(5)
From the aspects of Sharpe ratio, this method has better performance than the stock classification method without considering historical volatility.

4.5. Results of Ranking-Based Stock Classification Considering Historical Volatility

Similar to the previous methods, this study also presents multiple evaluations for the ranking-based stock classification considering historical volatility. In the evaluation, the effect of different values of parameter W L o s s and input features was tested. Table 8 shows the results using different configurations. In this method, the top 10% of stocks were considered as positive samples. Table 8 shows a summary of the evaluations. There was no fixed threshold for stock trading; therefore, the simulated stock trading system kept the detected or all stocks until the end of next 12 weeks, then sold them. Thus, there was no Sharpe ratio with trading. The following conclusion can be obtained from the data in Table 8.
(1)
Values of parameter W L o s s affect the earning rate.
(2)
Price and trading volume-related features can provide the best performance compared to all features.
(3)
The best earning rate happens when the stock classification uses W L o s s (1:1), price and trading volume-related features. The method of the ranking-based stock classification considering historical volatility has a 9.044% earning rate per 12 weeks in Japanese stock data from 2011 to 2018. A 5.153% (9.044–3.891%) earning per 12 weeks above basis is achieved in ranking-based stock classification considering historical volatility.
(4)
The Sharpe ratio of the detected stock is higher than all stocks, which indicates this method can reduce the risk in stock classification. The value of Sharpe ratio of this method is very similar to its value in the method of the constant threshold-based stock classification considering historical volatility.
(5)
By considering both earning rate and Sharpe ratio, the ranking-based stock classification method considering historical volatility is the most effective strategy among the proposed four strategies.
In addition, in this study, the proposed deep neural network-based stock performance prediction method was compared with two conventional methods: Logistic Regression-based classification and Support Vector Machine (SVM)-based classification. This comparison was performed for the ranking-based stock classification considering historical volatility. The comparison in Table 9 shows the proposed method has a higher earning rate and a lower risk than the conventional methods.

5. Conclusions

This study presents four strategies for stock classification and performs feature selection to achieve a higher earning rate and lower risk in stock classification. The following points are concluded based on the evaluations and analysis:
(1)
Using the ranking method can improve the earning rate above basis.
(2)
Using historical volatility information for training can increase the Sharpe ratio and reduce the risk in stock classification.
(3)
Using price and trading volume-related features has a better performance than using full features in stock classification.
(4)
By considering both earning rate and risk, the ranking-based stock classification method considering historical volatility is the most effective strategy among the proposed four methods. About 5.2% earning rate per 12 weeks over than the basis of all stocks is achieved in the repeatability test. The selected stocks have lower risky than basis.
(5)
The proposed deep neural network-based stock performance prediction method has better performance than the conventional methods.
The proposed method can have about 36% (9.044% per 12 weeks) earning rate per year in the Japanese stock market. However, excellent human stock traders have achieved triple-digit returns per year [6]. There is still a gap between the performance of the developed intelligent trading system and the achievements of human stock traders. This paper proposed the use of the classification network to classify the stocks into two categories: buying or not. In the future, a regression network will be developed to predict the exact value of the future price. In this way, the developed trading system is expected to obtain higher earnings.

Author Contributions

Conceptualization, S.K. and S.N.; methodology, S.K., S.N., T.S., Y.K. and Y.G.; data acquisition, T.S. and Y.G.; software, Y.G.; experiment, Y.G.; writing, Y.G.; project administration, S.K. and S.N.; All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Minervini, M. Trade like a Stock Market Wizard: How to Achieve Super Performance in Stocks in Any Market. McGraw-Hill: New York, NY, USA, 2013. [Google Scholar]
  2. Schwager, J.D. Market Wizards: Interviews with Top Traders; Wiley: Hoboken, NJ, USA, 2012. [Google Scholar]
  3. Schwager, J.D. Stock Market Wizards: Interviews with America’s Top Stock Traders; Harper-Business: New York, NY, USA, 2003. [Google Scholar]
  4. William, J.O. How to Make Money in Stocks: A Winning System in Good Times and Bad, 4th ed.; McGraw-Hill: New York, NY, USA, 2009. [Google Scholar]
  5. Book Review of the Successful Investor by William J. O’Neil. Available online: https://whatheheckaboom.wordpress.com/2012/04/23/book-review-of-the-successful-investor-by-william-j-oneil/ (accessed on 1 September 2020).
  6. Book description of Trade like a Stock Market Wizard: How to Achieve Super Performance in Stocks in Any Market. Available online: https://www.mhebooklibrary.com/doi/book/10.1036/9780071807234 (accessed on 1 September 2020).
  7. Martinez, L.C.; Da Hora, D.N.; Palotti, J.R.D.M.; Meira, W.; Pappa, G.L. From an Artificial Neural Network to a Stock Market Day-trading System: A Case Study on the BM&F BOVESPA. In Proceedings of the 2009 International Joint Conference on Neural Networks, Atlanta, GA, USA, 14–19 June 2009. [Google Scholar]
  8. Dhar, S.; Mukherjee, T.; Ghoshal, A.K. Performance Evaluation of Neural Network Approach in Financial Prediction: Evidence from Indian Market. In Proceedings of the 2010 International Conference on Communication and Computational Intelligence, Erode, India, 27–29 December 2010. [Google Scholar]
  9. Oliveira, A.L.; Meira, S.R. Detecting Novelties in Time Series Through Neural Networks Forecasting with Robust Confidence Intervals. Neurocomputing 2006, 70, 79–92. [Google Scholar] [CrossRef]
  10. Chen, A.S.; Leung, M.T.; Daouk, H. Application of Neural Networks to an Emerging Financial Market: Forecasting and Trading the Taiwan Stock Index. Comput. Oper. Res. 2003, 30, 901–923. [Google Scholar] [CrossRef]
  11. Guresen, E.; Kayakutlu, G.; Daim, T.U. Using Artificial Neural Network Models in Stock Market Index Prediction. Expert Syst. Appl. 2011, 38, 10389–10397. [Google Scholar] [CrossRef]
  12. Sezer, O.B.; Ozbayoglu, A.M.; Dogdu, E. An Artificial Neural Network-based Stock Trading System using Technical Analysis and Big Data Framework. In Proceedings of the SouthEast Conference, Kennesaw, GA, USA, 13–15 April 2017. [Google Scholar]
  13. Prasaddas, S.; Padhy, S. Support Vector Machines for Prediction of Futures Prices in Indian Stock Market. Int. J. Comput. Appl. 2012, 41, 22–26. [Google Scholar] [CrossRef]
  14. Bao, Y.; Yang, Y.; Xiong, T.; Zhang, J. A Comparative Study of Multi-step-ahead Prediction for Crude Oil Price with Support Vector Regression. In Proceedings of the IEEE Fourth International Joint Conference on Computational Sciences and Optimization, Yunnan, China, 15–19 April 2011. [Google Scholar]
  15. Kara, Y.; Acar Boyacioglu, M.; Baykan, O.K. Predicting Direction of Stock Price Index Movement Using Artificial Neural Networks and Support Vector Machines: The Sample of the Istanbul Stock Exchange. Expert Syst. Appl. 2011, 38, 5311–5319. [Google Scholar] [CrossRef]
  16. Aguilar-Rivera, R.; Valenzuela-Rendón, M.; Rodriguez-Ortiz, J. Genetic Algorithms and Darwinian Approaches in Financial Applications: A Survey. Expert Syst. Appl. 2015, 42, 7684–7697. [Google Scholar] [CrossRef]
  17. Nayak, R.K.; Mishra, D.; Rath, A.K. A Naive SVM-KNN based Stock Market Trend Reversal Analysis for Indian Benchmark Indices. Appl. Soft Comput. 2015, 35, 670–680. [Google Scholar] [CrossRef]
  18. Cai, X.; Xu, T.; Yi, J.; Huang, J.; Rajasekaran, S. DTWNet: A Dynamic Time Warping Network. Adv. Neural Inf. Process. Syst. 2019, 32, 11640–11650. [Google Scholar]
  19. Ramos-Requena, J.P.; Trinidad-Segovia, J.E.; Sánchez-Granero, M.Á. An Alternative Approach to Measure Co-Movement between Two Time Series. Mathematics 2020, 8, 261. [Google Scholar] [CrossRef] [Green Version]
  20. Krollner, B.; Vanstone, B.; Finnie, G. Financial Time Series Forecasting with Machine Learning Techniques: A Survey. In Proceedings of the 18th European Symposium on Artificial Neural Networks, Bruges, Belgium, 28–30 April 2010. [Google Scholar]
  21. Cavalcante, R.C.; Brasileiro, R.C.; Souza, V.L.; Nobrega, J.P.; Oliveira, A.L. Computational Intelligence and Financial Markets: A Survey and Future Directions. Expert Syst. Appl. 2016, 55, 194–211. [Google Scholar] [CrossRef]
  22. Nakagawa, K.; Uchida, T.; Aoshima, T. Deep factor model Explaining Deep Learning Decisions for Forecasting Stock Returns with Layer-Wise Relevance Propagation. In Proceedings of the ECML PKDD 2018 Workshops, Dublin, Ireland, 10–14 September 2018. [Google Scholar]
  23. Abe, M.; Nakayama, H. Deep Learning for Forecasting Stock Returns in the Cross-section. In Proceedings of the 2018 Pacific-Asia Conference on Knowledge Discovery and Data Mining, Melbourne, Australia, 3–6 June 2018. [Google Scholar]
  24. Rout, A.K.; Dash, P.K.; Dash, R.; Bisoi, R. Forecasting Financial Time Series using a Low Complexity Recurrent Neural Network and Evolutionary Learning Approach. J. King Saud Univ. -Comput. Inf. Sci. 2017, 29, 536–552. [Google Scholar] [CrossRef] [Green Version]
  25. Dos Santos Pinheiro, L.; Dras, M. Stock Market Prediction with Deep Learning: A Character-based Neural Language Model for Event-based Trading. In Proceedings of the Australasian Language Technology Association Workshop 2017, Brisbane, Australia, 6–8 December 2017. [Google Scholar]
  26. Li, J.; Bu, H.; Wu, J. Sentiment-aware Stock Market Prediction: A Deep Learning Method. In Proceedings of the IEEE 2017 International Conference on Service Systems and Service Management, Dalian, China, 16–18 June 2017. [Google Scholar]
  27. Nelson, D.M.; Pereira, A.C.; De Oliveira, R.A. Stock Market’s Price Movement Prediction with LSTM Neural Networks. In Proceedings of the 2017 International Joint Conference on Neural Networks, Anchorage, AK, USA, 14–19 May 2017. [Google Scholar]
  28. Bao, W.; Yue, J.; Rao, Y. A Deep Learning Framework for Financial Time Series using Stacked Autoencoders and Long-short Term Memory. PLoS ONE 2017, 12, e0180944. [Google Scholar] [CrossRef] [Green Version]
  29. Fischer, T.; Krauss, C. Deep Learning with Long Short-term Memory Networks for Financial Market Predictions. Eur. J. Oper. Res. 2018, 270, 654–669. [Google Scholar] [CrossRef] [Green Version]
  30. Nakagawa, K.; Ito, T.; Abe, M.; Izumi, K. Deep Recurrent Factor Model: Interpretable Non-Linear and Time-Varying Multi-Factor Model. In Proceedings of the AAAI 2019 Workshop on Network Interpretability for Deep Learning, Honolulu, HI, USA, 27–28 January 2019; 2019. [Google Scholar]
  31. Sezer, O.B.; Ozbayoglu, A.M. Algorithmic Financial Trading with Deep Convolutional Neural Networks: Time Series to Image Conversion Approach. Appl. Soft Comput. 2018, 70, 525–538. [Google Scholar] [CrossRef]
  32. Zhou, X.; Pan, Z.; Hu, G.; Tang, S.; Zhao, C. Stock Market Prediction on High-frequency Data using Generative Adversarial Nets. Math. Probl. Eng. 2018, 2018, 525–538. [Google Scholar] [CrossRef] [Green Version]
Figure 1. Visualization of a Long Short-Term Memory (LSTM) unit.
Figure 1. Visualization of a Long Short-Term Memory (LSTM) unit.
Applsci 10 08142 g001
Figure 2. “Many to one” architecture for the classification of stocks.
Figure 2. “Many to one” architecture for the classification of stocks.
Applsci 10 08142 g002
Figure 3. Architecture of double-layer LSTM model for the stock performance prediction.
Figure 3. Architecture of double-layer LSTM model for the stock performance prediction.
Applsci 10 08142 g003
Figure 4. The 52 samples extracted from one stock data.
Figure 4. The 52 samples extracted from one stock data.
Applsci 10 08142 g004
Table 1. Important index variables for stock performance prediction.
Table 1. Important index variables for stock performance prediction.
Important Index Variables (Features)ResolutionGroup
Price/Earnings RatioWeeklyPrice-related features
Relative StrengthWeekly
Price Average of 10 WeeksWeekly
Price Average of 30 WeeksWeekly
Price Average of 40 WeeksWeekly
Year Price HighWeekly
Year Price LowWeekly
Price OpenWeekly + Daily
Price HighWeekly + Daily
Price LowWeekly + Daily
Price CloseWeekly + Daily
Trading VolumeWeekly + DailyTrading volume features
Earnings Per Share 1 Year GrowthWeeklyCompany financial status-related features
Earnings Per Share 3 Year GrowthWeekly
Earnings Per Share 5 Year GrowthWeekly
Quarterly Profit Growth Rate Relative to the Last QuarterWeekly
Quarterly Profit Growth Rate Relative to the Same Quarter in the Last YearWeekly
Quarterly Sales Growth Rate Relative to the Last QuarterWeekly
Quarterly Sales Growth Rate Relative to the Same Quarter in the Last YearWeekly
Common Shares OutstandingWeeklyOthers
Years in the Stock MarketWeekly
Table 2. Summary of the proposed four strategies for stock classification.
Table 2. Summary of the proposed four strategies for stock classification.
StrategyVariable Used to Classify Stocks
Constant Threshold-Based Stock Classification α C = HP in _ next _ 12 weeks CP CP
Ranking-Based Stock Classification α R = CP after _ 12 weeks CP CP
Constant Threshold-Based Stock Classification Considering Historical Volatility β C = α C STD C P in _ past _ 12 weeks / CP
Ranking Threshold-Based Stock Classification Considering Historical Volatility β R = α R STD C P in _ past _ 12 weeks / CP
Table 3. Training dataset, validation dataset, and test dataset for repeatability evaluation.
Table 3. Training dataset, validation dataset, and test dataset for repeatability evaluation.
Training DatasetValidation DatasetTest Dataset
2001/04/01–2010/03/31 & 2012/10/01–2018/09/30 data2010/04/01–2010/12/31 data2011/04/01–2011/09/30 data
2001/04/01–2010/09/30 & 2013/04/01–2018/09/30 data2010/10/01–2011/06/30 data2011/10/01–2012/03/31 data
2001/04/01–2011/03/31 & 2013/10/01–2018/09/30 data2011/04/01–2011/12/31 data2012/04/01–2012/09/30 data
2001/04/01–2011/09/30 & 2014/04/01–2018/09/30 data2011/10/01–2012/06/30 data2012/10/01–2013/03/31 data
2001/04/01–2012/03/31 & 2014/10/01–2018/09/30 data2012/04/01–2012/12/31 data2013/04/01–2013/09/30 data
2001/04/01–2012/09/30 & 2015/04/01–2018/09/30 data2012/10/01–2013/06/30 data2013/10/01–2014/03/31 data
2001/04/01–2013/03/31 & 2015/10/01–2018/09/30 data2013/04/01–2013/12/31 data2014/04/01–2014/09/30 data
2001/04/01–2013/09/30 & 2016/04/01–2018/09/30 data2013/10/01–2014/06/30 data2014/10/01–2015/03/31 data
2001/04/01–2014/03/31 & 2016/10/01–2018/09/30 data2014/04/01–2014/12/31 data2015/04/01–2015/09/30 data
2001/04/01–2014/09/30 & 2017/04/01–2018/09/30 data2014/10/01–2015/06/30 data2015/10/01–2016/03/31 data
2001/04/01–2015/03/31 & 2017/10/01–2018/09/30 data2015/04/01–2015/12/31 data2016/04/01–2016/09/30 data
2001/04/01–2015/09/30 & 2018/04/01–2018/09/30 data2015/10/01–2016/06/30 data2016/10/01–2017/03/31 data
2001/04/01–2016/03/31 data2016/04/01–2016/12/31 data2017/04/01–2017/09/30 data
2001/04/01–2016/09/30 data2016/10/01–2017/06/30 data2017/10/01–2018/03/31 data
2001/04/01–2017/03/31 data2017/04/01–2017/12/31 data2018/04/01–2018/09/30 data
Table 4. Constant threshold-based stock classification with threshold 70%, W L o s s (1:1), all features.
Table 4. Constant threshold-based stock classification with threshold 70%, W L o s s (1:1), all features.
Test DatasetsTrue Negative Rate True Positive Rate (Recall)Average Correction RatePrecisionAverage of Maximum Rising Rate of Stocks Detected as Positive Samples and All (%)Average of Maximum Decreasing Rate of Stocks Detected as Positive Samples and All (%)Earning Rate of a Simulated System for Stocks Detected as Positive Samples and All (%)Basis of All Stocks (%)Sharpe RatioT of
a Simulated System for Stocks Detected as Positive Samples and All
Sharpe RatioNT of
a Simulated System for Stocks Detected as Positive Samples and All
DetectedAllDetectedAllDetectedAllDetectedAllDetectedAll
2011/4–2011/90.8300.7000.7650.01110.9898.727−11.473−9.822−1.998−1.608−1.644−0.573−0.406−0.591−0.409
2011/10–2012/30.8120.6310.7210.02617.99412.937−7.874−6.9335.8573.9903.9580.6940.6500.6610.640
2012/4–2012/90.7560.7450.7510.01711.5529.363−9.112−8.6521.4391.2551.2240.0470.1610.0210.153
2012/10–2013/30.7980.5060.6520.11136.37327.539−5.689−4.75420.12917.13817.4891.9742.0221.8401.971
2013/4–2013/90.7440.7650.7550.05124.31915.806−11.492−9.0925.6803.9094.3130.4490.5010.3700.475
2013/10–2014/30.7420.6830.7130.02516.14211.876−11.484−8.8401.2411.7421.703−0.1240.167−0.1640.154
2014/4–2014/90.8070.7010.7540.04019.91914.266−7.720−6.4027.1636.1585.9690.7770.9780.7040.958
2014/10–2015/30.9010.2920.5970.03419.30416.012−6.469−5.0867.2588.1988.1310.7741.2700.7271.254
2015/4–2015/90.8660.5490.7070.03118.08012.300−14.738−11.0790.3930.7490.682−0.339−0.099−0.383−0.109
2015/10–2016/30.8930.6830.7880.05621.65111.178−15.699−13.2461.413−2.882−2.826−0.361−0.686−0.439−0.698
2016/4–2016/90.8530.6540.7540.04420.15013.867−9.798−8.2036.1694.9954.9540.5570.7780.5040.765
2016/10–2017/30.8570.5600.7090.04120.61013.967−8.299−6.3228.9116.5726.5000.8380.9660.7850.954
2017/4–2017/90.8860.5980.7420.06626.58316.118−7.371−4.62111.9458.5078.5421.1261.3781.0471.363
2017/10–2018/30.8960.5520.7240.05724.04413.413−13.861−9.0324.1932.1022.082−0.0430.124−0.1180.110
2018/4–2018/90.8990.5920.7460.03116.58710.434−14.874−11.103−3.138−2.909−2.716−0.895−0.746−0.942−0.753
Average0.8360.6140.7250.04320.28613.854−10.397−8.2125.1103.8613.8910.3270.4710.2680.455
Table 5. Constant threshold-based stock classification with different W L o s s values and different features (all: all features; price: price-related features; trading volume: trading volume feature; financial status: company financial status-related features).
Table 5. Constant threshold-based stock classification with different W L o s s values and different features (all: all features; price: price-related features; trading volume: trading volume feature; financial status: company financial status-related features).
Tests.True Negative Rate True Positive Rate (Recall)Average Correction RatePrecisionAverage of Maximum Rising Rate of Stocks Detected as Positive Samples and All (%)Average of Maximum Decreasing Rate of Stocks Detected as Positive Samples and All (%)Earning Rate of a Simulated System for Stocks Detected as Positive Samples and All (%)Basis of All Stocks (%)Sharpe ratioT of
a Simulated System for Stocks Detected as Positive Samples and All
Sharpe RatioNT of
a Simulated System for Stocks Detected as Positive Samples and All
DetectedAllDetectedAllDetectedAllDetectedAllDetectedAll
W L o s s (1:1), all 0.8360.6140.7250.04320.28613.854−10.397−8.2125.1103.8613.8910.3270.4710.2680.455
W L o s s (1:2), all 0.8940.5100.7020.05622.57213.854−11.447−8.2125.3653.8613.8910.2590.4710.1780.455
W L o s s (1:3), all 0.9100.4540.6820.05522.96013.854−11.594−8.2125.3363.8613.8910.2610.4710.1840.455
W L o s s (1:2), price0.8780.5860.7320.05823.23613.854−11.447−8.2126.0373.8613.8910.2990.4710.2220.455
W L o s s (1:2), price and trading volume0.8810.5780.7300.05722.87613.854−11.015−8.2125.9243.8613.8910.3170.4710.2390.455
W L o s s (1:2), price and trading volume and financial status 0.8630.5870.7250.05321.96213.854−10.916−8.2125.6703.8613.8910.3030.4710.2320.455
Table 6. Ranking-based stock classification with different W L o s s values and different features (all: all features; price: price-related features; trading volume: trading volume feature; financial status: company financial status-related features).
Table 6. Ranking-based stock classification with different W L o s s values and different features (all: all features; price: price-related features; trading volume: trading volume feature; financial status: company financial status-related features).
Tests.True Negative Rate True Positive Rate (Recall)Average Correction RatePrecisionAverage of Maximum Rising Rate of Stocks Detected as Positive Samples and All (%)Average of Maximum Decreasing Rate of Stocks Detected as Positive Samples and All (%)Earning rate of a Simulated System for Stocks Detected as Positive Samples and All (%)Basis of All Stocks (%)Sharpe RatioNT of
a Simulated System for Stocks Detected as Positive Samples and All
DetectedAllDetectedAllDetectedAllDetectedAll
W L o s s (1:1), all 0.8710.1860.5280.15419.84813.854−10.908−8.2124.8863.8913.8910.2410.455
W L o s s (1:2), all 0.9820.0390.5100.20626.66713.854−12.800−8.2127.6563.8913.8910.1520.455
W L o s s (1:3), all 0.9850.0280.5060.16124.34713.854−12.836−8.2125.6153.8913.8910.0210.455
W L o s s (1:2), price0.9920.0280.5100.14622.37213.854−9.422−8.2124.8523.8913.8910.0980.455
W L o s s (1:2), price and trading volume0.9930.0340.5130.22631.07713.854−11.089−8.21210.8753.8913.8910.3140.455
W L o s s (1:2), price and trading volume and financial status 0.9640.0980.5310.21025.85513.854−10.930−8.2128.8533.8913.8910.4600.455
Table 7. Constant threshold-based stock classification considering historical volatility using different W L o s s values and different features (all: all features; price: price-related features; trading volume: trading volume feature; financial status: company financial status-related features).
Table 7. Constant threshold-based stock classification considering historical volatility using different W L o s s values and different features (all: all features; price: price-related features; trading volume: trading volume feature; financial status: company financial status-related features).
Tests.True Negative Rate True Positive Rate (Recall)Average Correction RatePrecisionAverage of Maximum Rising Rate of Stocks Detected as Positive Samples and All (%)Average of Maximum Decreasing Rate of Stocks Detected as Positive Samples and All (%)Earning rate of a Simulated System for Stocks Detected as Positive Samples and All (%)Basis of All Stocks (%)Sharpe ratioT of
a Simulated System for Stocks Detected as Positive Samples and All
Sharpe ratioNT of
a Simulated System for Stocks Detected as Positive Samples and All
DetectedAllDetectedAllDetectedAllDetectedAllDetectedAll
W L o s s (1:1), all 0.8750.2210.5480.15416.14513.854−7.369−8.2125.2233.8613.8910.5990.4710.5630.455
W L o s s (1:2), all 0.9870.0270.5070.16516.34213.854−7.838−8.2125.1113.8613.8910.5460.4710.5040.455
W L o s s (1:0.5), all 0.0010.9980.0050.10113.84113.854−8.208−8.2123.8123.8613.8910.4890.4710.4560.455
W L o s s (1:1), price0.9270.1080.5180.13217.84013.854−10.681−8.2122.8783.8613.8910.4030.4710.3200.455
W L o s s (1:1), price and trading volume0.8810.2260.5530.18017.81013.854−7.276−8.2126.3953.8613.8910.6410.4710.5940.455
W L o s s (1:1), price and trading volume and financial status 0.8540.2640.5590.16116.45513.854−7.387−8.2125.3623.8613.8910.6210.4710.5480.455
Table 8. Ranking-based stock classification considering historical volatility using different W L o s s values and different features (all: all features; price: price-related features; trading volume: trading volume feature; financial status: company financial status-related features).
Table 8. Ranking-based stock classification considering historical volatility using different W L o s s values and different features (all: all features; price: price-related features; trading volume: trading volume feature; financial status: company financial status-related features).
TestsTrue Negative Rate True Positive Rate (Recall)Average Correction RatePrecisionAverage of Maximum Rising Rate of Stocks Detected as Positive Samples and All (%)Average of Maximum Decreasing Rate of Stocks Detected as Positive Samples and All (%)Earning Rate of a Simulated System for Stocks Detected as Positive Samples and All (%)Basis of All Stocks (%)Sharpe ratioNT of
a Simulated System for Stocks Detected as Positive Samples and All
DetectedAllDetectedAllDetectedAllDetectedAll
W L o s s (1:1), all0.9180.1030.5110.11917.21313.854−8.212−8.2125.6393.8913.8910.5220.455
W L o s s (1:2), all0.9980.0030.5000.09613.06013.854−8.746−8.2122.5163.8913.8910.1410.455
W L o s s (1:0.5), all0.0040.9970.5000.10013.82913.854−8.191−8.2123.9033.8913.8910.4580.455
W L o s s (1:1), price0.9160.1080.5120.09617.69613.854−5.97−8.2128.4483.8913.8910.7060.455
W L o s s (1:1), price and trading volume0.9750.0410.5080.15423.36513.854−8.226−8.2129.0443.8913.8910.6650.455
W L o s s (1:1), price and trading volume and financial status0.9360.1020.5190.13418.84613.854−8.176−8.2126.4803.8913.8910.5490.455
Table 9. Comparison for ranking-based stock classification considering historical volatility.
Table 9. Comparison for ranking-based stock classification considering historical volatility.
Tests.True Negative Rate True Positive Rate (Recall)Average Correction RatePrecisionAverage of Maximum Rising Rate of Stocks Detected as Positive Samples and All (%)Average of Maximum Decreasing Rate of Stocks Detected as Positive Samples and All (%)Earning Rate of a Simulated System for Stocks Detected as Positive Samples and All (%)Basis of all stocks (%)Sharpe ratioNT
of a Simulated System for Stocks Detected as Positive Samples and All
DetectedAllDetectedAllDetectedAllDetectedAll
Proposed method0.9750.0410.5080.15423.36513.854−8.226−8.2129.0443.8913.8910.6650.455
Logistic Regression0.0460.9370.4910.09813.78313.854−8.166−8.2123.8573.8913.8910.4570.455
SVM0.1170.8330.4750.09414.08813.854−8.365−8.2123.9283.8913.8910.4490.455
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Gu, Y.; Shibukawa, T.; Kondo, Y.; Nagao, S.; Kamijo, S. Prediction of Stock Performance Using Deep Neural Networks. Appl. Sci. 2020, 10, 8142. https://doi.org/10.3390/app10228142

AMA Style

Gu Y, Shibukawa T, Kondo Y, Nagao S, Kamijo S. Prediction of Stock Performance Using Deep Neural Networks. Applied Sciences. 2020; 10(22):8142. https://doi.org/10.3390/app10228142

Chicago/Turabian Style

Gu, Yanlei, Takuya Shibukawa, Yohei Kondo, Shintaro Nagao, and Shunsuke Kamijo. 2020. "Prediction of Stock Performance Using Deep Neural Networks" Applied Sciences 10, no. 22: 8142. https://doi.org/10.3390/app10228142

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop