摘要: | 過去深度學習應用於股票之研究已有很多,但大多應用僅止於預測股價,該類研究衡量方式大多為統計量,如均方差(MSE;Mean square error)、Accuracy 衡量、衡量股價變動方向的正確率,以上之研究多停留提升預測之精準度,較少人將研究拓展至將預測股價應用於實際交易,並檢驗何種模型產生之投資績效較好,本研究的貢獻在於從深度學習模型得到預測股價後,利用程式交易的方法進一步將預測股價應用於實際交易,並驗證投資績效好壞。過去研究曾對TCN及LSTM、GRU(Gated recurrent units network)優劣做廣泛性的比較,發現 TCN 優於傳統 LSTM、GRU,但尚未有TCN 與加上殘差連接(residual connection)的 LSTM網路的比較。
本研究將TCN及RES LSTM(Residual LSTM)比較,應用在四個常被交易的標的上(兩個指數、微軟股票、JPMorgan Chase 股票),檢視兩者何者創造較高好的投資績效,同時與買進持有(buy and hold)的投資績效比較。
研究結果發現,發現不論是預測次營業日(x =1)或次週(x =5)後收盤價、或是以TCN網路還是RES LSTM網路預測,這兩種參數變動,都得到神經元數越少,年化報酬率越高這個結論,但是神經元數越少,風險報酬比不一定越高。
不考慮神經元數的 8 種參數組合中,以年化報酬率而言有 5 個組合為 RES LSTM網路較好,但是考量到風險的獲利指標,風險報酬比,8 種組合中有 5 個組合為TCN網路較好。TCN 參數、訓練時間均較RES LSTM 少,但是平均年化報酬率較高、平均風險報酬比較高,也能產生較多的獲利高原,且在各參數組合中以風險報酬比比較,獲勝組數較多,大抵而言,以動量交易策略應用,TCN 網路結果優於RES LSTM 網路。
;There were many studies that applied deep learning to stocks, but most of them only stopped at the prediction of stock prices. These studies focused on statistical measurements, e.g. MSE; mean square error, accuracy or the directions of price movements and stopped at the level of increasing the accuracy of the predictions. Few people extended the research from the accuracy of the predictions to the application of real-life stock trading and evaluated investment performance derived from deep learning models.
This study represents a novel deep learning stock backtesting framework, which incorporated into two parts. Firstly, using a deep learning model to retrieve the prediction of stock prices. Secondly, applying the prediction of stock prices to real-life trading. We then evaluate investment performance created by the deep learning model. A prior study compared the performance of TCN and LSTM, but there haven’t been studies to compare the performance of TCN and LSTM with residual connections.
Our study compares the performance of TCN and LSTM with residual connections and applies them to four common targets (two of them are benchmarks, and the remaining two are Microsoft stock and JPMorgan Chase stock.) and then evaluates which model produces better investment performance and compares their performance with a buy-and-hold strategy.
We empirically find that no matter which business day after today we choose (i.e., one or five) and no matter which neural network we choose (i.e., TCN or RES LSTM), the fewer the neurons, the better the rate of return will be. But the reward/ risk ratio doesn’t follow the same rule.
Regarding the rate of return, RES LSTM model outperforms TCN model with five out of eight parameter sets. On the other hand, considering risk rewards, TCN model outperforms RES LSTM model with five out of eight parameter sets. Although TCN model takes less time and parameters to train, the average rate of return TCN model produces is higher and the average risk rewards TCN model produces are higher. When using TCN model, more profitable plateaus can be generated. All in all, with the application of the momentum trading strategy, the TCN network is better than the RES LSTM network. |