請用此 Handle URI 來引用此文件:
http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/88810
標題: | 結合 LSTM 股價預測與基因模糊交易策略—以台灣50 為例 Combining LSTM to predict stock price and fuzzy genetic algorithm to determine trading strategy in the case of Taiwan ETF50 Stock |
作者: | 呂雅芳 Ya-Fang Lu |
指導教授: | 張瑞益 Ray-I Chang |
關鍵字: | 基因演算法,模糊系統,LSTM,校正策略,ETF50,交易策略,技術性指標, Genetic Algorithm,Fuzzy System,LSTM,Calibration Strategy,ETF50,Trading strategy,Technical Indicators, |
出版年 : | 2023 |
學位: | 碩士 |
摘要: | 本研究以 LSTM 預測元大台灣50(ETF50)股價,為了提高模型預測的準確度,提出了「誤差校正法」,進行修正預測股價。我們計算每日預測股價與實際股價之誤差,並判斷誤差值是否超過閥值,若超過閥值則進行校正預測股價。同時,我們使用基因演算法(Genetic Algorithm, GA)來調整校正法中的參數,以達到準確預測股價的目的。
在股票交易中,決定股票買賣時間點是交易關鍵之一。過去許多股票研究會使用基本面、消息面或是技術面的技術性指標來判斷最佳買賣點。本研究提出了基因演化之模糊演算法來決定買賣時機,使用多種技術指標應用規則建立模糊系統(Fuzzy System),並結合 GA 來演化出最佳的隸屬函數之參數,以改善模糊系統。 本研究收集 2003 年到 2020 年間 ETF50 和 ETF50 中成分股佔比最大的股票作為資料集,去預測 ETF50 股價,其中前段 90% 作為訓練資料,後段 10% 作為測試資料。將訓練資料經過 12 項技術性指標計算以及前處理後,作為模型輸入變數。 模型預測值經過誤差校正法進行校正後,與未校正的股價進行比較,使用均方誤差(Mean Square Error, MSE)來評估預測準確性,結果顯示,未經校正股價的 MSE 為 11.5758,而經過校正後的股價 MSE降至 1.2687,大幅地降低模型預測的誤差。透過誤差校正法校正股價並以基因演算法決定買賣點,本研究最終實驗可獲得 32.0% 的報酬率。 This study employs LSTM to predict the stock prices of Yuanta/P-shares Taiwan Top 50 ETF. In order to improve the accuracy of the prediction model, we propose the " Deviation Calibration " method to adjust the predicted stock prices. We calculate the daily deviation between the predicted stock price and the actual stock price, and determine if the deviation value exceeds a threshold. If it exceeds the threshold, we proceed to correct the predicted stock price. Additionally, we utilize Genetic Algorithm (GA) to adjust the parameters of the deviation calibration method in order to achieve accurate stock price predictions. In stock trading, determining the timing of buying and selling stocks is one of the key aspects of trading. In the past, many stock studies have used fundamental, news-based, or technical indicators to identify optimal buying and selling points. This study proposes a genetic fuzzy algorithm to determine the timing of trades by utilizing multiple technical indicators to establish a fuzzy system. Additionally, it combines GA to evolve the optimal parameter values for the membership functions in order to improve the fuzzy system. This study collected the stock data of the ETF50 and the constituents with the highest weighting in the ETF50 as the dataset, which is from 2003 to 2020, to predict the ETF50 stock price. The dataset was split into two parts, with the first 90% used as training data and the last 10% as testing data. The training data underwent calculations of 12 technical indicators and preprocessing, which were then used as input variables for the model. After applying the deviation calibration method to the predicted values of the model, a comparison was made with the uncorrected stock prices. The mean square error (MSE) was used to evaluate the prediction accuracy. The results showed that the MSE of the uncorrected stock prices was 11.5758, whereas the MSE of the corrected stock prices decreased to 1.2687, and the stock prediction error is reduced significantly. By correcting the stock prices using the deviation calibration method and determining the buying and selling points through genetic algorithm, this study ultimately achieved a return rate of 32.0% in the experiments. |
URI: | http://tdr.lib.ntu.edu.tw/jspui/handle/123456789/88810 |
DOI: | 10.6342/NTU202303208 |
全文授權: | 同意授權(全球公開) |
顯示於系所單位: | 工程科學及海洋工程學系 |
文件中的檔案:
檔案 | 大小 | 格式 | |
---|---|---|---|
ntu-111-2.pdf | 1.59 MB | Adobe PDF | 檢視/開啟 |
系統中的文件,除了特別指名其著作權條款之外,均受到著作權保護,並且保留所有的權利。