## 5 Conclusions and Discussions  
Stock prediction plays a significant role in constructing an investment portfolio in terms of two important aspects stock selection and allocation. This paper presented the LSTM network, a type of recurrent neural network, to predict the stock price in order to demonstrate a typical quantitative trading strategy. The proposed model works efficiently by achieving high accuracy compared with other machine learning such as LR and SVM. As a result, we can take advantage of the prediction results to construct a quantitative portfolio for each predicted time horizon. On the basis of the optimization techniques, our constructed portfolios performed effectively by obtaining high returns in both prediction and actual trading, as well as compared with the S&P 500 index. According to the performance of constructed portfolios, the active returns are in inverse proportion to Sharpe ratio values, which can be understood as a fact of risk-return trade-offs in existence in our work. A prediction model that combines a strategic prediction based on historical data with a dynamic prediction, based on valuation, momentum, and spillover, should be extensively investigated in order to minimize the risk-return trade-offs. Furthermore, dynamic portfolio optimization and diversification are also considered as the target for further research that allows designing multiple tactical, flexible trading strategies in order to maximize trading profits.  
There are several challenges for building effective quantitative trading strategies through deep learning. First, market data exhibit a high noise to signal ratio. The prediction models can perform well on the historical data set. However, the stock market always fluctuates as a result of factors such as market psychology, macroeconomics, and even political issues. Therefore, high performance on the historical dataset does not guarantee earning a desirable profit in practical trading. Second,  
Figure 14: The detailed LSTM optimal allocation for each efficient portfolio.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**P** & **Portfolio [\%]** & **Benchmark [\%]** & **Active Return [\%]** \\ \hline
1 & 30.09 & 2.95 & 24.71 \\
2 & 74.77 & 4.53 & 70.23 \\
3 & 71.51 & 7.46 & 64.06 \\
4 & 81.36 & 7.77 & 73.59 \\
5 & 91.31 & 10.49 & 80.82 \\
6 & 67.89 & 28.78 & 39.11 \\
7 & 122.94 & 14.15 & 108.79 \\
8 & 62.40 & 12.65 & 49.75 \\
9 & 142.59 & 16.73 & 126.22 \\
10 & 161.84 & 18.83 & 143.01 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Optimal portfolio returns.  
backtesting is not only a tool to evaluate the discovered strategy but also helps to avoid false positives. Finally, developing a flexible, efficient trading strategy is critically important for quantitative trading. It is one of the most challenging tasks in the quantitative trading system. Diverse data sources and formats, as well as different characteristics of data, are causing the prediction task to become more complex. In summary, the deep learning approach shows a remarkable effect on stock prediction performance, which can be an essential condition for portfolio construction and optimization process in quantitative trading.  
Conceptualization, V.-D.T. and C.-M.L.; methodology, V.-D.T. and D.A.T.; software, V.-D.T. and D.A.T.; validation, V.-D.T.; formal analysis, V.-D.T. and C.-M.L.; investigation, V.-D.T.; resources, C.-M.L.; data curation, V.-D.T.; writing--original draft preparation, V.-D.T. and D.A.T.; writing--review and editing, V.-D.T. and C.-M.L.; visualization, V.-D.T. and D.A.T.; supervision, C.-M.L.; project administration, C.-M.L.; funding acquisition, C.-M.L. All authors have read and agreed to the published version of the manuscript.  
This work is partially supported by the National Taipei University of Technology under the grant: NTUT-BIT-108-02.  
The authors declare no conflict of interest.