A Comparison of Machine Learning and Deep Learning Models for Daily SET Index Forecasting: An End-to-End Prediction Pipeline
Main Article Content
Abstract
This study aims to compare the forecasting performance of traditional statistical models, machine learning models, and deep learning models for daily prediction of the Stock Exchange of Thailand (SET) Index. Eight models were evaluated: naive persistence, ARIMA, Random Forest, XGBoost, and both regression and classification variants of Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) networks. Daily closing price data spanning January 4, 2010 to July 17, 2026 were used, yielding 3,945 trading days after constructing 19 technical indicator features. Data were split chronologically into training (2010-2021), validation (2022-2023), and test (2024-2026) sets. Results show that Random Forest achieved the highest directional accuracy at 51.8%, followed by XGBoost at 50.8%, while all four LSTM/GRU variants achieved directional accuracy between 48.2% and 49.8%, at or below the naive persistence benchmark (49.7%) and coin-flip chance. Only Random Forest and XGBoost numerically exceeded the 50% baseline; a binomial test indicated that this advantage was not statistically significant at the 0.05 level. In terms of price-level error (RMSE, MAPE), most models performed comparably to naive persistence, except ARIMA, which showed markedly higher error. These findings are consistent with the Efficient Market Hypothesis and indicate that model complexity does not guarantee superior forecasting accuracy. In practice, these results suggest that simple tree-ensemble models should be the first choice for SET Index directional forecasting before investing computational resources in more complex deep learning architectures. This study contributes an end-to-end forecasting pipeline that benchmarks diverse model families under identical data and evaluation conditions, offering value to both academic researchers and market practitioners in Thailand.
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
References
O. B. Sezer, M. U. Gudelek, and A. M. Ozbayoglu, "Financial time series forecasting with deep learning: A systematic literature review: 2005-2019," Applied Soft Computing, vol. 90, pp. 106181, May. 2020, doi: 10.1016/j.asoc.2020 .106181.
S. Ahmed, M. M. Alshater, A. El Ammari, and H. Hammami, "Artificial intelligence and machine learning in finance: A bibliometric review," Research in International Business and Finance, vol. 61, pp. 101646, Oct. 2022, doi: 10.1016/j.ribaf.2022.101646.
I. K. Nti, A. F. Adekoya, and B. A. Weyori, "A comprehensive evaluation of ensemble learning for stock-market prediction," Journal of Big Data, vol. 7, pp. 20, 2020, doi: 10.1186/s40537-020-00299-5.
F. Guidi and R. Gupta, "Market efficiency in the ASEAN region: Evidence from multivariate and cointegration tests," Applied Financial Economics, vol. 23, no. 4, pp. 265-274, 2013, doi: 10.1080/09603107.2012.718064.
M. Inthachot, V. Boonjing, and S. Intakosum, "Artificial neural network and genetic algorithm hybrid intelligence for predicting Thai stock price index trend," Computational Intelligence and Neuroscience, vol. 2016, Art. no. 3045254, 2016, doi: 10.1155/2016/3045254.
K. Suphawan, R. Kardkasem, and K. Chaisee, "A Gaussian process regression model for forecasting stock exchange of Thailand," Trends in Sciences, vol. 19, no. 6, pp. 3045, Mar. 2022, doi: 10.48048/tis.2022.3045.
M. Inthachot, V. Boonjing, and S. Intakosum, "Predicting Thai stock index trend using deep neural network based on technical indicators," International Journal of Innovative Research and Scientific Studies, vol. 8, no. 2, pp. 428-435, Mar. 2025, doi: 10.53894/ijirss.v8i2.5191.
S. Makridakis, E. Spiliotis, and V. Assimakopoulos, "The M4 Competition: Results, findings, conclusion and way forward," International Journal of Forecasting, vol. 34, no. 4, pp. 802-808, Oct. 2018, doi: 10.1016/j.ijforecast. 2018.06.001.
S. Makridakis, E. Spiliotis, and V. Assimakopoulos, "The M4 Competition: 100,000 time series and 61 forecasting methods," International Journal of Forecasting, vol. 36, no. 1, pp. 54-74, Jan. 2020, doi: 10.1016/j.ijforecast.2019.04.014.
F. Petropoulos, S. Makridakis, and N. Stylianou, "Forecasting: theory and practice," International Journal of Forecasting, vol. 38, no. 3, pp. 705-871, 2022, doi: 10.1016/j.ijforecast.2021.11.001.
E. F. Fama, "The behavior of stock market prices," The Journal of Business, vol. 38, no. 1, pp. 34-105, 1965, doi: 10.1086/294743.
E. F. Fama, "Efficient capital markets: A review of theory and empirical work," The Journal of Finance, vol. 25, no. 2, pp. 383-417, May. 1970, doi: 10.1111/j.1540-6261.1970.tb00518.x.
R. S. Tsay, Analysis of Financial Time Series, 3rd ed. Hoboken, NJ, USA: John Wiley & Sons, 2010.
G. Ji, J. Yu, K. Hu, J. Xie, and X. Ji, "An adaptive feature selection schema using improved technical indicators for predicting stock price movements," Expert Systems with Applications, vol. 200, p. 116941, Aug. 2022, doi: 10.1016/j.eswa.2022.116941.
H. H. Htun, M. Biehl, and N. Petkov, "Survey of feature selection and extraction techniques for stock market prediction," Financial Innovation, vol. 9, p. 26, Jan. 2023, doi: 10.1186/s40854-022-00441-7.
H. Akaike, "A new look at the statistical model identification," IEEE Transactions on Automatic Control, vol. 19, no. 6, pp. 716-723, Dec. 1974, doi: 10.1109/TAC.1974.1100705.
L. Breiman, "Random forests," Machine Learning, vol. 45, no. 1, pp. 5-32, 2001, doi: 10.1023/A:1010933404324.
T. Chen and C. Guestrin, "XGBoost: A scalable tree boosting system," in Proceeding of 22nd ACM SIGKDD Int. Conf. Knowledge Discovery and Data Mining, 2016, pp. 785-794, doi: 10.1145/2939672.2939785.
L. Khaidem, S. Saha, and S. R. Dey, "Predicting the direction of stock market prices using random forest," arXiv:1605.00003, 2016, doi: 10.48550/arXiv.1605.00003.
S. Hochreiter and J. Schmidhuber, "Long short-term memory," Neural Computation, vol. 9, no. 8, pp. 1735-1780, 1997, doi: 10.1162/neco.1997.9.8.1735.
K. Cho et al., "Learning phrase representations using RNN encoder-decoder for statistical machine translation," in Proceeding of 2014 Conf. Empirical Methods in Natural Language Processing (EMNLP), 2014, pp. 1724-1734, doi: 10.3115/v1/D14-1179.
Y. Gao, R. Wang, and E. Zhou, "Stock prediction based on optimized LSTM and GRU models," Scientific Programming, vol. 2021, Art. no. 4055281, Sep. 2021, doi: 10.1155/2021 /4055281.
N. K. Khairunisa and P. Hendikawati, "Long short-term memory and gated recurrent unit modeling for stock price forecasting," Jurnal Matematika, Statistika dan Komputasi, vol. 21, no. 1, pp. 321-333, Sep. 2024, doi: 10.20956/j.v21i1.35930.
B. Lim, S. Ö. Arık, N. Loeff, and T. Pfister, "Temporal Fusion Transformers for interpretable multi-horizon time series forecasting," International Journal of Forecasting, vol. 37, no. 4, pp. 1748-1764, Oct. 2021, doi: 10.1016/j.ijforecast.2021.03.012.
R. J. Hyndman and A. B. Koehler, "Another look at measures of forecast accuracy," International Journal of Forecasting, vol. 22, no. 4, pp. 679-688, Oct. 2006, doi: 10.1016/j.ijforecast. 2006.03.001.
Y. Kara, M. A. Boyacioglu, and O. K. Baykan, "Predicting direction of stock price index movement using artificial neural networks and support vector machines: The sample of the Istanbul Stock Exchange," Expert Systems with Applications, vol. 38, no. 5, pp. 5311-5319, May. 2011, doi: 10.1016/j.eswa.2010.10.027.
M. Costantini, J. Crespo Cuaresma, and J. Hlouskova, "Forecasting errors, directional accuracy and profitability of currency trading: The case of EUR/USD exchange rate," Journal of Forecasting, vol. 35, no. 7, pp. 652-668, Mar. 2016, doi: 10.1002/for.2398.
Ö. İcan and T. B. Çelik, "Stock market prediction performance of neural networks: A literature review," International Journal of Economics and Finance, vol. 9, no. 11, pp. 100-108, Oct. 2017, doi: 10.5539/ijef.v9n11p100.
M. H. Pesaran and A. Timmermann, "A simple nonparametric test of predictive performance," Journal of Business & Economic Statistics, vol. 10, no. 4, pp. 461-465, Oct. 1992, doi: 10.1080/07350015.1992.10509922.
H. J. Park, Y. Kim, and H. Y. Kim, "Stock market forecasting using a multi-task approach integrating long short-term memory and the random forest framework," Applied Soft Computing, vol. 114, pp. 108106, Jan. 2022, doi: 10.1016/j.asoc.2021.108106.