進階搜尋


 
系統識別號 U0026-1608201911255900
論文名稱(中文) 基於長短期記憶網路模型之股市趨勢預測
論文名稱(英文) Stock Market Trend Prediction Based on LSTM Model
校院名稱 成功大學
系所名稱(中) 工程科學系
系所名稱(英) Department of Engineering Science
學年度 107
學期 2
出版年 108
研究生(中文) 許琮苓
研究生(英文) Tsung-Ling Hsu
學號 N96061274
學位類別 碩士
語文別 中文
論文頁數 56頁
口試委員 口試委員-陳淵琮
口試委員-鄭國順
口試委員-賴槿峰
指導教授-王明習
中文關鍵字 遞歸神經網路  股票  股市預測  深度學習  長短期神經網路 
英文關鍵字 Recurrent Neural Networks(RNN)  Stock Market Prediction  Machine Learning  Long Short-Term Memory(LSTM) 
學科別分類
中文摘要 股票市場一直是代表社會的重要經濟指標,股票市場的波動具有規律性的變化,股票市場波動的預測是一個相當有趣的問題,但由於影響股市之因素非常多導致很難得到精準的預測,目前有許多演算法已被應用來做股票市場趨勢預測,但仍難有明確的模型。本論文採用時間序列之類神經網路模型來預測台灣上市公司之股價漲跌趨勢,以四家上市公司為研究對象,研究所使用之資料集為2010年1月至2019年2月共8年間之交易日資料,運用移動視窗法,視窗內採用60個連續交易日去預測視窗之隔天交易日的開盤價,本研究所考慮的影響因素計有加入5項基本指標──「收盤價」、「開盤價」、「最低價」、「最高價」與「交易量」,以及台灣股市最常見之三種具代表性的金融指標──「相對強弱指標(Relative Strength Index, RSI)」、和「指數平均數指標(Exponential Moving Average, EMA」」,和代表新聞關注度的Google趨勢。再利用演算去評估該時段之新聞關鍵字重要性,而給予程度上的分層加權。最後將計算預測值與實際值之準確率,也就是預測漲跌之正確與否總次數的百分比,並採用均方誤差(Mean-Square Error, MSE)去計算實際值與預測值之誤差,比較四家各股之結果差異,闡述背後可能影響結果之原因,最終結果顯示該模型之準確值達63%。
英文摘要 The stock market has always been an important economic indicator for the society. It is believed that the fluctuation of the stock market seems changed according to some cyclic regularity. For a stock investor, how to find the cyclic regularity of a stock market is a most important issue. However, due to many factors affecting the stock market, it is difficult to obtain accurate predictions. At present, many algorithms have been applied for predicting stock market trends. Due to both local/regional and global economic performance will affect the stock market. The degree of influence is also different for different stock market. So it’s still difficult to define an accepted model for different stock market. In this study, a neural network model called long short-term memory (LSTM) is proposed for predicting the price trend of four companies in the Taiwan stock. Five basic transaction factors for each stock and the three most common statistical indicators in Taiwan stock market are considered. The transaction factors for a specific stock are its opening price, closing price, highest price, lowest price, and transaction volume. The common statistical indicators are Relative Strength Index (RSI), Exponential Moving Average (EMA). For considering the public news attention for the specific company, the information from Google trend is also considered as positive or negative influence with different weighting according to the keywords represented in the news. The data set applied for this study is the trade volume of the Taiwan stock market from January 2010 to February 2019. A window with 60 consecutive trading days is considered to predict the open price of the next (the 61th) trading day, then the window is moved forward to next day for predicting the opening price of the 62th day. The results show that the trend of up or down of the prediction accurate is 63% for the proposed model.
論文目次 目錄
摘要 i
目錄 xi
圖目錄 xiii
表目錄 xiv
第一章 緒論 1
1.1 研究背景與動機 1
1.2 研究目的 2
1.3 論文架構 3
第二章 相關資料探討 4
2.1 股市相關理論 4
2.1.1 有效市場假說(Efficient Market Hypothesis) 4
2.1.2新聞影響市場 6
2.1.3 日曆效應 7
2.2 預測方法 10
2.2.1 傳統預測方法 10
2.2.2 類神經網路之概述 11
2.2.3 類神經網路之模型 12
2.2.4 深層遞迴式神經網路 15
2.2.5 長短期記憶類神經網路模型 17
2.3 相關文獻探討 20
第三章 研究方法 22
3.1 數據集 22
3.1.1 資料來源 23
3.1.2 訓練資料集 23
3.2 資料預處理 24
3.2.1 技術指標分析 25
3.2.1 熱搜演算法 30
3.2.3 新聞影響度 32
3.2.4 關鍵字分級庫 33
3.3 訓練與測試 34
3.3.1 移動視窗法 35
3.4 整體架構 36
3.4.1 網路訓練與超參數設置 37
3.4.2 損失函數 38
第四章 實驗結果與討論 39
4.1 實驗環境 40
4.2 實驗結果與數據 41
4.2.1 原始數據與金融組合 41
4.2.2 最佳組合 45
4.2.3 實驗成果 46
4.3 成果討論 50
第五章 結論與未來展望 51
參考文獻 52

圖目錄
圖1-1論文架構圖 3
圖2-1前饋式類神經網路示意圖 14
圖2-2遞迴式類神經網路示意圖 15
圖2-3深層遞迴式類神經網路示意圖 16
圖2-4長短期記憶類神經網路模型圖 19
圖2-5長短期記憶類神經網路模型圖 20
圖3-1所使用之訓練資料集架構圖 24
圖3-2 2019年2月之中鋼財經類熱搜程度示意圖 31
圖3-3熱搜演算法之流程圖 32
圖3-4熱搜演算法之架構圖 33
圖3-5移動視窗法示意圖 35
圖3-6整體架構示意圖 36
圖3-7整體研究架構圖 37
圖4-1 中國鋼鐵開盤價圖 42
圖4-2 盛餘鋼鐵開盤價圖 42
圖4-3台達鋼鐵開盤價圖 43
圖4-4華邦電子開盤價圖 43
圖4-5輸入訓練資料集組合關係圖 44
圖4-6中鋼採用組合一之預測趨勢圖 48
圖4-7盛餘採用組合一之預測趨勢圖 48
圖4-8台達採用組合一之預測趨勢圖 49
圖4-9華邦採用組合一之預測趨勢圖 49


表目錄
表2-1 LSTM符號說明 19
表3-1四支台灣個股 22
表3-2漲跌分級字詞舉例 34
表4-1 開發環境 40
表4-2以中鋼為例之組合結果 45
表4-3採用組合一之成果 46
表4-4採用組合二之成果 47
參考文獻 參考文獻
[1] MICHIE, Donald, et al. Machine learning. Neural and Statistical
Classification, 1994, 13.
[2] PATEL, Jigar, et al. Predicting stock and stock price index movement using
trend deterministic data preparation and machine learning techniques.
Expert Systems with Applications, 2015, 42.1: 259-268.
[3] MALKIEL, Burton G.; FAMA, Eugene F. Efficient capital markets: A
review of theory and empirical work. The journal of Finance, 1970, 25.2:
383-417.
[4] GIDOFALVI, Gyozo; ELKAN, Charles. Using news articles to predict
stock price movements. Department of Computer Science and
Engineering, University of California, San Diego, 2001.
[5] MITTERMAYER, M.-A. Forecasting intraday stock price trends with text
mining techniques. In: 37th Annual Hawaii International Conference on
System Sciences, 2004. Proceedings of the. IEEE, 2004. p. 10 pp.
[6] CROSS, Frank. The behavior of stock prices on Fridays and Mondays.
Financial analysts journal, 1973, 29.6: 67-69.
[7] FRENCH, Kenneth R. Stock returns and the weekend effect. Journal of
financial economics, 1980, 8.1: 55-69.
[8] GIBBONS, Michael R.; HESS, Patrick. Day of the week effects and asset
returns. Journal of business, 1981, 579-596.
[9] LAKONISHOK, Josef; LEVI, Maurice. Weekend effects on stock returns: a
note. The Journal of Finance, 1982, 37.3: 883-889.

[10] ROGALSKI, Richard J. New findings regarding day‐of‐the‐week returns
over trading and non‐trading periods: a note. The Journal of Finance, 1984,
39.5: 1603-1614.
[11] 王嘉隆; 詹淑慧. 分類迴歸樹於 S&P500 指數預測之研究. 2005.
[12] 蔡明輝. 台灣股市" 春節效果" 之實証硏究. 1991. PhD Thesis.
National Taiwan University Graduate Institute of Business Administration.
[13] 刘凤元; 陈俊芳. 换月效应的窗饰解释: 基于上海市场的实证. 数量
经济技术经济研究, 2004, 3: 149-154..
[14] 金鐵英; 黃盈智. 台灣股市農曆月份效應之研究. 財金論文叢刊,
2016, 25: 33-61..
[15] CHANG, Hsu-Ling, et al. Long-run purchasing power parity and
asymmetric adjustment in BRICs. Applied Economics Letters, 2010,
17.11: 1083-1087..
[16] BOLLERSLEV, Tim. Generalized autoregressive conditional
heteroskedasticity. Journal of econometrics, 1986, 31.3: 307-327.
[17] BOX, George EP, et al. Time series analysis: forecasting and control. John
Wiley & Sons, 2015.
[18] RUMELHART, David E. Parallel distributed processing: Explorations in
the microstructure of cognition. Learning internal representations by error
propagation, 1986, 1: 318-362.
[19] HINTON, Geoffrey E.; OSINDERO, Simon; TEH, Yee-Whye. A fast
learning algorithm for deep belief nets. Neural computation, 2006, 18.7:
1527-1554.
[20] ROSENBLATT, Frank. The perceptron, a perceiving and recognizing
automaton Project Para. Cornell Aeronautical Laboratory, 1957.
[21] RUMELHART, David E., et al. Learning representations by back-
propagating errors. Cognitive modeling, 1988, 5.3: 1.
[22] HOCHREITER, Sepp; SCHMIDHUBER, Jürgen. Long short-term
memory. Neural computation, 1997, 9.8: 1735-1780.
[23] KARIM, Fazle, et al. LSTM fully convolutional networks for time series c
lassification. IEEE Access, 2017, 6: 1662-1669.
[24] NELSON, David MQ; PEREIRA, Adriano CM; DE OLIVEIRA, Renato
A. Stock market's price movement prediction with LSTM neural networks.
In: 2017 International Joint Conference on Neural Networks (IJCNN).
IEEE, 2017. p. 1419-1426.
[25] SELVIN, Sreelekshmy, et al. Stock price prediction using LSTM, RNN
and CNN-sliding window model. In: 2017 International Conference on
Advances in Computing, Communications and Informatics (ICACCI). IEEE, 2017. p. 1643-1647.
[26] SHAO, XiuLi, et al. Short-term forecast of stock price of multi-branch
LSTM based on K-means. In: 2017 4th International Conference on
Systems and Informatics (ICSAI). IEEE, 2017. p. 1546-1551.
[27] SAMARAWICKRAMA, A. J. P.; FERNANDO, T. G. I. 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). IEEE, 2017. p. 1-6.
[28] AKITA, Ryo, et al. Deep learning for stock prediction using numerical and
textual information. In: 2016 IEEE/ACIS 15th International Conference on
Computer and Information Science (ICIS). IEEE, 2016. p. 1-6.

[29] DING, Xiao, et al. Deep learning for event-driven stock prediction. In:
Twenty-fourth international joint conference on artificial intelligence.2015.
[30] FISCHER, Thomas; KRAUSS, Christopher. Deep learning with long
short-term memory networks for financial market predictions. European
Journal of Operational Research, 2018, 270.2: 654-669.
[31] GAO, Shao En; LIN, Bo Sheng; WANG, Chuin-Mu. Share Price Trend
Prediction Using CRNN with LSTM Structure. In: 2018 International
Symposium on Computer, Consumer and Control (IS3C). IEEE, 2018. p.
10-13.
[32] CHENG, Li-Chen; HUANG, Yu-Hsiang; WU, Mu-En. Applied attention-
based LSTM neural networks in stock prediction. In: 2018 IEEE
International Conference on Big Data (Big Data). IEEE, 2018. p. 4716-4718.
[33] FAUSTRYJAK, Damian; JACKOWSKA-STRUMIŁŁO, Lidia;
MAJCHROWICZ, Michał. Forward forecast of stock prices using LSTM
neural networks with statistical analysis of published messages. In: 2018 International Interdisciplinary PhD Workshop (IIPhDW). IEEE, 2018. p. 288-292.
[34] ONCHAROEN, Pisut; VATEEKUL, Peerapon. Deep learning for stock
market prediction using event embedding and technical indicators. In:
2018 5th International Conference on Advanced Informatics: Concept Theory and Applications (ICAICTA). IEEE, 2018. p. 19-24.
[35] PALUCH, Michał; JACKOWSKA-STRUMIŁŁO, Lidia. The influence of
using fractal analysis in hybrid MLP model for short-term forecast of close prices on Warsaw Stock Exchange. In: 2014 Federated Conference on Computer Science and Information Systems. IEEE, 2014. p. 111-118.
[36] ZAREMBA, Adam. Giełda. Podstawy inwestowania. Wydanie II
rozszerzone. Wydawnictwo HELION, Gliwice, 2010.
論文全文使用權限
  • 同意授權校內瀏覽/列印電子全文服務,於2019-08-23起公開。
  • 同意授權校外瀏覽/列印電子全文服務,於2019-08-23起公開。


  • 如您有疑問,請聯絡圖書館
    聯絡電話:(06)2757575#65773
    聯絡E-mail:etds@email.ncku.edu.tw