Applying the Temporal Fusion Transformer Model in Stock Price Forecasting: The Cases of VIC, VRE, and VHM
摘要
This study investigates the stock price forecasting capability of three large-cap stocks on the Vietnamese stock market (VIC, VRE, and VHM) by applying the Temporal Fusion Transformer (TFT) model and comparing its performance with two widely used deep learning models: LSTM and BiLSTM. The dataset comprises 1,629 actual trading sessions from July 2, 2018, to December 31, 2024, using input features including stock prices and three common technical indicators: RSI, MACD, and OBV. Experimental results demonstrate that TFT outperforms the benchmarks, achieving a 40% to 50% reduction in MAE compared to LSTM and BiLSTM, while maintaining MAPE below 2% for all stocks. Beyond accuracy, TFT exhibits superior interpretability through its attention mechanism and variable selection network, allowing for clear identification of the importance of each input feature across different stocks and time periods. These findings highlight the potential of TFT not only in enhancing predictive performance but also in supporting personalized investment strategies in emerging markets such as Vietnam.