# Research on Quantitative Investment Strategies Based on Deep Learning
## 5 Experimental Results and Comparison
### Comparison of LSTM Model, RF Model, and LSTM-SVR Model Results  
Table 5 shows the deviation values of LSTM and RF over different time periods (20170628 (11:30)-20180314 (10:30) and 20150414 (10:30)-20160112 (13:45)). It can be seen from Table 5 that LSTM model shows a better performance in both of the two situations. Therefore, this is the reason for why the LSTM model is used in combination with SVR.  
Figure 28: Error map of LSTM-SVR II prediction results and actual results (first 2850 data).  
Figure 27: Comparison of LSTM-SVR II prediction results with actual results (first 2850 data).  
Table 6 shows the deviation value of LSTM-SVR I and LSTM-SVR II in different time periods (20170628 (11:30)-20180314(10:30) and 20150414 (10:30)-20160112 (13:45)).From Table 6, compared to the results of the LSTM-SVR I model and the LSTM-SVR II model, the LSTM-SVR I model (only using the output of LSTM and combining with seven attributes as the input of SVR) has a better performance, both in the stable situation (20170628 (11:30)-20180314 (10:30)) and the relative unstable situation (20150414 (10:30)-20160112(13:45)). Therefore, the results of the LSTM-SVR I model are added into the trading strategy.  
As can be seen from Table 6, when the LSTM-SVR (LSTM-SVR I and LSTM-SVR II) models predict the 8500 th data to the 11300 th data (11:30 on 28 June 2017 to 10:30 on 14 March 2018), their accuracies are much higher than the LSTM model and the RF model, which indicates that the combined models greatly improve the accuracy of the prediction. Nevertheless, when the LSTM-SVR models predict the first 2850 data (10:30 on 14 April 2015 to 13:45 on 12 January 2016), the orders of magnitude of deviation rise from \(10^{-4}\) to \(10^{-3}\), and the deviations at this time are improved compared with the LSTM model, although their extent is not as good as in the relatively stable market period (10:30 on 28 June 2017 to 10:30 on 14 March 2018). This result happens after eight experiments. Therefore, it can be inferred that the LSTM-SVR models can improve accuracy to a large extent, compared with the LSTM model and the RF model, under a relatively stable environment. Although the LSTM-SVR models can obtain highly accurate prediction data under these circumstances, when the market fluctuates, the error rate increases relatively rapidly. As a result, it can be concluded that the prediction stability of the LSTM-SVR models still needs to be improved.  
The experiment in this paper used a laptop with an i5 processor, 2.8 GHz CPU clock speed, 8 GB memory, and dual-core four-thread. However, after running the model multiple times and comparing the running times of the two models, the average time required to run the SVR model for prediction was 110.45 s, while the LSTM model running 2000 iterations had an average running time of about 39 min and 31 s. The difference in terms of the running times between two types of models is very large. The time required for the LSTM model is much longer than that of the SVR model and the RF model. Hence, the long running time of the deep learning models LSTM and LSTM-SVR is also an aspect that needs to be improved.  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **LSTM-SVR I (Deviation,** & **LSTM-SVR II (Deviation,** \\  & **Only Using Output)** & **Using Hidden State Vector)** \\ \hline
20170628(11:30) & & \\ \(-\)20180314(10:30) & & \\
20150414(10:30) & & \\ \(-\)20160112(13:45) & & \\ \hline \hline \end{tabular}
\end{table}
Table 6: Comparison table of the deviation values predicted by the LSTM-SVR I and LSTM-SVR II models (different input vectors) over two time periods.  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **LSTM (Deviation)** & **RF (Deviation)** \\ \hline
20170628 (11:30) & & \\ \(-\)20180314 (10:30) & & 0.00232 & 0.00475 \\ \hline
20150414 (10:30) & & \\ \(-\)20160112 (13:45) & & 0.00903 & 0.01189 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Comparison table of deviation values predicted by the LSTM model and the LSTM-SVR model over two time periods.