• 沒有找到結果。

第五章 結論與建議

第二節 未來展望

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

表 24 展示所有策略的績效表現,分別以最大策略虧損報酬以及樣本外獲利 作為主要衡量策略品質的因子。在作圖方式的部分,GASF 似乎效果較好,表示 時間序列的前後關係有重要資訊。雖然在較短的時間刻度上(10 分 k、15 分 k)策 略績效並不理想,但原因不是 CNN 模型在短時間的分類能力較長時間不佳,而 是在考慮交易手續費後拖累整個策略績效。

第二節 未來展望

本研究嘗試將深度學習引進金融交易領域,對於未來的研究,建議可以往以 下幾個方向發展:

1. 本篇所用的時間序列資訊僅只有台指期貨指數之價格,在辨識下跌的召 回率(recall)普遍偏低,若能取得交易過程中上下五檔掛單的資料,應能 降低 CNN 模型在辨識漲跌的難度,因為上下五檔的掛單資料傳遞的資 訊直接是此商品的供給與需求。

2. 大部分深度學習技術之目標函數設計是以精確度(Accuracy)做參數優化,

然而金融交易性質與一般圖片的分類問題有蠻大的差異。在交易中勝率 可以不高但賺賠比達一定水準也同樣是有獲利能力的。若能以本篇的最 大策略虧損報酬或是夏普值作為優化目標也許會有更好的結果。

3. 本研究所使用的 CNN 架構為 CNN 家族裡最基礎的 LeNet 架構,隨著技 術不斷進步,更複雜的卷積神經網路架構還有 AlexNet、VGG、GoogleNet 以及 ResNet,也許使用較先進的架構來訓練會得到更好的效果。

4. 除了價格資訊外,金融市場還有許多因素會影響價格走勢,若模型能容 納更多方面的資訊,如公司財報資料、總經數據、市場新聞等等,進而 建構一個多樣化投資組合,應能獲得更穩定的超額報酬。

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

附錄

4

以下以兩層類神經網路,四個神經元舉例。如圖五所示,說明反向傳播演算法,激勵函數以 sigmoid 函數為例。

圖 56 兩層類神經網路、四個神經元 (1) 前向傳播

x, y 和 b(bias)=1 傳入第一層神經元𝑛11和𝑛12

𝑛11(𝑖𝑛) = 𝑤11,𝑥𝑥 + 𝑤11,𝑦𝑦 + 𝑤11,𝑏 (23)

𝑛11(𝑖𝑛) = 𝑤12,𝑥𝑥 + 𝑤12,𝑦𝑦 + 𝑤12,𝑏 (24)

𝑛11(𝑜𝑢𝑡) = 1

1 + 𝑒−𝑛11(𝑖𝑛) (25) 𝑛12(𝑜𝑢𝑡) = 1

1 + 𝑒−𝑛12(𝑖𝑛) (26)

其中,𝑛11(𝑖𝑛)代表傳入神經元𝑛11的值,而𝑛11(𝑜𝑢𝑡)表示傳出神經元𝑛11的值,𝑤11,𝑥表示值從𝑥傳入神經元 𝑛11時所乘上的權重,𝑤11,𝑦同理。

4 http://cpmarkchang.logdown.com/posts/277349-neural-network-backward-propagation

接著使用鏈法則(chain rule)

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

𝜕𝐽

𝜕𝑤11,𝑦 = 𝛿11(𝑖𝑛)𝑦 (56)

𝜕𝐽

𝜕𝑤11,𝑏 = 𝛿21(𝑖𝑛) (57)

𝛿21(𝑖𝑛)可用後層傳回來的𝛿11(𝑖𝑛)和𝛿22(𝑖𝑛)表示,如下:

𝛿11(𝑜𝑢𝑡) = 𝑤21,11𝛿21(𝑖𝑛)+ 𝑤22,11𝛿22(𝑖𝑛) (58)

𝛿11(𝑖𝑛) = 𝛿11(𝑜𝑢𝑡)𝑛11(𝑜𝑢𝑡)(1 − 𝑛11(𝑜𝑢𝑡)) = 𝛿11(𝑜𝑢𝑡)𝜕𝑛11(𝑜𝑢𝑡)

𝜕𝑛11(𝑖𝑛)

(59) 這些δ的物理意義一樣可由下圖表示:

圖 58 反向傳播

從圖 58 中可以看到𝛿11(𝑜𝑢𝑡)是由𝛿21(𝑖𝑛)和𝛿22(𝑖𝑛)往反方向傳遞,再乘上其權重𝑤21,11和𝑤22,11所得出的。接著

可將𝛿11(𝑜𝑢𝑡)替換到梯度下降法公式中(44)、(45)、(46),結果如下:

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

𝑤11,𝑥 ← 𝑤11,𝑥− 𝛼𝛿11(𝑖𝑛)𝑥 (60)

𝑤11,𝑦← 𝑤11,𝑦− 𝛼𝛿11(𝑖𝑛)𝑦 (61)

𝑤11,𝑏 ← 𝑤11,𝑏− 𝛼𝛿11(𝑖𝑛) (62) 同理,𝑤12,𝑥、𝑤12,𝑦和𝑤12,𝑏的梯度下降公式也可以用相同的方法推導出來:

𝑤12,𝑥 ← 𝑤12,𝑥− 𝛼𝛿12(𝑖𝑛)𝑥 (63)

𝑤12,𝑦← 𝑤12,𝑦− 𝛼𝛿12(𝑖𝑛)𝑦 (64)

𝑤12,𝑏 ← 𝑤12,𝑏− 𝛼𝛿12(𝑖𝑛) (65)

[1] Asness, C. S., T. J. Moskowitz and L. H. Pedersen, (2013). Value and Momentum Everywhere. Journal of Finance, Volume 68, Issue 3, Pages 929-985.

[2] Banz, R. W., (1981). The relationship between return and market value of common stocks. Journal of Financial Economics, Volume 9, Issue 1, Pages 3-18.

[3] Basu, S., (1997). The conservatism principle and the asymmetric timeliness of earnings. Journal of Accounting and Economics, Volume 24, Issue 1, Pages 3-37.

[4] Bengio, Y., V.P. Lauzon, and R. Ducharme, (2001). Experiments on the application of IOHMMs to model financial returns series. Neural Networks, IEEE Transactions on, 12(1), 113-123.

[5] Campbell, J. Y., and R.J. Shiller, (1987). Stock Prices, Earnings, and Expected Dividends. The Journal of Finance Vol. 43, No. 3, Papers and Proceedings of the Forty-Seventh Annual Meeting of the American Finance Association, Chicago, Illinois, December 28-30, pp. 661-676.

[6] Chapados, N., and Y. Bengio, (2001). Cost functions and model combination for VaR-based asset allocation using neural networks. Neural Networks, IEEE Transactions on, 12(4), 890-906.

[7] Chen, S. M., and P.Y, Kao, (2013). TAIEX forecasting based on fuzzy time series, particle swarm optimization techniques and support vector machine.

information Sciences, 247, 62-71.

[8] Duchi, J.,E. Hazan, and Y. Singer, (2011) Adaptive Subgradient Methods for Stochastic Optimization. The Journal of Machine Learning Research, Volume 12, Pages 2121-2159.

[9] Fama, E. F., (1970). Efficient Capital Markets: A Review of Theory and Empirical Work. The Journal of Finance, Vol. 25, No. 2, Papers and Proceedings of the Twenty-Eighth Annual Meeting of the American Finance Association New York, N.Y., pp. 383-417.

[10] Fama, E.F., and K.R. French, (1988). Dividend Yield and Expected Stock Return. Journal of Financial Economics, Volume 22, Issue 1, Pages 3-25.

[11] Fama, E. F., and K.R. French, (1992). The Cross-Section of Expected Stock Returns. The Journal of Finance, Vol. 47, No. 2, pp. 427-465.

[12] Gençay, R., and R. Gibson, (2007). Model risk for European-style stock index options. Neural Networks, IEEE Transactions on, 18(1), 193-202.

[13] Jegadeesh, N., and S. Titman, (1993). Returns to buying winners and selling losers: Implications for stock market efficiency. The Journal of Finance, Vol.

48, Issue 1, pp. 65-91.

[14] Keim, D. B., and R. F. Stambaugh, (1986). Predicting Return in The Stock and Bond Markets. Journal of Financial Economics, Volume 17, Issue 2, Pages 357-390.

[15] Kendall, M. G., and A. B. Hill, (1953). The Analytics of Economic Time Series Part 1: Prices. Journal of the Royal Statistical Society, Series A (General), Volumn 116, Issue 1, 11-34.

[16] Kercheval, A. N., and Y. Zhang, (2013). Modeling high-frequency limit order book dynamics with support vector machines. Quantitative Finance Volume 15,Issue 8: Special Issue on High Frequency Data Modeling in Finance, Pages 1315-1329.

[17] Kingma, D. P. and J. Ba, (2015). Adam: A Method for Stochastic Optimization.

3rd International Conference for Learning Representations, San Diego.

[18] Krizhevsky, A., I. Sutskever, and G.E. Hinton, (2012). ImageNet Classification with Deep Convolutional Neural Networks. Proceeding NIPS'12 Proceedings of the 25th International Conference on Neural Information Processing Systems - Volume 1,Pages 1097-1105.

[19] Kwon, Y. K. and B. R. Moon, (2007). A hybrid neurogenetic approach for stock forecasting. Neural Networks, IEEE Transactions on, 18(3), 851-864.

[20] LeCun, Y. and Y. Bengio, (1995). Convolutional networks for images, speech, and time series.The handbook of brain theory and neural networks. The handbook of brain theory and neural networks, Pages 255-258.

[21] LeCun, Y., L. Bottou, Y. Bengio, and P. Haffner, (1998). Gradient-based learning applied to document recognition. Proc. IEEE, vol. 86, no. 11, pp.

2278-2324.

[22] Lu, T. H. and Y. C. Chen, (2015). Trend definition or holding strategy: What determines the profitability of candlestick charting? Journal of Banking &

Finance, Volume 61, Pages 172-183.

[23] Moskowitz, T. J., Y. H. Ooi and L. H. Pedersn, (2012). Time series momentum.

Journal of Financial Economics, Volume 104, Issue 2, Pages 228-250.

[24] Platanios, E. and S. P. Chatzis, (2014). Gaussian Process-Mixture Conditional Heteroscedasticity. Pattern Analysis and Machine Intelligence, IEEE

Transactions on, 36(5), 888-900.

[25] Rojas, R., (1996). The Backpropagation Algorithm. Neural Networks, A Systematic Introduction. Pages 151-184.

[26] Sitte, R. and J. Sitte, (2000). Analysis of the predictive ability of time delay neural networks applied to the S&P 500 time series. Systems, Man, and Cybernetics, Part C: Applications and Reviews, IEEE Transactions on, 30(4), 568-572.

[27] Takeuchi, L. and Y.-Y. Lee, (2013). Applying Deep Learning to Enhance Momentum Trading Strategies in Stocks.

[28] Tino, P., C. Schittenkopf, and G. Dorffner, (2001). Financial volatility trading using recurrent neural networks. Neural Networks, IEEE Transactions on,12(4), 865-874.

[29] Wang, Z., T. Oates, (2015). Imaging time-series to improve classification and imputation.

[30] Xu, Z., S. MacEachern and X. Xu, (2007). Modeling Non-Gaussian Time Series with Nonparametric Bayesian Model. Pattern Analysis and Machine

Intelligence, IEEE Transactions on, 37(2), 372-382.

[31] Zheng, Y., Q. Liu, E. Chen, Y. Ge, J. L. Zhao, (2014). Time series classification using multi-channels deep convolutional neural Networks. Proceedings of the International Conference on Web-Age Information Management (WAIM), pp.298–310.

[32] 黃君平,(2016)。基於深度學習技術之金融市場價格趨勢預測。

相關文件