| 研究生: |
蕭仁鴻 Hsiao, Jen-Hung |
|---|---|
| 論文名稱: |
結合 Metropolis-Hastings 演算法和 WGAN 模型進行股票價格的時間序列預測 Integration of Metropolis-Hastings Algorithm and WGAN Model for Time Series Prediction of Stock Price |
| 指導教授: |
王士豪
Wang, Shyh-Hau |
| 學位類別: |
碩士 Master |
| 系所名稱: |
電機資訊學院 - 資訊工程學系 Department of Computer Science and Information Engineering |
| 論文出版年: | 2023 |
| 畢業學年度: | 111 |
| 語文別: | 英文 |
| 論文頁數: | 68 |
| 中文關鍵詞: | 股市預測 、特徵潛在空間 、生成對抗網路 、Metropolis-Hastings 演算法 |
| 外文關鍵詞: | Stock prediction, Latent space, Wasserstein generative adversarial networks, Metropolis-Hasting algorithm |
| 相關次數: | 點閱:125 下載:0 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
預測股票市場一直以來都是一個具有高度不確定性且艱難的挑戰,特別是在經濟危機時期更加困難。本研究的目標是解決在高度波動期間準確預測股市價格的困難,尤其是在 COVID-19 疫情期間,市場經歷四次融斷和供應鏈斷鏈的危機,造成市場的恐慌和不穩定。在這種情況下,傳統模型如長短期記憶(Long Short-Term Memory, LSTM)無法捕捉到極端市場波動期間的模式。先前的研究表明,生成對抗網絡(Generative Adversarial Network, GAN)模型在高波動期間的表現可能優於LSTM模型。然而,由於GAN採用的損失函數在訓練時難以收斂,本研究擬用 Wasserstein GAN(WGAN)作為基礎模型,作為預測股市趨勢的方法並採用多種策略,用以提高模型對股市價格預測的準確性。首先,使用2010-2022年的數據初始化模型,再使用2020年後的數據進行微調和 Metropolis-Hastings 演算法優化模型訓練的抽樣過程,以學習最近市場的波動和趨勢。在特徵選擇方面,本研究發現,將恐慌指數(Volatility Index, VIX)、台灣特有的三大法人交易資料和關聯企業納入模型能夠有效提高預測準確度。通過 AB 測試評估各特徵對準確度的影響,發現使用 VIX 作為特徵能夠將趨勢準確度提高約2.01%,而使用三大法人自營商和投信的交易資料則能分別提高約2.63%和2.43%的趨勢預測準確度。本研究成果顯示,透過資料前處理、WGAN和Metropolis-Hastings演算法,能夠實現對台灣股市的準確預測。在COVID-19期間,模型達到65.79%的趨勢預測準確度,相較於先前台灣股票價格預測的研究有顯著提升。在預測回報率超過2%時,模型達到67.81%的趨勢準確度。此外,使用模型作為交易基準在2022/1/1-2023/5/30期間獲得了175.36%的報酬率,並且最大回撤僅為2.81%。結果顯示,透過結合多種方法,能夠有效捕捉高波動期間的波動模式,並提高預測的準確性。
This study aims to accurately predict stock market prices during highly volatile periods, with a specific focus on the COVID-19 pandemic. Conventional models, such as Long Short-Term Memory (LSTM), have demonstrated limitations in capturing complex patterns during extreme market fluctuations. Recent research suggests that Generative Adversarial Network (GAN) models have the potential to outperform LSTM models in high volatility scenarios. However, the challenges associated with convergence have led to the adoption of the Wasserstein GAN (WGAN) as the foundational model in this study. To improve the model's ability to learn recent trends, data from 2010-2022 initializes the model, with post-2020 data used for fine-tuning. The incorporation of the Metropolis-Hastings algorithm is employed to improve the accuracy of the model and the sampling process. The results demonstrate a notable improvement in directional accuracy, achieving 65.79% with the utilization of the Metropolis-Hastings algorithm, surpassing the baseline accuracy of 61.66%. Furthermore, the model attains a directional accuracy of 67.81% when predicting return rates exceeding 2%. Additionally, employing the proposed model as a trading strategy yields exceptional performance, with a maximum profit of 175.36% and a drawdown of 2.81% during the period of 2022/1/1-2023/5/30. The incorporation of factors such as the Volatility Index (VIX index), trading information, and correlated companies positively impacts the accuracy of the model. Specifically, the VIX index contributes to a 2.01% improvement in directional accuracy, while the trading information of institutional dealers and investment trading information result in enhancements of 2.63% and 2.43%, respectively. These findings underscore the effectiveness of the hybrid approach in capturing intricate patterns during periods of high volatility, thereby improving the accuracy of stock price predictions.
[1] J. Wurgler, "Financial markets and the allocation of capital," Journal of financial economics, vol. 58, no. 1-2, pp. 187-214, 2000.
[2] E. F. Fama, "The behavior of stock-market prices," The journal of Business, vol. 38, no. 1, pp. 34-105, 1965.
[3] B. G. Malkiel, "The efficient market hypothesis and its critics," Journal of economic perspectives, vol. 17, no. 1, pp. 59-82, 2003.
[4] S. Mehtab and J. Sen, "Stock price prediction using CNN and LSTM-based deep learning models," in 2020 International Conference on Decision Aid Sciences and Application (DASA), 2020, pp. 447-453.
[5] K. Zhang, G. Zhong, J. Dong, S. Wang, and Y. Wang, "Stock market prediction based on generative adversarial network," Procedia computer science, vol. 147, pp. 400-406, 2019.
[6] A. Timmermann and C. W. Granger, "Efficient market hypothesis and forecasting," International Journal of forecasting, vol. 20, no. 1, pp. 15-27, 2004.
[7] M.-C. Lee, J.-S. Liao, S.-C. Yeh, and J.-W. Chang, "Forecasting the short-term price trend of Taiwan stocks with deep neural network," in Proceedings of the 2020 11th International Conference on E-Education, E-Business, E-Management, and E-Learning, 2020, pp. 296-299.
[8] J. A. Jahja and I. Y. Loebiantoro, "Analysis of optimal hedge ratio and hedging effectiveness in Taiwan stock exchange capitalization weighted stock index (TAIEX) futures," in 15th International Symposium on Management (INSYMA 2018), 2018, pp. 26-30.
[9] C.-W. Huang, "Influence of External Factors on the Taiwan Stock Exchange," The International Journal of Business and Finance Research, vol. 8, no. 4, pp. 109-120, 2014.
[10] D. P. Kingma and M. Welling, "Auto-encoding variational bayes," arXiv preprint arXiv:1312.6114, 2013.
[11] K. Han, Y. Wang, C. Zhang, C. Li, and C. Xu, "Autoencoder inspired unsupervised feature selection," in 2018 IEEE international conference on acoustics, speech and signal processing (ICASSP), 2018, pp. 2941-2945.
[12] P. Ou and H. Wang, "Prediction of stock market index movement by ten data mining techniques," Modern Applied Science, vol. 3, no. 12, pp. 28-42, 2009.
[13] L. R. Medsker and L. Jain, "Recurrent neural networks," Design and Applications, vol. 5, pp. 64-67, 2001.
[14] A. Samarawickrama and T. Fernando, "A recurrent neural network approach in predicting daily stock prices an application to the Sri Lankan stock market," in 2017 IEEE International Conference on Industrial and Information Systems (ICIIS), 2017, pp. 1-6.
[15] Y. Liu, Z. Qin, P. Li, and T. Wan, "Stock volatility prediction using recurrent neural networks with sentiment analysis," in Advances in Artificial Intelligence: From Theory to Practice: 30th International Conference on Industrial Engineering and Other Applications of Applied Intelligent Systems, IEA/AIE 2017, Arras, France, June 27-30, 2017, Proceedings, Part I 30, 2017, pp. 192-201.
[16] I. Goodfellow et al., "Generative adversarial networks," Communications of the ACM, vol. 63, no. 11, pp. 139-144, 2020.
[17] P. Sonkiya, V. Bajpai, and A. Bansal, "Stock price prediction using BERT and GAN," arXiv preprint arXiv:2107.09055, 2021.
[18] F. Feng, H. Chen, X. He, J. Ding, M. Sun and T.-S. Chua arXiv preprint arXiv:1810.09936 2019
[19] H. Lin, C. Chen, G. Huang, and A. Jafari, "Stock price prediction using generative adversarial networks," J. Comp. Sci, pp. 17,188-196, 2021.
[20] S. Azadi, C. Olsson, T. Darrell, I. Goodfellow, and A. Odena, "Discriminator rejection sampling," arXiv preprint arXiv:1810.06758, 2018.
[21] R. Turner, J. Hung, E. Frank, Y. Saatchi, and J. Yosinski, "Metropolis-hastings generative adversarial networks," in International Conference on Machine Learning, 2019, pp. 6345-6353.
[22] Y. Liu, Z. Wang, and B. Zheng, "Application of regularized GRU-LSTM model in stock price prediction," in 2019 IEEE 5th International Conference on Computer and Communications (ICCC), 2019, pp. 1886-1890.
[23] A. Kumar et al., "Generative adversarial network (GAN) and enhanced root mean square error (ERMSE): deep learning for stock price movement prediction," Multimedia Tools and Applications, pp. 1-19, 2022.
[24] H. Gunduz, "An efficient stock market prediction model using hybrid feature reduction method based on variational autoencoders and recursive feature elimination," Financial innovation, vol. 7, no. 1, p. 28, 2021.
[25] C.-M. Hsu, "A hybrid procedure for stock price prediction by integrating self-organizing map and genetic programming," Expert Systems with Applications, vol. 38, no. 11, pp. 14026-14036, 2011.
[26] Z. Pan, Y. Wang, L. Liu, and Q. Wang, "Improving volatility prediction and option valuation using VIX information: A volatility spillover GARCH model," Journal of Futures Markets, vol. 39, no. 6, pp. 744-776, 2019.
[27] M. R. Vargas, C. E. Dos Anjos, G. L. Bichara, and A. G. Evsukoff, "Deep leaming for stock market prediction using technical indicators and financial news articles," in 2018 international joint conference on neural networks (IJCNN), 2018, pp. 1-8.
[28] J. Wang and J. Kim, "Predicting stock price trend using MACD optimized by historical volatility," Mathematical Problems in Engineering, vol. 2018, pp. 1-12, 2018
[29] A. Kelotra and P. Pandey, "Stock market prediction using optimized deep-convlstm model," Big Data, vol. 8, no. 1, pp. 5-24, 2020.
[30] K. S. Kannan, P. S. Sekar, M. M. Sathik, and P. Arumugam, "Financial stock market forecast using data mining techniques," in Proceedings of the International Multiconference of Engineers and computer scientists, 2010, vol. 1, p. 4.
[31] H.-C. Lai and K.-M. Wang, "Relationship between the trading behavior of three institutional investors and Taiwan Stock Index futures returns," Economic Modelling, vol. 41, pp. 156-165, 2014.
[32] F. Feng, H. Chen, X. He, J. Ding, M. Sun, and T.-S. Chua, "Enhancing stock movement prediction with adversarial training," arXiv preprint arXiv:1810.09936, 2018.
[33] S. Nayak, B. B. Misra, and H. S. Behera, "Impact of data normalization on stock index forecasting," International Journal of Computer Information Systems and Industrial Management Applications, vol. 6, no. 2014, pp. 257-269, 2014.
[34] A. J. Lew and M. J. Buehler, "Encoding and exploring latent design space of optimal material structures via a VAE-LSTM model," Forces in Mechanics, vol. 5, p. 100054, 2021.
[35] J. M. Joyce, "Kullback-leibler divergence," in International encyclopedia of statistical science: Springer, 2011, pp. 720-722.
[36] Y. Tao and D. Papadias, "Maintaining sliding window skylines on data streams," IEEE Transactions on Knowledge and Data Engineering, vol. 18, no. 3, pp. 377-391, 2006.
[37] T.-T. Nguyen and S. Yoon, "A novel approach to short-term stock price movement prediction using transfer learning," Applied Sciences, vol. 9, no. 22, p. 4745, 2019.
[38] C. Anand, "Comparison of stock price prediction models using pre-trained neural networks," Journal of Ubiquitous Computing and Communication Technologies (UCCT), vol. 3, no. 02, pp. 122-134, 2021.
[39] M. Arjovsky, S. Chintala, and L. Bottou, "Wasserstein generative adversarial networks," in International conference on machine learning, 2017, pp. 214-223.
[40] J. Chung, C. Gulcehre, K. Cho, and Y. Bengio, "Empirical evaluation of gated recurrent neural networks on sequence modeling," arXiv preprint arXiv:1412.3555, 2014.
[41] K. O'Shea and R. Nash, "An introduction to convolutional neural networks," arXiv preprint arXiv:1511.08458, 2015.
[42] M. N. Fekri, A. M. Ghosh, and K. Grolinger, "Generating energy data for machine learning with recurrent generative adversarial networks," Energies, vol. 13, no. 1, p. 130, 2019.
[43] R. K. Dash, T. N. Nguyen, K. Cengiz, and A. Sharma, "Fine-tuned support vector regression model for stock predictions," Neural Computing and Applications, pp. 1-15, 2021.
[44] S. Chib and E. Greenberg, "Understanding the metropolis-hastings algorithm," The american statistician, vol. 49, no. 4, pp. 327-335, 1995.
[45] R. Escandón, F. Ascione, N. Bianco, G. M. Mauro, R. Suárez, and J. J. Sendra, "Thermal comfort prediction in a building category: Artificial neural network generation from calibrated models for a social housing stock in southern Europe," Applied Thermal Engineering, vol. 150, pp. 492-505, 2019.
[46] A. T. Kalai and R. Sastry, "The Isotron Algorithm: High-Dimensional Isotonic Regression," in COLT, 2009.
[47] C.-J. Huang, D.-X. Yang, and Y.-T. Chuang, "Application of wrapper approach and composite classifier to the stock trend prediction," Expert Systems with Applications, vol. 34, no. 4, pp. 2870-2878, 2008.
[48] M. Magdon-Ismail and A. F. Atiya, "Maximum drawdown," Risk Magazine, vol. 17, no. 10, pp. 99-102, 2004.
[49] L. R. Glosten, R. Jagannathan, and D. E. Runkle, "On the relation between the expected value and the volatility of the nominal excess return on stocks," The journal of finance, vol. 48, no. 5, pp. 1779-1801, 1993.
[50] T. B. Pun and T. B. Shahi, "Nepal stock exchange prediction using support vector regression and neural networks," in 2018 Second International Conference on Advances in Electronics, Computers and Communications (ICAECC), 2018, pp. 1-6.
[51] J.-S. Chou and T.-K. Nguyen, "Forward forecast of stock price using sliding-window metaheuristic-optimized machine-learning regression," IEEE Transactions on Industrial Informatics, vol. 14, no. 7, pp. 3132-3142, 2018.
[52] X. Zhang, Y. Hu, K. Xie, S. Wang, E. Ngai, and M. Liu, "A causal feature selection algorithm for stock prediction modeling," Neurocomputing, vol. 142, pp. 48-59, 2014.
[53] Y. Xu and S. B. Cohen, "Stock movement prediction from tweets and historical prices," in Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2018, pp. 1970-1979.
[54] R. Sawhney, S. Agarwal, A. Wadhwa, and R. Shah, "Deep attentive learning for stock movement prediction from social media text and company correlations," in Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2020, pp. 8415-8426.
校內:2028-06-28公開