การเปรียบเทียบแบบจำลองการเรียนรู้ของเครื่องและโครงข่ายประสาทเทียมเชิงลึก สำหรับการพยากรณ์ดัชนีราคาหุ้นตลาดหลักทรัพย์แห่งประเทศไทย
Main Article Content
บทคัดย่อ
การศึกษาวิจัยครั้งนี้มีวัตถุประสงค์เพื่อเปรียบเทียบความสามารถในการพยากรณ์ดัชนีราคาหุ้นตลาดหลักทรัพย์แห่งประเทศไทย (SET Index) รายวัน ระหว่างแบบจำลองทางสถิติดั้งเดิม แบบจำลองการเรียนรู้ของเครื่อง (Machine Learning) และแบบจำลองโครงข่ายประสาทเทียมเชิงลึก (Deep Learning) รวมทั้งสิ้น 8 แบบจำลอง ได้แก่ Naive persistence, ARIMA, Random Forest, XGBoost และแบบจำลอง Long Short-Term Memory (LSTM) กับ Gated Recurrent Unit (GRU) ทั้งในรูปแบบถดถอย (regression) และรูปแบบจำแนกประเภท (classification) ข้อมูลที่ใช้เป็นราคาปิดรายวันของดัชนี SET Index ระหว่างวันที่ 4 มกราคม 2553 ถึง 17 กรกฎาคม 2569 รวม 3,945 วันทำการหลังการสร้างตัวแปรคุณลักษณะเชิงเทคนิค (technical indicators) จำนวน 19 ตัวแปร โดยแบ่งข้อมูลตามลำดับเวลาออกเป็นชุดฝึก (พ.ศ. 2553-2564) ชุดตรวจสอบ (พ.ศ. 2565-2566) และชุดทดสอบ (พ.ศ. 2567-2569) ผลการศึกษาพบว่า Random Forest ให้ความแม่นยำเชิงทิศทางสูงสุดที่ร้อยละ 51.8 รองลงมาคือ XGBoost ที่ร้อยละ 50.8 ขณะที่แบบจำลอง LSTM และ GRU ทั้งสี่รูปแบบให้ความแม่นยำเชิงทิศทางอยู่ในช่วงร้อยละ 48.2-49.8 ซึ่งต่ำกว่าหรือใกล้เคียงกับการสุ่มทายและแบบจำลอง naive persistence (ร้อยละ 49.7) โดยมีเพียง Random Forest และ XGBoost เท่านั้นที่ผ่านเกณฑ์เปรียบเทียบพื้นฐานร้อยละ 50 ในเชิงตัวเลข แม้การทดสอบทวินาม (binomial test) จะชี้ว่าความได้เปรียบดังกล่าวยังไม่มีนัยสำคัญทางสถิติที่ระดับ 0.05 ก็ตาม ในด้านความคลาดเคลื่อนเชิงระดับราคา (RMSE, MAPE) แบบจำลองส่วนใหญ่ให้ค่าใกล้เคียงกันและใกล้เคียงกับ naive persistence ยกเว้น ARIMA ที่ให้ค่าคลาดเคลื่อนสูงกว่าอย่างชัดเจน ผลลัพธ์ดังกล่าวสอดคล้องกับแนวคิดสมมติฐานตลาดที่มีประสิทธิภาพ (Efficient Market Hypothesis) และชี้ให้เห็นว่าความซับซ้อนของแบบจำลองไม่ได้รับประกันความแม่นยำในการพยากรณ์ที่สูงขึ้นเสมอไป ในเชิงปฏิบัติ ผลการศึกษาชี้แนะว่าแบบจำลองต้นไม้ตัดสินใจแบบรวมกลุ่มที่มีโครงสร้างไม่ซับซ้อนควรเป็นทางเลือกตั้งต้นสำหรับงานพยากรณ์ทิศทางดัชนี SET Index ก่อนพิจารณาลงทุนทรัพยากรเชิงคำนวณกับแบบจำลองโครงข่ายประสาทเทียมเชิงลึกที่ซับซ้อนกว่า งานวิจัยนี้มีส่วนสนับสนุนองค์ความรู้โดยนำเสนอกระบวนการพยากรณ์ดัชนี SET Index แบบครบวงจรที่เปรียบเทียบแบบจำลองหลากหลายตระกูลภายใต้เงื่อนไขข้อมูลและการประเมินผลชุดเดียวกัน ซึ่งเป็นประโยชน์ต่อทั้งแวดวงวิชาการและผู้ปฏิบัติงานด้านการลงทุนในตลาดหลักทรัพย์ไทย
Article Details

อนุญาตภายใต้เงื่อนไข Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
เอกสารอ้างอิง
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.