Publications-Theses
Article View/Open
Publication Export
-
Google ScholarTM
NCCU Library
Citation Infomation
Related Publications in TAIR
題名 基於多特徵時間序列分群之股價預測
Stock Price Prediction Based on Multivariate Times Series Clustering作者 林亞璇
Lin, Ya-Hsuan貢獻者 黃泓智
林亞璇
Lin, Ya-Hsuan關鍵詞 多維時間序列分群
LSTM
股價預測
機器學習
資產配置
Multivariate Time Series Clustering
LSTM
Stock Price Prediction
Machine Learning
Asset Allocation日期 2025 上傳時間 1-Sep-2025 16:03:14 (UTC+8) 摘要 本研究旨在提出一種整合多特徵時間序列相似性之股票分群方法,結合機器學習建立群內訓練股價預測模型,並且進一步將預測結果應用於投資組合建構。本文使用臺灣上市公司自2019年至2024年之股價與財務資料,先透過動態時間校正距離與歐式距離衡量多個價量資訊或財務比率的時間序列相似性,並以k-medoids演算法進行股票分群,搭配滾動式更新機制反映市場結構之變化,接著於各群內訓練長短期記憶網路(LSTM)模型預測隔日與20日後收盤價,並根據預測結果挑選預期報酬最高之個股依三種不同資產配置策略建構投資組合,回測其績效。 實證結果顯示,分群後群內訓練模型在預測準確性方面整體優於不分群模型,能有效降低預測誤差,尤其在以價量資訊分群並設定分5群時表現最佳,回測績效方面,分群模型所建構之投資組合於多數情境皆能優於基準模型與大盤。綜合而言,本研究驗證多特徵時間序列分群方法能有效降低資料異質性,提升預測穩定性與投資表現,為股價預測與選股策略提供可行的整合方法。
This study proposes a stock clustering framework based on the similarity of multivariate time series features, which is integrated with deep learning models for within-cluster stock price prediction. The predictions are further applied to stock selection and portfolio construction. Using data from Taiwan-listed companies between 2019 to 2024, the study computes time series similarity—based on either daily price-volume data or quarterly financial ratios—using Dynamic Time Warping and Euclidean Distance, and applies the k-medoids algorithm for clustering. A rolling mechanism updates cluster assignments annually to reflect structural market changes. Within each cluster, Long Short-Term Memory models are trained to forecast stock prices for the next day and 20 days ahead. Predicted returns are ranked to identify top-performing stocks, which are then used to construct investment portfolios under three asset allocation strategies. Empirical results show that clustered models outperform non-clustered baselines in forecasting accuracy, especially when using price-volume features with five clusters. In terms of investment performance, portfolios constructed from the clustered models consistently outperform benchmark models and the market index across most scenarios. Overall, the study demonstrates that multivariate time series clustering effectively reduces data heterogeneity, enhances predictive stability, and improves practical investment outcomes.參考文獻 Aithal, P. K., Geetha, M., U, D., Savitha, B., & Menon, P. (2023). Real-Time Portfolio Management System Utilizing Machine Learning Techniques. IEEE Access, 11, 32595–32608. https://doi.org/10.1109/access.2023.3263260 Amini, S., Hudson, R., Urquhart, A., & Wang, J. (2021). Nonlinearity everywhere: implications for empirical finance, technical analysis and value at risk. The European Journal of Finance, 27(13), 1326–1349. https://doi.org/10.1080/1351847x.2021.1900888 Atsalakis, G. S., & Valavanis, K. P. (2009). Surveying stock market forecasting techniques – Part II: Soft computing methods. Expert Systems with Applications, 36(3), 5932–5941. https://doi.org/10.1016/j.eswa.2008.07.006 Bandara, K., Bergmeir, C., & Smyl, S. (2020). Forecasting across time series databases using recurrent neural networks on groups of similar series: A clustering approach. Expert Systems with Applications, 140. https://doi.org/10.1016/j.eswa.2019.112896 Chaweewanchon, A., & Chaysiri, R. (2022). Markowitz Mean-Variance Portfolio Optimization with Predictive Stock Selection Using Machine Learning. International Journal of Financial Studies, 10(3). https://doi.org/10.3390/ijfs10030064 Hyndman, R. J., Wang, E., & Laptev, N. (2015). Large-Scale Unusual Time Series Detection 2015 IEEE International Conference on Data Mining Workshop (ICDMW), Li, M., Zhu, Y., Shen, Y., & Angelova, M. (2023). Clustering-enhanced stock price prediction using deep learning. World Wide Web, 26(1), 207–232. https://doi.org/10.1007/s11280-021-01003-0 Markowitz, H. (1952). Portfolio Selection. The Journal of Finance, 7(1), 77–91. https://doi.org/10.2307/2975974 Medarhri, I., Hosni, M., Nouisser, N., Chakroun, F., & Najib, K. (2022). Predicting Stock Market Price Movement using Machine Learning Techniques 2022 8th International Conference on Optimization and Applications (ICOA), Phuoc, T., Anh, P. T. K., Tam, P. H., & Nguyen, C. V. (2024). Applying machine learning algorithms to predict the stock price trend in the stock market – The case of Vietnam. Humanities and Social Sciences Communications, 11(1). https://doi.org/10.1057/s41599-024-02807-x Savitzky, A. (1964). Smoothing and differentiation of data by simplified least squares procedures. Analytical chemistry, 36(8), 1627–1639. https://doi.org/10.1021/ac60214a047 Shynkevich, Y., McGinnity, T. M., Coleman, S. A., Belatreche, A., & Li, Y. (2017). Forecasting price movements using technical indicators: Investigating the impact of varying input window length. Neurocomputing, 264, 71–88. https://doi.org/10.1016/j.neucom.2016.11.095 Vásquez Sáenz, J., Quiroga, F. M., & Bariviera, A. F. (2023). Data vs. information: Using clustering techniques to enhance stock returns forecasting. International Review of Financial Analysis, 88. https://doi.org/10.1016/j.irfa.2023.102657 Wang, X., Yang, K., & Liu, T. (2021). Stock Price Prediction Based on Morphological Similarity Clustering and Hierarchical Temporal Memory. IEEE Access, 9, 67241–67248. https://doi.org/10.1109/access.2021.3077004 Warren Liao, T. (2005). Clustering of time series data—a survey. Pattern Recognition, 38(11), 1857–1874. https://doi.org/10.1016/j.patcog.2005.01.025 Yu, P., & Yan, X. (2019). Stock price prediction based on deep neural networks. Neural Computing and Applications, 32(6), 1609–1628. https://doi.org/10.1007/s00521-019-04212-x 描述 碩士
國立政治大學
風險管理與保險學系
112358017資料來源 http://thesis.lib.nccu.edu.tw/record/#G0112358017 資料類型 thesis dc.contributor.advisor 黃泓智 zh_TW dc.contributor.author (Authors) 林亞璇 zh_TW dc.contributor.author (Authors) Lin, Ya-Hsuan en_US dc.creator (作者) 林亞璇 zh_TW dc.creator (作者) Lin, Ya-Hsuan en_US dc.date (日期) 2025 en_US dc.date.accessioned 1-Sep-2025 16:03:14 (UTC+8) - dc.date.available 1-Sep-2025 16:03:14 (UTC+8) - dc.date.issued (上傳時間) 1-Sep-2025 16:03:14 (UTC+8) - dc.identifier (Other Identifiers) G0112358017 en_US dc.identifier.uri (URI) https://nccur.lib.nccu.edu.tw/handle/140.119/159234 - dc.description (描述) 碩士 zh_TW dc.description (描述) 國立政治大學 zh_TW dc.description (描述) 風險管理與保險學系 zh_TW dc.description (描述) 112358017 zh_TW dc.description.abstract (摘要) 本研究旨在提出一種整合多特徵時間序列相似性之股票分群方法,結合機器學習建立群內訓練股價預測模型,並且進一步將預測結果應用於投資組合建構。本文使用臺灣上市公司自2019年至2024年之股價與財務資料,先透過動態時間校正距離與歐式距離衡量多個價量資訊或財務比率的時間序列相似性,並以k-medoids演算法進行股票分群,搭配滾動式更新機制反映市場結構之變化,接著於各群內訓練長短期記憶網路(LSTM)模型預測隔日與20日後收盤價,並根據預測結果挑選預期報酬最高之個股依三種不同資產配置策略建構投資組合,回測其績效。 實證結果顯示,分群後群內訓練模型在預測準確性方面整體優於不分群模型,能有效降低預測誤差,尤其在以價量資訊分群並設定分5群時表現最佳,回測績效方面,分群模型所建構之投資組合於多數情境皆能優於基準模型與大盤。綜合而言,本研究驗證多特徵時間序列分群方法能有效降低資料異質性,提升預測穩定性與投資表現,為股價預測與選股策略提供可行的整合方法。 zh_TW dc.description.abstract (摘要) This study proposes a stock clustering framework based on the similarity of multivariate time series features, which is integrated with deep learning models for within-cluster stock price prediction. The predictions are further applied to stock selection and portfolio construction. Using data from Taiwan-listed companies between 2019 to 2024, the study computes time series similarity—based on either daily price-volume data or quarterly financial ratios—using Dynamic Time Warping and Euclidean Distance, and applies the k-medoids algorithm for clustering. A rolling mechanism updates cluster assignments annually to reflect structural market changes. Within each cluster, Long Short-Term Memory models are trained to forecast stock prices for the next day and 20 days ahead. Predicted returns are ranked to identify top-performing stocks, which are then used to construct investment portfolios under three asset allocation strategies. Empirical results show that clustered models outperform non-clustered baselines in forecasting accuracy, especially when using price-volume features with five clusters. In terms of investment performance, portfolios constructed from the clustered models consistently outperform benchmark models and the market index across most scenarios. Overall, the study demonstrates that multivariate time series clustering effectively reduces data heterogeneity, enhances predictive stability, and improves practical investment outcomes. en_US dc.description.tableofcontents 第一章 緒論 1 第一節 研究背景與動機 1 第二節 研究目的 2 第三節 研究流程 3 第四節 研究貢獻 4 第二章 文獻回顧 7 第一節 時間序列相似性衡量與分群預測模型之回顧 7 第二節 機器學習於股價預測之文獻回顧 9 第三節 選用指標之文獻回顧 10 第四節 資產配置策略之文獻回顧 10 第三章 研究方法 12 第一節 研究架構 12 第二節 資料來源與變數設計 13 第三節 多特徵時間序列相似性之計算方法 17 第四節 分群演算法與滾動式機制 19 第五節 機器學習模型 21 第六節 誤差指標說明 25 第七節 資產配置策略 26 第四章 實證結果 30 第一節 分群結果與預測準確性分析 30 第二節 績效回測分析 36 第五章 結論與建議 44 參考文獻 46 附錄一 LSTM模型超參數 48 附錄二 最小風險法完整回測績效 52 附錄三 平均-變異模型完整回測績效 54 zh_TW dc.format.extent 3213982 bytes - dc.format.mimetype application/pdf - dc.source.uri (資料來源) http://thesis.lib.nccu.edu.tw/record/#G0112358017 en_US dc.subject (關鍵詞) 多維時間序列分群 zh_TW dc.subject (關鍵詞) LSTM zh_TW dc.subject (關鍵詞) 股價預測 zh_TW dc.subject (關鍵詞) 機器學習 zh_TW dc.subject (關鍵詞) 資產配置 zh_TW dc.subject (關鍵詞) Multivariate Time Series Clustering en_US dc.subject (關鍵詞) LSTM en_US dc.subject (關鍵詞) Stock Price Prediction en_US dc.subject (關鍵詞) Machine Learning en_US dc.subject (關鍵詞) Asset Allocation en_US dc.title (題名) 基於多特徵時間序列分群之股價預測 zh_TW dc.title (題名) Stock Price Prediction Based on Multivariate Times Series Clustering en_US dc.type (資料類型) thesis en_US dc.relation.reference (參考文獻) Aithal, P. K., Geetha, M., U, D., Savitha, B., & Menon, P. (2023). Real-Time Portfolio Management System Utilizing Machine Learning Techniques. IEEE Access, 11, 32595–32608. https://doi.org/10.1109/access.2023.3263260 Amini, S., Hudson, R., Urquhart, A., & Wang, J. (2021). Nonlinearity everywhere: implications for empirical finance, technical analysis and value at risk. The European Journal of Finance, 27(13), 1326–1349. https://doi.org/10.1080/1351847x.2021.1900888 Atsalakis, G. S., & Valavanis, K. P. (2009). Surveying stock market forecasting techniques – Part II: Soft computing methods. Expert Systems with Applications, 36(3), 5932–5941. https://doi.org/10.1016/j.eswa.2008.07.006 Bandara, K., Bergmeir, C., & Smyl, S. (2020). Forecasting across time series databases using recurrent neural networks on groups of similar series: A clustering approach. Expert Systems with Applications, 140. https://doi.org/10.1016/j.eswa.2019.112896 Chaweewanchon, A., & Chaysiri, R. (2022). Markowitz Mean-Variance Portfolio Optimization with Predictive Stock Selection Using Machine Learning. International Journal of Financial Studies, 10(3). https://doi.org/10.3390/ijfs10030064 Hyndman, R. J., Wang, E., & Laptev, N. (2015). Large-Scale Unusual Time Series Detection 2015 IEEE International Conference on Data Mining Workshop (ICDMW), Li, M., Zhu, Y., Shen, Y., & Angelova, M. (2023). Clustering-enhanced stock price prediction using deep learning. World Wide Web, 26(1), 207–232. https://doi.org/10.1007/s11280-021-01003-0 Markowitz, H. (1952). Portfolio Selection. The Journal of Finance, 7(1), 77–91. https://doi.org/10.2307/2975974 Medarhri, I., Hosni, M., Nouisser, N., Chakroun, F., & Najib, K. (2022). Predicting Stock Market Price Movement using Machine Learning Techniques 2022 8th International Conference on Optimization and Applications (ICOA), Phuoc, T., Anh, P. T. K., Tam, P. H., & Nguyen, C. V. (2024). Applying machine learning algorithms to predict the stock price trend in the stock market – The case of Vietnam. Humanities and Social Sciences Communications, 11(1). https://doi.org/10.1057/s41599-024-02807-x Savitzky, A. (1964). Smoothing and differentiation of data by simplified least squares procedures. Analytical chemistry, 36(8), 1627–1639. https://doi.org/10.1021/ac60214a047 Shynkevich, Y., McGinnity, T. M., Coleman, S. A., Belatreche, A., & Li, Y. (2017). Forecasting price movements using technical indicators: Investigating the impact of varying input window length. Neurocomputing, 264, 71–88. https://doi.org/10.1016/j.neucom.2016.11.095 Vásquez Sáenz, J., Quiroga, F. M., & Bariviera, A. F. (2023). Data vs. information: Using clustering techniques to enhance stock returns forecasting. International Review of Financial Analysis, 88. https://doi.org/10.1016/j.irfa.2023.102657 Wang, X., Yang, K., & Liu, T. (2021). Stock Price Prediction Based on Morphological Similarity Clustering and Hierarchical Temporal Memory. IEEE Access, 9, 67241–67248. https://doi.org/10.1109/access.2021.3077004 Warren Liao, T. (2005). Clustering of time series data—a survey. Pattern Recognition, 38(11), 1857–1874. https://doi.org/10.1016/j.patcog.2005.01.025 Yu, P., & Yan, X. (2019). Stock price prediction based on deep neural networks. Neural Computing and Applications, 32(6), 1609–1628. https://doi.org/10.1007/s00521-019-04212-x zh_TW
