| 摘要: | 本研究探討了 iTransformer 模型在股票市場預測中的適用性與有效性,並將其與傳統 Transformer 及 LSTM 模型進行比較。研究資料取自 Yahoo Finance,使用 Apple Inc. (AAPL) 自 2018 年 1 月 2 日至 2024 年 11 月 8 日之歷史股票數據,涵蓋共 1,726 個交易日。經由特徵工程生成 17 項預測變量,主要包括技術指標、小波變換與時間協變量,並將資料依 80%:10%:10% 比例切分為訓練集、驗證集與測試集。 
 本研究設計三項實驗以驗證 : (1) iTransformer 在股票價格預測中是否能有效捕捉時間依賴性; (2) 不同特徵組合對模型性能的影響, 結果顯示 Transformer 及 LSTM 於加入技術指標、小波變換與時間協變量後預測準確度顯著提升, 而 iTransformer 對特徵選擇具有較高魯棒性; (3) 輸入–輸出時間窗口配置之分析,證實 iTransformer 在多步預測任務中表現穩定, 且優於基準模型。
 
 實驗結果顯示,iTransformer 僅以 13.7K 參數即達到更高的訓練效率,並在多步預測任務中展現卓越性能(例如,10 天輸入與 1 天輸出窗口下 \(\mathrm{R}^2 = 0.9798\))。研究結論認為,iTransformer 在處理高波動性股票數據時具有優異的預測能力與魯棒性,為量化交易策略與決策提供新思路。未來研究可拓展方向包括:擴大股票樣本量、調整資料收集期間、納入更多市場指標,以及結合語言模型進行情緒分析。;This study investigates the applicability and effectiveness of the iTransformer model for stock market forecasting and compares its performance with the standard Transformer and LSTM models. We used historical stock data for Apple Inc. (AAPL) from January 2, 2018 to November 8, 2024, obtained from Yahoo Finance, covering 1,726 trading days. Through feature engineering, including technical indicators, wavelet transforms, and time covariates, we generate 17 predictive variables. The dataset is divided into training, validation, and test sets in a 80\%:10\%:10\% ratio.
 
 Three experiments are conducted to validate: (1) the ability of iTransformer to capture temporal dependencies in stock price prediction ; (2) the impact of different feature combinations on model performance, showing that Transformer and LSTM benefit significantly from the inclusion of technical indicators, wavelet transformed features, and time covariates, while iTransformer exhibits greater robustness to feature selection ; and (3) the effect of input–output window configurations, demonstrating that iTransformer delivers stable multi-step forecasting performance that outperforms the baseline models.
 
 Our results indicate that iTransformer, with only 13.7K parameters, achieves higher training efficiency and superior multi-step forecasting accuracy (e.g., \(\mathrm{R}^2 = 0.9798\) for a 10-day input, 1-day output window). We conclude that iTransformer provides remarkable predictive power and robustness when dealing with highly volatile stock data, offering new opportunities for quantitative trading strategies and decision making. Future research directions include expanding the stock sample set, adjusting the data collection period, incorporating additional market indicators, and integrating language models for sentiment analysis.
 |