# Prediction of Stock Performance Using Deep Neural Networks
## 4 Experiment Results
### Results of Constant Threshold-Based Stock Classification  
In the evaluation of the method of constant threshold-based stock classification, two factors should be discussed: \(\mathbf{W}_{Loss}\) parameter in Equation (18), and features in Table 1. Table 4 shows the performance of the classification using all features and \(\mathbf{W}_{Loss}\) (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):  
\[\text{SR}_{\text{T}}=\frac{\left(\text{P}_{\text{selling}}-\text{CP}\right)/ \text{CP}}{\text{STD}\Big{(}\text{{CP}}_{\text{until\_selling}}/\text{CP} \Big{)}} \tag{24}\]  
\[\text{SR}_{\text{NT}}=\frac{\left(\text{CP}_{\text{after\_12 weeks}}-\text{CP} \right)/\text{CP}}{\text{STD}(\text{{CP}}_{\text{in\_next\_12 weeks}}/\text{CP })} \tag{25}\]  
where CP is the closing price in the current week, P\({}_{\text{selling}}\) is the price when selling the stock, and CP\({}_{\text{after\_12 weeks}}\) is the close price after 12 weeks. In Equation (24), \(\text{{CP}}_{\text{until\_selling}}\) is a vector which includes the daily closing price from the current week to selling. \(\text{{CP}}_{\text{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 \(\mathbf{W}_{Loss}\) 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 \(\mathbf{W}_{Loss}\) values were compared, and then the best \(\mathbf{W}_{Loss}\) values were chosen for the feature selection. The following conclusions can be obtained from the data in Table 5:  
1. Values of parameter \(\mathbf{W}_{Loss}\) 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 \(\mathbf{W}_{Loss}\) (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.