以 CNN 為基礎之預測模型過度配適問題的實證研究:以臺灣加權股價指數為例


作者
殷壽鏞* (臺北大學經濟學系)
劉軒宇 (臺北大學經濟學系)

Author
Shou-Yung Yin * (Department of Economics, National Taipei University)
Hsuan-Yu Liu (Department of Economics, National Taipei University)

中文摘要
深度學習已廣泛應用於金融預測,然而,模型複雜度、輸入設計與正則化方法如何共同影響模型的一般化能力,特別是在小樣本情境下,仍缺乏充分的實證探討。本文以卷積神經網路 (Convolutional Neural Networks, CNN) 與臺灣證券交易所發行量加權股價指數為研究對象, 針對模型深度與寬度、多種輸入視窗長度、訓練設定,以及兩種預測期 數,進行完整的超參數評估。每一組模型設定皆以多組隨機種子重複估計,並透過模型信賴集合方法評估其預測能力。實證結果顯示,增加模 型深度往往會導致樣本外預測準確度明顯惡化,並伴隨顯著的不穩定 性;相較之下,具有較佳預測能力的模型表現多集中於較淺層的架構, 且這些模型在不同寬度設定下仍具有相對穩健的預測能力。較長的輸入視窗不一定能改善預測表現,反而可能因納入額外雜訊而降低預測準確度。Dropout 並非總能改善模型表現,在較深層架構中甚至可能使預測準確度惡化;即使在加入 dropout 後,具有競爭力的模型仍大多維持在淺層架構。當預測期數延長時,預測準確度會大幅下降,也使模型容量與輸入資料有效資訊含量之間的配適關係更加重要。整體而言,本文結果突顯在深度學習金融預測應用中,必須平衡模型架構容量、輸入維度 與正則化設定,並且除了平均預測準確度之外,也應將不同重複估計下 的穩定性視為核心的實證評估準則。

Abstract
Deep learning is widely used in financial forecasting, yet how model complexity, input design, and regularization jointly affect generalization remains insufficiently documented, especially under small-sample conditions. Using Convolutional Neural Networks and data from the Taiwan Stock Exchange Capitalization Weighted Stock Index, this research conducts an exhaustive hyperparameter evaluation across model depth and width, multiple input-window lengths, training settings, and two forecasting horizons, repeating each configuration under multiple random seeds and assessing statistical competitiveness using a model confidence set procedure. The results show that increasing depth often causes sharp deterioration in out-of-sample accuracy and pronounced instability, whereas competitive performance frequently concentrates in shallow architectures that remain robust across a wide range of widths. Longer input windows do not necessarily improve forecasts and instead might reduce accuracy by introducing additional noise. Dropout does not uniformly improve performance and can worsen accuracy in deeper architectures, while statistically competitive models under dropout remain largely shallow. Extending the forecasting horizon substantially reduces predictive accuracy and increases the importance of matching model capacity to the effective information content of the inputs. Overall, this paper highlights the need to balance architectural capacity, input dimensionality, and regularization and to treat stability across runs as a central empirical criterion alongside average predictive accuracy.

中文關鍵字
深度學習、預測、過度配適、模型複雜度

Keywords
Deep Learning, Forecasting, Overfitting, Model Complexity