Publications-Theses

Article View/Open

Publication Export

Google ScholarTM

NCCU Library

Citation Infomation

Related Publications in TAIR

題名 基於股票分類與強勢行業指數的機器學習資產配置策略
Machine Learning-Based Asset Allocation Strategy Incorporating Stock Classification and Strong Industry Index
作者 張彤
Chang, Tung
貢獻者 黃泓智<br>曾毓英
Huang, Hong-Chih<br>Tzeng, Yu-Ying
張彤
Chang, Tung
關鍵詞 圍繞中心點分類
動態時間扭曲
機器學習
台灣行業別指數
資產配置
股票分類
Partitioning Around Medoids
Dynamic Time Warping
Machine Learning
Taiwan Industry Index
Asset Allocation
Stock Classification
日期 2023
上傳時間 2-Aug-2023 14:24:23 (UTC+8)
摘要 本文使用了14年的台灣上市公司股價資料,計算出技術指標、訊號指標,並採用因子篩選技術進行資料預處理。接著,使用動態時間扭曲(Dynamic Time Warping, DTW)方法來衡量股票間的距離,並結合圍繞中心點分類(Partitioning Around Medoids, PAM)算法進行股票相似度分群。在股票漲跌趨勢預測方面,本論文採用了極限梯度提升模型(eXtreme Gradient Boosting, XGBoost)、多層感知器(Multilayer Perceptron, MLP)、支持向量回歸(Support Vector Regression, SVR)作為機器學習器,並使用集成學習方法。利用集成模型預測台灣股市個股的漲跌趨勢,並選出上漲趨勢較高的股票組成投資清單。在資產配置方面,本文開發了兩種方法去對Markowitz的切線投資組合(Tangency Portfolio)、最小風險模型(Global Minimum Risk)以及等權重資產配置框架進行資產配置權重的調整,過程中使用台灣33種行業別指數搭配技術指標與總經指標進行訓練與預測,挑選當月的強勢行業別指數,並找出與該強勢行業別指數具有最高相似性的股票群或單一個股,並對其進行權重加乘調整,進行回測分析。最後,本文使用統計評估指標對預測模型的性能進行評估。
結果顯示在使用股票分類與集成學習後,可使回測績效提升,又本文開發的資產配置方法比起調整前的切線投資組合、最小風險模型以及等權重資產配置框架獲得了最佳的績效,也發現在訓練並預測出強勢行業別工業股票指數時搭配非即時性總經指標可以有更好的預測能力。
In this paper, 14 years of stock price data of listed companies in Taiwan are used to calculate technical indicators and signal indicators, and the data are preprocessed using factor filtering techniques. Then, Dynamic Time Warping method is used to measure the distance between stocks, and Partitioning Around Medoids is combined to perform stock similarity clustering. For stock trend prediction, this paper adopts XGBoost, MLP, SVR as machine learners and uses integrated learning methods. The integrated model is used to predict the upward and downward trends of individual stocks in the Taiwan stock market and to select stocks with higher upward trends to form an investment list. In terms of asset allocation, two methods are developed to adjust the asset allocation weights of Markowitz`s Tangency Portfolio, Global Minimum Risk model, and Equal Weighted Asset Allocation framework, using 33 sectoral indices in Taiwan with technical indicators and aggregate indicators. In the process of training and forecasting, the strongest sector indices of the month are selected, and the stock groups or single stocks with the highest similarity to the strongest sector indices are identified, and their weights are adjusted for backtest analysis. Finally, the paper evaluates the performance of the forecasting model using statistical evaluation metrics, and shows that the use of stock classification and integrated learning leads to improved backtesting performance, and that the asset allocation approach developed in this paper achieves the best performance compared to the pre-tuning asset allocation framework.
參考文獻 參考文獻
1. 林文修, & 陳仕哲. (2015). 遺傳演算法在台灣股價趨勢轉折點與波動訊號捕捉之應用. 輔仁管理評論, 22(3), 1-33.

2. 張婷媛. (2022). 利用集成學習及離散小波轉換進行股票預測.

3. Alsubaie, Y., El Hindi, K., & Alsalman, H. (2019). Cost-sensitive prediction of stock price direction: Selection of technical indicators. IEEE Access, 7, 146876-146892.

4. Aqsari, H. W., Prastyo, D. D., & Rahayu, S. P. (2022, December). Clustering Stock Prices of Financial Sector Using K-Means Clustering With Dynamic Time Warping. In 2022 6th International Conference on Information Technology, Information Systems and Electrical Engineering (ICITISEE) (pp. 503-507). IEEE.

5. Aithal, P. K., Geetha, M., Dinesh, U., Savitha, B., & Menon, P. (2023). Real-Time Portfolio Management System Utilizing Machine Learning Techniques. IEEE Access, 11, 32595-32608.

6. Clarke, R., De Silva, H., & Thorley, S. (2006). Minimum-variance portfolios in the US equity market. Journal of Portfolio Management, 33(1), 10.

7. Ding, X., Hao, K., Cai, X., Tang, X. S., Chen, L., & Zhang, H. (2020). A novel similarity measurement and clustering framework for time series based on convolution neural networks. Ieee Access, 8, 173158-173168.

8. Li, M., Zhu, Y., Shen, Y., & Angelova, M. (2023). Clustering-enhanced stock price prediction using deep learning. World Wide Web, 26(1), 207-232.

9. Markowitz, H. (1952). The utility of wealth. Journal of political Economy, 60(2),151-158.
10. Manjoro, W. S., Dhakar, M., & Chaurasia, B. K. (2016, April). Operational analysis of k-medoids and k-means algorithms on noisy data. In 2016 International conference on communication and signal processing (ICCSP) (pp. 1500-1505). IEEE.

11. Medarhri, I., Hosni, M., Nouisser, N., Chakroun, F., & Najib, K. (2022, October). Predicting Stock Market Price Movement using Machine Learning Techniques. In 2022 8th International Conference on Optimization and Applications (ICOA) (pp. 1-5). IEEE.

12. Sinatrya, N. S., & Wardhani, L. K. (2018, August). Analysis of K-Means and K-Medoids’s Performance Using Big Data Technology. In 2018 6th International Conference on Cyber and IT Service Management (CITSM) (pp. 1-5). IEEE.

13. Zhang, X., & Chen, W. (2019, July). Stock Selection Based on Extreme Gradient Boosting. In 2019 Chinese Control Conference (CCC) (pp. 8926-8931). IEEE.
描述 碩士
國立政治大學
風險管理與保險學系
110358028
資料來源 http://thesis.lib.nccu.edu.tw/record/#G0110358028
資料類型 thesis
dc.contributor.advisor 黃泓智<br>曾毓英zh_TW
dc.contributor.advisor Huang, Hong-Chih<br>Tzeng, Yu-Yingen_US
dc.contributor.author (Authors) 張彤zh_TW
dc.contributor.author (Authors) Chang, Tungen_US
dc.creator (作者) 張彤zh_TW
dc.creator (作者) Chang, Tungen_US
dc.date (日期) 2023en_US
dc.date.accessioned 2-Aug-2023 14:24:23 (UTC+8)-
dc.date.available 2-Aug-2023 14:24:23 (UTC+8)-
dc.date.issued (上傳時間) 2-Aug-2023 14:24:23 (UTC+8)-
dc.identifier (Other Identifiers) G0110358028en_US
dc.identifier.uri (URI) http://nccur.lib.nccu.edu.tw/handle/140.119/146657-
dc.description (描述) 碩士zh_TW
dc.description (描述) 國立政治大學zh_TW
dc.description (描述) 風險管理與保險學系zh_TW
dc.description (描述) 110358028zh_TW
dc.description.abstract (摘要) 本文使用了14年的台灣上市公司股價資料,計算出技術指標、訊號指標,並採用因子篩選技術進行資料預處理。接著,使用動態時間扭曲(Dynamic Time Warping, DTW)方法來衡量股票間的距離,並結合圍繞中心點分類(Partitioning Around Medoids, PAM)算法進行股票相似度分群。在股票漲跌趨勢預測方面,本論文採用了極限梯度提升模型(eXtreme Gradient Boosting, XGBoost)、多層感知器(Multilayer Perceptron, MLP)、支持向量回歸(Support Vector Regression, SVR)作為機器學習器,並使用集成學習方法。利用集成模型預測台灣股市個股的漲跌趨勢,並選出上漲趨勢較高的股票組成投資清單。在資產配置方面,本文開發了兩種方法去對Markowitz的切線投資組合(Tangency Portfolio)、最小風險模型(Global Minimum Risk)以及等權重資產配置框架進行資產配置權重的調整,過程中使用台灣33種行業別指數搭配技術指標與總經指標進行訓練與預測,挑選當月的強勢行業別指數,並找出與該強勢行業別指數具有最高相似性的股票群或單一個股,並對其進行權重加乘調整,進行回測分析。最後,本文使用統計評估指標對預測模型的性能進行評估。
結果顯示在使用股票分類與集成學習後,可使回測績效提升,又本文開發的資產配置方法比起調整前的切線投資組合、最小風險模型以及等權重資產配置框架獲得了最佳的績效,也發現在訓練並預測出強勢行業別工業股票指數時搭配非即時性總經指標可以有更好的預測能力。
zh_TW
dc.description.abstract (摘要) In this paper, 14 years of stock price data of listed companies in Taiwan are used to calculate technical indicators and signal indicators, and the data are preprocessed using factor filtering techniques. Then, Dynamic Time Warping method is used to measure the distance between stocks, and Partitioning Around Medoids is combined to perform stock similarity clustering. For stock trend prediction, this paper adopts XGBoost, MLP, SVR as machine learners and uses integrated learning methods. The integrated model is used to predict the upward and downward trends of individual stocks in the Taiwan stock market and to select stocks with higher upward trends to form an investment list. In terms of asset allocation, two methods are developed to adjust the asset allocation weights of Markowitz`s Tangency Portfolio, Global Minimum Risk model, and Equal Weighted Asset Allocation framework, using 33 sectoral indices in Taiwan with technical indicators and aggregate indicators. In the process of training and forecasting, the strongest sector indices of the month are selected, and the stock groups or single stocks with the highest similarity to the strongest sector indices are identified, and their weights are adjusted for backtest analysis. Finally, the paper evaluates the performance of the forecasting model using statistical evaluation metrics, and shows that the use of stock classification and integrated learning leads to improved backtesting performance, and that the asset allocation approach developed in this paper achieves the best performance compared to the pre-tuning asset allocation framework.en_US
dc.description.tableofcontents 目錄
第一章 緒論 1
第一節 研究動機 1
第二節 研究目的 2
第三節 研究流程 5
第二章 文獻回顧 6
第一節 選用指標文獻回顧 6
第二節、時間序列相似性度量文獻回顧 7
第三節、機器學習與股票漲跌預測文獻回顧 9
第四節、資產配置文獻回顧 10
第三章、 研究方法 12
第一節、研究架構 12
第二節、因子指標篩選 14
第三節、衡量股票距離與分類 19
第四節、機器學習模型 23
第五節、集成學習選股 29
第六節、資產配置策略 32
第七節、績效指標說明 35
第四章、實證結果 37
第一節 單一模型 37
第二節 集成模型 51
第三節 行業別調整模型 58
第五章 結論與建議 72
參考文獻 73
附錄一、使用指標之定義及說明 75



































表次

表 一、各群股票數量 23
表 二、股票報酬率分群條件 27
表 三、行業別指數報酬率分群條件 29
表 四、各群挑出檔數 31
表 五、XGBOOST搭配切線模型回測績效 38
表 六、XGBOOST搭配最小風險模型回測績效 39
表 七、XGBOOST搭配等權重模型回測績效 41
表 八、MLP搭配切線模型回測績效 42
表 九、MLP搭配最小風險模型回測績效 43
表 十、MLP搭配等權重模型回測績效 45
表 十一、SVR搭配切線模型回測績效 46
表 十二、SVR搭配最小風險模型回測績效 47
表 十三、SVR搭配等權重模型回測績效 49
表 十四、XGBOOST模型下資產配置模型回測績效比較表 49
表 十五、MLP模型下資產配置模型回測績效比較表 50
表 十六、SVR模型下資產配置模型回測績效比較表 50
表 十七、有無股票分類下切線模型集成學習與台股大盤績效比較表 52
表 十八、有無股票分類下最小風險模型集成學習與台股大盤績效比較表 54
表 十九、有無股票分類下等權重法集成學習與台股大盤績效比較表 55
表 二十、切線模型_單一模型與集成模型績效比較表 56
表 二十一、最小風險模型_單一模型與集成模型績效比較表 56
表 二十二、等權重模型_單一模型與集成模型績效比較表 57
表 二十三、行業別與大盤績效回測比較表 58
表 二十五、股票分類_法一_切線模型集成學習與大盤績效比較表 60
表 二十六、股票分類_法一_最小風險模型集成學習與大盤績效比較表 60
表 二十七、股票分類_法一_等權重法集成學習與大盤績效比較表 61
表 二十八、股票分類_法一二_切線模型集成學習與大盤績效比較表 63
表 二十九、股票分類_法一二_最小風險模型集成學習與大盤績效比較表 64
表 三十、所有指標_行業別與大盤績效回測比較表 65
表 三十一、所有指標_股票分類_法一_切線模型集成學習與大盤比較表 66
表 三十二、所有指標_股票分類_法一_最小風險集成學習與大盤比較表 67
表 三十三、所有指標_股票分類_法一_等權重集成學習與大盤比較表 67
表 三十四、所有指標_股票分類_法一二_切線集成學習與大盤比較表 69
表 三十五、所有指標_股票分類_法一二_最小風險集成學習與大盤比較表 70
表 三十六、切線模型_加入總經指標前後績效比較表 70
表 三十七、最小風險模型_加入總經指標前後績效比較表 71
表 三十八、等權重模型_加入總經指標前後績效比較表 71








圖次
圖 一、研究流程 5
圖 二、研究架構 13
圖 三、序列相似性範例 19
圖 四、WSS指標圖 22
圖 五、SILHOUETTE指標圖 22
圖 六、股票資料建模區間 24
圖 七、行業別指數資料建模區間 25
圖 八、無股票分類下建模流程 30
圖 九、股票分類下建模流程 31
圖 十、XGBOOST無股票分類下搭配切線模型回測績效 37
圖 十一、XGBOOST有股票分類下搭配切線模型回測績效 38
圖 十二、XGBOOST無股票分類下搭配最小風險模型回測績效 39
圖 十三、XGBOOST有股票分類下搭配最小風險模型回測績效 39
圖 十四、XGBOOST無股票分類下搭配等權重法回測績效 40
圖 十五、XGBOOST有股票分類下搭配等權重法回測績效 40
圖 十六、MLP無股票分類下搭配切線模型回測績效 41
圖 十七、MLP有股票分類下搭配切線模型回測績效 42
圖 十八、MLP無股票分類下搭配最小風險模型回測績效 43
圖 十九、MLP有股票分類下搭配最小風險模型回測績效 43
圖 二十、MLP無股票分類下搭配等權重法回測績效 44
圖 二十一、MLP有股票分類下搭配等權重法回測績效 44
圖 二十二、SVR無股票分類下搭配切線模型回測績效 45
圖 二十三、SVR有股票分類下搭配切線模型回測績效 46
圖 二十四、SVR無股票分類下搭配最小風險模型回測績效 47
圖 二十五、SVR有股票分類下搭配最小風險模型回測績效 47
圖 二十六、SVR無股票分類下搭配等權重法回測績效 48
圖 二十七、SVR有股票分類下搭配等權重法回測績效 48
圖 二十八、無股票分類_切線模型_集成學習回測績效 52
圖 二十九、股票分類_切線模型_集成學習回測績效 52
圖 三十、無股票分類_最小風險模型_集成學習回測績效 53
圖 三十一、股票分類_最小風險模型_集成學習回測績效 53
圖 三十二、無股票分類_等權重法_集成學習回測績效 54
圖 三十三、股票分類_等權重法_集成學習回測績效 54
圖 三十四、行業別與大盤績效回測比較圖 58
圖 三十六、股票分類_法一_切線模型集成學習回測績效 59
圖 三十七、股票分類_法一_最小風險模型集成學習回測績效 60
圖 三十八、股票分類_法一_等權重法集成學習回測績效 61
圖 三十九、股票分類_法二_切線模型集成學習回測績效 62
圖 四十、股票分類_法二_最小風險模型集成學習回測績效 63
圖 四十一、所有指標_行業別與大盤績效回測比較圖 64
圖 四十二、所有指標_股票分類_法一_切線模型集成學習回測績效 65
圖 四十三、所有指標_股票分類_法一_最小風險模型集成學習回測績效 66
圖 四十四、所有指標_股票分類_法一_等權重法集成學習回測績效 67
圖 四十五、所有指標_股票分類_法二_切線模型集成學習回測績效 68
圖 四十六、所有指標_股票分類_法二_最小風險模型集成學習回測績效 69
zh_TW
dc.format.extent 5928413 bytes-
dc.format.mimetype application/pdf-
dc.source.uri (資料來源) http://thesis.lib.nccu.edu.tw/record/#G0110358028en_US
dc.subject (關鍵詞) 圍繞中心點分類zh_TW
dc.subject (關鍵詞) 動態時間扭曲zh_TW
dc.subject (關鍵詞) 機器學習zh_TW
dc.subject (關鍵詞) 台灣行業別指數zh_TW
dc.subject (關鍵詞) 資產配置zh_TW
dc.subject (關鍵詞) 股票分類zh_TW
dc.subject (關鍵詞) Partitioning Around Medoidsen_US
dc.subject (關鍵詞) Dynamic Time Warpingen_US
dc.subject (關鍵詞) Machine Learningen_US
dc.subject (關鍵詞) Taiwan Industry Indexen_US
dc.subject (關鍵詞) Asset Allocationen_US
dc.subject (關鍵詞) Stock Classificationen_US
dc.title (題名) 基於股票分類與強勢行業指數的機器學習資產配置策略zh_TW
dc.title (題名) Machine Learning-Based Asset Allocation Strategy Incorporating Stock Classification and Strong Industry Indexen_US
dc.type (資料類型) thesisen_US
dc.relation.reference (參考文獻) 參考文獻
1. 林文修, & 陳仕哲. (2015). 遺傳演算法在台灣股價趨勢轉折點與波動訊號捕捉之應用. 輔仁管理評論, 22(3), 1-33.

2. 張婷媛. (2022). 利用集成學習及離散小波轉換進行股票預測.

3. Alsubaie, Y., El Hindi, K., & Alsalman, H. (2019). Cost-sensitive prediction of stock price direction: Selection of technical indicators. IEEE Access, 7, 146876-146892.

4. Aqsari, H. W., Prastyo, D. D., & Rahayu, S. P. (2022, December). Clustering Stock Prices of Financial Sector Using K-Means Clustering With Dynamic Time Warping. In 2022 6th International Conference on Information Technology, Information Systems and Electrical Engineering (ICITISEE) (pp. 503-507). IEEE.

5. Aithal, P. K., Geetha, M., Dinesh, U., Savitha, B., & Menon, P. (2023). Real-Time Portfolio Management System Utilizing Machine Learning Techniques. IEEE Access, 11, 32595-32608.

6. Clarke, R., De Silva, H., & Thorley, S. (2006). Minimum-variance portfolios in the US equity market. Journal of Portfolio Management, 33(1), 10.

7. Ding, X., Hao, K., Cai, X., Tang, X. S., Chen, L., & Zhang, H. (2020). A novel similarity measurement and clustering framework for time series based on convolution neural networks. Ieee Access, 8, 173158-173168.

8. Li, M., Zhu, Y., Shen, Y., & Angelova, M. (2023). Clustering-enhanced stock price prediction using deep learning. World Wide Web, 26(1), 207-232.

9. Markowitz, H. (1952). The utility of wealth. Journal of political Economy, 60(2),151-158.
10. Manjoro, W. S., Dhakar, M., & Chaurasia, B. K. (2016, April). Operational analysis of k-medoids and k-means algorithms on noisy data. In 2016 International conference on communication and signal processing (ICCSP) (pp. 1500-1505). IEEE.

11. Medarhri, I., Hosni, M., Nouisser, N., Chakroun, F., & Najib, K. (2022, October). Predicting Stock Market Price Movement using Machine Learning Techniques. In 2022 8th International Conference on Optimization and Applications (ICOA) (pp. 1-5). IEEE.

12. Sinatrya, N. S., & Wardhani, L. K. (2018, August). Analysis of K-Means and K-Medoids’s Performance Using Big Data Technology. In 2018 6th International Conference on Cyber and IT Service Management (CITSM) (pp. 1-5). IEEE.

13. Zhang, X., & Chen, W. (2019, July). Stock Selection Based on Extreme Gradient Boosting. In 2019 Chinese Control Conference (CCC) (pp. 8926-8931). IEEE.
zh_TW