Publications-Theses
Article View/Open
Publication Export
-
Google ScholarTM
NCCU Library
Citation Infomation
Related Publications in TAIR
題名 融合新聞情緒分析與結構化狀態空間模型的多重輸入股價預測
Multi-Input Stock Price Forecasting Integrating News Sentiment Analysis and Structured State Space Models作者 陳竑宇
Chen, Hong-Yu貢獻者 張宏慶
Jang, Hung-Chin
陳竑宇
Chen, Hong-Yu關鍵詞 股價預測
Mamba
新聞情緒分析
結構化狀態空間模型
多模態輸入
Stock Price Forecasting
Mamba
News Sentiment Analysis
Structured State Space Model
Multi-modal Input日期 2025 上傳時間 1-Sep-2025 16:20:03 (UTC+8) 摘要 隨著金融科技與人工智慧的快速發展,運用機器學習模型進行股價預測成為熱門研究領域。然而,傳統深度學習架構如 LSTM 或 Transformer 在處理長時間序列與整合非結構化新聞資料時,仍存在一定侷限。為提升預測準確性與模型表現,本研究引入選擇性遞迴機制與高推理效率的結構化狀態空間模型 Mamba,並設計融合中文新聞情緒分析與多重股價特徵的預測架構:Mamba-Stock 模型。 本研究以臺灣證券交易所上市之 1,020 檔股票為實驗對象,結合每日股價結構化特徵與新聞情緒特徵,對未來一天的股價進行預測。新聞資料來自《經濟日報》,經翻譯與情緒分析後轉化為每日聚合的情緒分數,並與股價資料對齊輸入模型。同時,本研究設計多組實驗,包含是否加入新聞、特徵選擇策略 (SelectKBest、Random Forest、無特徵挑選) 與不同超參數組合,進行共計 11,976 次訓練與預測實驗。 實驗結果顯示,Mamba-Stock 模型具備高度穩定性與預測準確率,在加入新聞特徵的情境下,平均 R² 提升 0.158,並顯著降低 MAE 與 MAPE。中位 R² 高達 0.9999,驗證了新聞情緒對股價預測的有效貢獻。整體而言,本研究提出具備高度可擴展性與實務應用潛力的預測系統,並證明 Mamba 架構能有效處理結構化與非結構化的資料融合,為金融時間序列預測領域提供嶄新解方。
With the rapid advancement of financial technology and artificial intelligence, stock price forecasting using machine learning models has become a prominent area of research. Traditional deep learning models, such as LSTM and Transformer, face challenges in handling long-term dependencies and integrating unstructured data like news texts. To enhance predictive accuracy and efficiency, this study introduces the Structured State Space Model (SSM) architecture—Mamba—featuring selective recurrence and high inference efficiency. We propose a novel multi-input forecasting framework named Mamba-Stock, integrating both structured market features and unstructured news sentiment. Using a dataset of 1,020 listed companies from the Taiwan Stock Exchange, the model incorporates daily structured stock features and aggregated sentiment features extracted from translated and analyzed financial news articles from Economic Daily News. A total of 11,976 forecasting experiments were conducted under different configurations, including the presence of news, feature selection methods (SelectKBest, Random Forest, or without feature selection) , and hyperparameter combinations. The results demonstrate that the Mamba-Stock model delivers stable and accurate predictions. In experiments that incorporated news features, the average R² improved by 0.158, with notable reductions in MAE and MAPE. The median R² reached 0.9999, confirming the significant contribution of news sentiment to predictive performance. This study presents a scalable and practical forecasting system, highlighting Mamba’s capability to effectively integrate structured and unstructured data, offering new insights into time series modeling for financial applications.參考文獻 [1] Bollen, J., Mao, H., & Zeng, X. (2011) . Twitter mood predicts the stock market. Journal of Computational Science, 2 (1) , 1–8. https://doi.org/10.1016/j.jocs.2010.12.007. [2] Adebiyi, A. A., Adewumi, A. O., & Ayo, C. K. (2014). Stock Price Prediction Using the ARIMA Model. 2014 UKSim-AMSS 16th International Conference on Computer Modelling and Simulation, 106–112.IEEE. https://doi.org/10.1109/UKSim.2014.67. [3] Poon, S.-H., & Granger, C. W. J. (2003). Forecasting Volatility in Financial Markets: A Review. Journal of Economic Literature, 41(2), 478–539. https://doi.org/10.1257/jel.41.2.478. [4] Dahal, K. R., Pokhrel, N. R., Gaire, S., Mahatara, S., Joshi, R. P., Gupta, A., Banjade, H. R., & Joshi, J. (2023) . A comparative study on effect of news sentiment on stock price prediction with deep learning architecture. PLOS ONE, 18 (4) , e0284695. https://doi.org/10.1371/journal.pone.0284695. [5] Tian, L., Li, F., Sun, Y., & Guo, Y. (2021) . Forecast of LSTM-XGBoost in stock price based on Bayesian optimization. Intelligent Automation & Soft Computing, 29 (3) , 855–868. https://doi.org/10.32604/iasc.2021.016805. [6] Fazlija, A., & Harder, S. (2022) . Using Financial News Sentiment for Stock Price Direction Prediction. Mathematics 10, 13 (2022) . https://doi.org/10.3390/math10132156. [7] Fischer, T., & Krauss, C. (2018) . Deep learning with long short-term memory networks for financial market predictions. European Journal of Operational Research, 270 (2) , 654–669. https://doi.org/10.1016/j.ejor.2017.11.054. [8] Grootendorst, M. (2024) . A visual guide to Mamba and state space models. Retrieved from https://www.maartengrootendorst.com/blog/mamba/. [9] Albert Gu, Tri Dao. (2023) . Mamba: Linear-Time sequence modeling with selective state spaces. arXiv Preprint, arXiv:2312.00752. https://arXiv.org/abs/2312.00752. [10] Albert Gu, Karan Goel, Christopher Ré (2022) . Efficiently modeling long sequences with structured state spaces. International Conference on Learning Representations (ICLR) . https://openreview.net/forum?id=uYLFoz1vlAC. [11] Saberironaghi, M., Ren, J., & Saberironaghi, A. (2025). Stock market prediction using machine learning and deep learning techniques: A review. AppliedMath, 5(3), 76. https://doi.org/10.3390/appliedmath5030076. [12] Kalman, R. E. (1960) . A new approach to linear filtering and prediction problems. Journal of Basic Engineering, 82 (1) , 35-45. https://doi.org/10.1115/1.3662552. [13] Li, Q., Kamaruddin, N., Yuhaniz, S. S., & Al-Jaifi, H. A. A. (2024) . Forecasting stock prices changes using long-short term memory neural network with symbolic genetic programming. Scientific Reports, 14, Article 422. https://doi.org/10.1038/s41598-023-50783-0. [14] Lu, C., Schroecker, Y., Gu, A., Parisotto, E., Foerster, J., Singh, S., & Behbahani, F. (2023) . Structured state space models for in-context reinforcement learning. In Advances in Neural Information Processing Systems. https://doi.org/10.48550/arXiv.2303.03982. [15] Mohapatra, S., Mukherjee, R., Roy, A., Sengupta, A., & Puniyani, A. (2022) . Can ensemble machine learning methods predict stock returns for Indian banks using technical indicators? Journal of Risk and Financial Management, 15 (8) , 350. https://doi.org/10.3390/jrfm15080350. [16] Nelson, D. M. Q., Pereira, A. C. M., & de Oliveira, R. A. (2017).Stock market's price movement prediction with LSTM neural networks. International Joint Conference on Neural Networks (IJCNN), 1419–1426. IEEE. https://doi.org/10.1109/IJCNN.2017.7966019. [17] Peng, J., Yang, M., Zhang, Q., & Li, X. (2025) . S4M: S4 for multivariate time series forecasting with missing values. arXiv. https://doi.org/10.48550/arXiv.2503.00900. [18] Zhuangwei Shi (2024) . MambaStock: Selective state space model for stock prediction. arXiv preprint, arXiv:2402.18959. https://arXiv.org/abs/2402.18959. [19] Somvanshi, S., Islam, M. M., Mimi, M. S., Polock, S. B. B., Chhetri, G., & Das, S. (2025) . From S4 to Mamba: A comprehensive survey on structured state space models. arXiv. https://doi.org/10.48550/arXiv.2503.18970. [20] 郝沛毅、歐仁彬、黃天受、林振穎、吳建生(2018)。透過新聞文章預測股價漲跌趨勢-結合情緒分析、主題模型與模糊支持向量機。中華民國資訊管理學報,第二十五卷,第四期,頁 363-396。 [21] 郭鎮宇(2019)。用長短期記憶模型預測台灣加權股價指數期貨。國立臺灣大學社會科學院經濟學研究所碩士論文。 [22] 王英全 (2024)。應用ChatGPT與情感分析於預測股價走勢:以台灣50指數成分股為例國立陽明交通大學資訊學院碩士在職專班碩士論文。 [23] 王懷德 (2022)。新聞情緒對股價報酬的預測能力。國立臺灣大學資訊工程學研究所碩士論文。 [24] 林怡汝 (2022)。以機器學習預測元大臺灣50的股價。國立臺灣大學國際企業學研究所碩士論文。 [25] 劉俞含(2018)。XGBoost模型、隨機森林模型、彈性網模型於股價指數趨勢之預測—以台灣、日本、美國為例。國立中山大學財務管理學系研究所碩士論文。 [26] 洪君緯 (2016)。隨機森林法則預測台灣股價指數趨勢之探討。靜宜大學財務與計算數學系碩士論文。 [27] 張飛鵬、徐一雄、陳曦、周勇 (2024)。基於新聞文本情緒的區間值股票回報預測研究。計量經濟學報, 4 (1) , 204–230。https://doi.org/10.12012/CJoE2023-0031。 描述 碩士
國立政治大學
資訊科學系碩士在職專班
112971015資料來源 http://thesis.lib.nccu.edu.tw/record/#G0112971015 資料類型 thesis dc.contributor.advisor 張宏慶 zh_TW dc.contributor.advisor Jang, Hung-Chin en_US dc.contributor.author (Authors) 陳竑宇 zh_TW dc.contributor.author (Authors) Chen, Hong-Yu en_US dc.creator (作者) 陳竑宇 zh_TW dc.creator (作者) Chen, Hong-Yu en_US dc.date (日期) 2025 en_US dc.date.accessioned 1-Sep-2025 16:20:03 (UTC+8) - dc.date.available 1-Sep-2025 16:20:03 (UTC+8) - dc.date.issued (上傳時間) 1-Sep-2025 16:20:03 (UTC+8) - dc.identifier (Other Identifiers) G0112971015 en_US dc.identifier.uri (URI) https://nccur.lib.nccu.edu.tw/handle/140.119/159299 - dc.description (描述) 碩士 zh_TW dc.description (描述) 國立政治大學 zh_TW dc.description (描述) 資訊科學系碩士在職專班 zh_TW dc.description (描述) 112971015 zh_TW dc.description.abstract (摘要) 隨著金融科技與人工智慧的快速發展,運用機器學習模型進行股價預測成為熱門研究領域。然而,傳統深度學習架構如 LSTM 或 Transformer 在處理長時間序列與整合非結構化新聞資料時,仍存在一定侷限。為提升預測準確性與模型表現,本研究引入選擇性遞迴機制與高推理效率的結構化狀態空間模型 Mamba,並設計融合中文新聞情緒分析與多重股價特徵的預測架構:Mamba-Stock 模型。 本研究以臺灣證券交易所上市之 1,020 檔股票為實驗對象,結合每日股價結構化特徵與新聞情緒特徵,對未來一天的股價進行預測。新聞資料來自《經濟日報》,經翻譯與情緒分析後轉化為每日聚合的情緒分數,並與股價資料對齊輸入模型。同時,本研究設計多組實驗,包含是否加入新聞、特徵選擇策略 (SelectKBest、Random Forest、無特徵挑選) 與不同超參數組合,進行共計 11,976 次訓練與預測實驗。 實驗結果顯示,Mamba-Stock 模型具備高度穩定性與預測準確率,在加入新聞特徵的情境下,平均 R² 提升 0.158,並顯著降低 MAE 與 MAPE。中位 R² 高達 0.9999,驗證了新聞情緒對股價預測的有效貢獻。整體而言,本研究提出具備高度可擴展性與實務應用潛力的預測系統,並證明 Mamba 架構能有效處理結構化與非結構化的資料融合,為金融時間序列預測領域提供嶄新解方。 zh_TW dc.description.abstract (摘要) With the rapid advancement of financial technology and artificial intelligence, stock price forecasting using machine learning models has become a prominent area of research. Traditional deep learning models, such as LSTM and Transformer, face challenges in handling long-term dependencies and integrating unstructured data like news texts. To enhance predictive accuracy and efficiency, this study introduces the Structured State Space Model (SSM) architecture—Mamba—featuring selective recurrence and high inference efficiency. We propose a novel multi-input forecasting framework named Mamba-Stock, integrating both structured market features and unstructured news sentiment. Using a dataset of 1,020 listed companies from the Taiwan Stock Exchange, the model incorporates daily structured stock features and aggregated sentiment features extracted from translated and analyzed financial news articles from Economic Daily News. A total of 11,976 forecasting experiments were conducted under different configurations, including the presence of news, feature selection methods (SelectKBest, Random Forest, or without feature selection) , and hyperparameter combinations. The results demonstrate that the Mamba-Stock model delivers stable and accurate predictions. In experiments that incorporated news features, the average R² improved by 0.158, with notable reductions in MAE and MAPE. The median R² reached 0.9999, confirming the significant contribution of news sentiment to predictive performance. This study presents a scalable and practical forecasting system, highlighting Mamba’s capability to effectively integrate structured and unstructured data, offering new insights into time series modeling for financial applications. en_US dc.description.tableofcontents 第一章 緒論 1 1.1 研究背景 1 1.2 研究動機 2 1.3 研究目標 2 1.4 研究流程 3 第二章 相關研究 5 2.1 股票價格預測的常見機器學習方法與應用成效 5 2.2 結構化狀態空間模型 (SSM) 與 Mamba 序列架構 6 2.3 Mamba-Stock:結構化狀態空間模型應用於股價預測的實證研究 7 2.4 結合新聞情緒分析與股票預測的研究成果 9 2.5 小結 10 第三章 研究方法 12 3.1 結構化狀態空間模型理論 (State Space Models) 12 3.2 Mamba 模型架構與數學細節 14 3.2.1 Mamba 模型概述 14 3.2.2 Mamba 選擇性狀態空間運算機制 14 3.2.3 SelectiveScan 與硬體感知之高效計算 15 3.2.4 Mamba 模型架構細節 16 3.2.5 Mamba 模型之數學意涵與優勢 16 3.3 Mamba-Stock模型架構 17 3.3.1 模型總體結構 17 3.3.2 Mamba 模型堆疊結構 18 3.3.3 MambaBlock 模組細節 18 3.3.4 SSM 模組核心:選擇性狀態空間更新 19 3.3.5 自回歸推論與快取設計 19 3.3.6 PyTorch 架構實作摘要 20 3.4 新聞文本情緒分析方法 20 3.4.1 新聞文本前處理與翻譯 21 3.4.2 文本摘要生成 (Text Summarization) 21 3.4.3 情緒向量化技術 (Sentiment Vectorization) 22 3.5 實驗資料準備與特徵工程 22 3.5.1 股票資料前處理 22 3.5.2 特徵工程設計 23 3.5.3 特徵資料標準化 24 3.6 模型評估方法與結果分析設計 24 3.6.1 預測任務設定 25 3.6.2 評估指標設計 25 3.6.3 評估流程總結 27 第四章 實驗過程與結果分析 28 4.1 實驗環境架構 28 4.2 實驗架構說明 29 4.2.1 整體專案程式架構 30 4.2.2 實驗設計與訓練流程 30 4.3 實驗資料說明 32 4.3.1 股價資料說明 32 4.3.2 新聞資料說明 33 4.3.3 特徵缺漏處理與新聞衍生變數設計 34 4.4 上市股票實驗結果分析 35 4.4.1 上市股票實驗總覽 35 4.4.2 上市股票模型整體預測表現 37 4.4.3 上市股票模型中新聞資訊的影響分析 38 4.4.4 特徵選擇方法與超參數組合影響 39 4.4.5 最佳與最差預測樣本分析 41 4.4.6 模型失效情形分析 (R² < 0) 51 4.4.7 模型穩定性較低之個股識別 51 4.4.8 小結 52 第五章 結論與未來研究 54 5.1 結論 54 5.2 研究貢獻 55 5.3 未來研究方向 56 參考文獻 58 zh_TW dc.format.extent 1647619 bytes - dc.format.mimetype application/pdf - dc.source.uri (資料來源) http://thesis.lib.nccu.edu.tw/record/#G0112971015 en_US dc.subject (關鍵詞) 股價預測 zh_TW dc.subject (關鍵詞) Mamba zh_TW dc.subject (關鍵詞) 新聞情緒分析 zh_TW dc.subject (關鍵詞) 結構化狀態空間模型 zh_TW dc.subject (關鍵詞) 多模態輸入 zh_TW dc.subject (關鍵詞) Stock Price Forecasting en_US dc.subject (關鍵詞) Mamba en_US dc.subject (關鍵詞) News Sentiment Analysis en_US dc.subject (關鍵詞) Structured State Space Model en_US dc.subject (關鍵詞) Multi-modal Input en_US dc.title (題名) 融合新聞情緒分析與結構化狀態空間模型的多重輸入股價預測 zh_TW dc.title (題名) Multi-Input Stock Price Forecasting Integrating News Sentiment Analysis and Structured State Space Models en_US dc.type (資料類型) thesis en_US dc.relation.reference (參考文獻) [1] Bollen, J., Mao, H., & Zeng, X. (2011) . Twitter mood predicts the stock market. Journal of Computational Science, 2 (1) , 1–8. https://doi.org/10.1016/j.jocs.2010.12.007. [2] Adebiyi, A. A., Adewumi, A. O., & Ayo, C. K. (2014). Stock Price Prediction Using the ARIMA Model. 2014 UKSim-AMSS 16th International Conference on Computer Modelling and Simulation, 106–112.IEEE. https://doi.org/10.1109/UKSim.2014.67. [3] Poon, S.-H., & Granger, C. W. J. (2003). Forecasting Volatility in Financial Markets: A Review. Journal of Economic Literature, 41(2), 478–539. https://doi.org/10.1257/jel.41.2.478. [4] Dahal, K. R., Pokhrel, N. R., Gaire, S., Mahatara, S., Joshi, R. P., Gupta, A., Banjade, H. R., & Joshi, J. (2023) . A comparative study on effect of news sentiment on stock price prediction with deep learning architecture. PLOS ONE, 18 (4) , e0284695. https://doi.org/10.1371/journal.pone.0284695. [5] Tian, L., Li, F., Sun, Y., & Guo, Y. (2021) . Forecast of LSTM-XGBoost in stock price based on Bayesian optimization. Intelligent Automation & Soft Computing, 29 (3) , 855–868. https://doi.org/10.32604/iasc.2021.016805. [6] Fazlija, A., & Harder, S. (2022) . Using Financial News Sentiment for Stock Price Direction Prediction. Mathematics 10, 13 (2022) . https://doi.org/10.3390/math10132156. [7] Fischer, T., & Krauss, C. (2018) . Deep learning with long short-term memory networks for financial market predictions. European Journal of Operational Research, 270 (2) , 654–669. https://doi.org/10.1016/j.ejor.2017.11.054. [8] Grootendorst, M. (2024) . A visual guide to Mamba and state space models. Retrieved from https://www.maartengrootendorst.com/blog/mamba/. [9] Albert Gu, Tri Dao. (2023) . Mamba: Linear-Time sequence modeling with selective state spaces. arXiv Preprint, arXiv:2312.00752. https://arXiv.org/abs/2312.00752. [10] Albert Gu, Karan Goel, Christopher Ré (2022) . Efficiently modeling long sequences with structured state spaces. International Conference on Learning Representations (ICLR) . https://openreview.net/forum?id=uYLFoz1vlAC. [11] Saberironaghi, M., Ren, J., & Saberironaghi, A. (2025). Stock market prediction using machine learning and deep learning techniques: A review. AppliedMath, 5(3), 76. https://doi.org/10.3390/appliedmath5030076. [12] Kalman, R. E. (1960) . A new approach to linear filtering and prediction problems. Journal of Basic Engineering, 82 (1) , 35-45. https://doi.org/10.1115/1.3662552. [13] Li, Q., Kamaruddin, N., Yuhaniz, S. S., & Al-Jaifi, H. A. A. (2024) . Forecasting stock prices changes using long-short term memory neural network with symbolic genetic programming. Scientific Reports, 14, Article 422. https://doi.org/10.1038/s41598-023-50783-0. [14] Lu, C., Schroecker, Y., Gu, A., Parisotto, E., Foerster, J., Singh, S., & Behbahani, F. (2023) . Structured state space models for in-context reinforcement learning. In Advances in Neural Information Processing Systems. https://doi.org/10.48550/arXiv.2303.03982. [15] Mohapatra, S., Mukherjee, R., Roy, A., Sengupta, A., & Puniyani, A. (2022) . Can ensemble machine learning methods predict stock returns for Indian banks using technical indicators? Journal of Risk and Financial Management, 15 (8) , 350. https://doi.org/10.3390/jrfm15080350. [16] Nelson, D. M. Q., Pereira, A. C. M., & de Oliveira, R. A. (2017).Stock market's price movement prediction with LSTM neural networks. International Joint Conference on Neural Networks (IJCNN), 1419–1426. IEEE. https://doi.org/10.1109/IJCNN.2017.7966019. [17] Peng, J., Yang, M., Zhang, Q., & Li, X. (2025) . S4M: S4 for multivariate time series forecasting with missing values. arXiv. https://doi.org/10.48550/arXiv.2503.00900. [18] Zhuangwei Shi (2024) . MambaStock: Selective state space model for stock prediction. arXiv preprint, arXiv:2402.18959. https://arXiv.org/abs/2402.18959. [19] Somvanshi, S., Islam, M. M., Mimi, M. S., Polock, S. B. B., Chhetri, G., & Das, S. (2025) . From S4 to Mamba: A comprehensive survey on structured state space models. arXiv. https://doi.org/10.48550/arXiv.2503.18970. [20] 郝沛毅、歐仁彬、黃天受、林振穎、吳建生(2018)。透過新聞文章預測股價漲跌趨勢-結合情緒分析、主題模型與模糊支持向量機。中華民國資訊管理學報,第二十五卷,第四期,頁 363-396。 [21] 郭鎮宇(2019)。用長短期記憶模型預測台灣加權股價指數期貨。國立臺灣大學社會科學院經濟學研究所碩士論文。 [22] 王英全 (2024)。應用ChatGPT與情感分析於預測股價走勢:以台灣50指數成分股為例國立陽明交通大學資訊學院碩士在職專班碩士論文。 [23] 王懷德 (2022)。新聞情緒對股價報酬的預測能力。國立臺灣大學資訊工程學研究所碩士論文。 [24] 林怡汝 (2022)。以機器學習預測元大臺灣50的股價。國立臺灣大學國際企業學研究所碩士論文。 [25] 劉俞含(2018)。XGBoost模型、隨機森林模型、彈性網模型於股價指數趨勢之預測—以台灣、日本、美國為例。國立中山大學財務管理學系研究所碩士論文。 [26] 洪君緯 (2016)。隨機森林法則預測台灣股價指數趨勢之探討。靜宜大學財務與計算數學系碩士論文。 [27] 張飛鵬、徐一雄、陳曦、周勇 (2024)。基於新聞文本情緒的區間值股票回報預測研究。計量經濟學報, 4 (1) , 204–230。https://doi.org/10.12012/CJoE2023-0031。 zh_TW
