摘要: | 股票市場是一種非常熱門且便利的一種投資方法,但投資人很難透過基本面與技術分析預測未來股價,因為股票市場是個複雜且難以預測的系統,影響股價變動的因素非常多,是個非線性的系統,故期望能建立一個模型,該模型能提高預測標的的價格準確性。 想要對股價這種非線性、時間序列的資料,進行準確預測有相當難度,為了預測的準確,須將資料依照日期切齊,加入到預測模型中,並利用深度學習中長短期記憶模型(LSTM模型)能夠記憶資料的特性,來預測股價這種非線性且具有時間序列的資料。 本研究分別設計各種維度與不同LSTM層數組合的神經網絡模型,使用台灣50、台灣MSCI指數及道瓊台灣指數相關數據,作為訓練與測試的不同維度,經由充分的訓練和調變及優化,對隔天的台灣50收盤價進行預測。模型建立方式包括資料蒐集與前處理,神經網路模型的設計和訓練,測試和評估。 本研究利用長短期記憶模型(LSTM)解決了遞歸神經網絡(RNN)無法解決長期依賴的問題,證明長短期記憶模型(LSTM)在非線性、時間序列的股價預測上有較佳的表現,且最終三維雙LSTM模型獲得了最好的預測效果,也證明了LSTM在同時有三種資料來源,較複雜的環境下,反而有更好的表現。;The stock market is a very popular and convenient investment method, but it is difficult to predict the future stock price through fundamental analysis and technical analysis, because the stock market is a complex and difficult System, and there are many factors can affect stock price changes, this such a non-linear System. So I suppose to build a model that can improve the accuracy of the forecast price. It is not easy to accurately predict the non-linear, time-series data of stock prices. In order to make accurate predictions, the data must be aligned according to the date and added to the prediction model, and the Long Short-Term Memory model (LSTM) is one of the Deep Learning’s models, can memorize the characteristics of data to predict the non-linear and time-series data of stock price. In this study, we design neural network models of various dimensions and different combinations of LSTM layers, using the relevant data of Taiwan 50 ETF, Taiwan MSCI index and Dow Jones Taiwan index as different dimensions of training and testing, after sufficient training, modulation and optimization, forecast the closing price of Taiwan 50 ETF the next day. Model building methods include data collection and pre-processing, neural network model design and training, testing and evaluation. This study uses the Long Short-Term Memory model (LSTM) to solve the problem that the Recurrent Neural Network (RNN) cannot solve the long-term dependence, and proves that the Long Short-Term Memory model (LSTM) has better performance in non-linear, time series stock price prediction, and In the end, the three-dimensional double LSTM model obtained the better prediction effect, which also proved that LSTM has three data sources at the same time, and it has better performance in more complex environments. |