Journals / Savunma Bilimleri Dergisi / 2026 / Cilt: 22 Sayı: 1

Adaptive Sliding Window Size Based Sequential Learning of LSTM, GRU and Transformer Models Applied to Financial Time Series Prediction

Uyarlanabilir Kayan Pencere Boyutu Temelli Ardışık Öğrenme ile LSTM, GRU ve Transformatör Modellerinin Finansal Zaman Serisi Tahmininde Kullanılması

Figen Özen(YILDIZ TECHNICAL UNIVERSITY)0000-0000-0000-0001
Ata Eren Arslan(IZMIR DEMOCRACY UNIVERSITY)0000-0000-0000-0000
Selami Beyhan(YILDIZ TECHNICAL UNIVERSITY)0000-0002-9581-2794
Pages
97–108
Publication Date
2025-12-24
🏛️Bibliographic metadata and full text access for this article are provided via DergiPark.
DergiPark Record ↗
✨

AI Summary & Key Takeaways

AI Insight
⚡ TL;DR(Too Long; Didn't Read)

As a result, the advantage of the proposed method on the performance of recent online LSTM, GRU, and transformer models is clearly demonstrated.

📌 3 Key Takeaways

🎯
Objective & Hypothesis:The performance of learning methods and sliding window size has gained significant importance with the increasing volume of data in online time series modeling and prediction.
📊
Key Findings & Data:In this paper, a novel method for intelligent tuning of the sliding window size based on fuzzy logic is proposed to improve the online prediction performance of deep learning models.
💡
Conclusion & Impact:As a result, the advantage of the proposed method on the performance of recent online LSTM, GRU, and transformer models is clearly demonstrated.
🔬Design:Modeling & Simulation
📍Scope:Comprehensive Sample
⚙️Variables:Zaman serisi tahmini · Kayan pencere · LSTM

Abstract

The performance of learning methods and sliding window size has gained significant importance with the increasing volume of data in online time series modeling and prediction. In the literature, fixed window lengths are traditionally chosen based on prior experience, and the information of the new data is transferred to the model. However, a fixed window length is insufficient due to the dynamic nature of time series data. In this paper, a novel method for intelligent tuning of the sliding window size based on fuzzy logic is proposed to improve the online prediction performance of deep learning models. The main contributions of the study are as follows: i) The well-known stochastic gradient-descent learning with fixed window lengths were used to train the well-known LSTM, GRU, and transformer models, and their success in financial time series estimation was recorded in tables. An important comparison is provided at this stage. These tables provide us with detailed information about the performance of existing models in online time series forecasting. ii) A fuzzy logic model is proposed, and the optimal sliding window size is selected based on the performance values calculated at each sample index. With the proposed method, the size of the sliding window is tuned automatically. Fuzzy rule base is constructed based on the mean absolute error performance of offline training data. The reason for using the MAE value in offline training is that it is still desired to maintain the offline success of the model in case new data arrives. iii) The best and worst-performing models obtained with fixed window length are redesigned with fuzzy logic sliding window size, and their performances are recorded. As a result, the advantage of the proposed method on the performance of recent online LSTM, GRU, and transformer models is clearly demonstrated.

Özet

Çevrimiçi zaman serisi modelleme ve tahmininde artan veri hacmiyle birlikte öğrenme yöntemlerinin performansı ve kayan pencere boyutu büyük önem kazanmıştır. Literatürde geleneksel olarak sabit pencere uzunlukları önceki deneyimlere dayalı olarak seçilmekte ve yeni verinin bilgisi modele aktarılmaktadır. Ancak, zaman serisi verilerinin dinamik yapısı nedeniyle sabit bir pencere uzunluğu yetersiz kalmaktadır. Bu makalede, derin öğrenme modellerinin çevrimiçi tahmin performansını iyileştirmek için bulanık mantığa dayalı kayan pencere boyutunun uygun biçimde ayarlanması için yeni bir yöntem önerilmektedir. Çalışmanın ana katkıları şunlardır: i) LSTM, GRU ve transformatör modellerini eğitmek için sabit pencere uzunluklarına sahip iyi bilinen stokastik gradyan inişli öğrenme kullanılmış ve finansal zaman serisi tahminindeki başarıları tablolara kaydedilmiştir. Bu aşamada önemli bir karşılaştırma sağlanmıştır. Bu tablolar bize mevcut modellerin çevrimiçi zaman serisi tahminindeki performansları hakkında detaylı bilgi vermektedir. ii) Bir bulanık mantık modeli önerilmiş ve her örnek indeksinde hesaplanan performans değerlerine göre en uygun kayan pencere boyutu seçilmiştir. Önerilen bu yöntem ile kayan pencerenin boyutu otomatik olarak ayarlanmaktadır. Bulanık kural tabanı, çevrimdışı eğitim verilerinin ortalama mutlak hata (MAE) performansına dayalı olarak oluşturulur. Çevrimdışı eğitimde elde edilen MAE değerinin kullanılmasının nedeni, yeni veri gelmesi durumunda da modelin çevrimdışı başarısının korunmak istenmesidir. iii) Sabit pencere uzunluğu ile elde edilen en iyi ve en kötü performanslı modeller, bulanık mantık kayan pencere boyutu ile yeniden tasarlanır ve performansları kaydedilir. Sonuç olarak, önerilen yöntemin son çevrimiçi LSTM, GRU ve transformatör modellerinin performansı üzerindeki avantajı açıkça gösterilmiştir.

🔖

Cite This Article

Özen, F., Arslan, A. E., Beyhan, S. (2025). Adaptive Sliding Window Size Based Sequential Learning of LSTM, GRU and Transformer Models Applied to Financial Time Series Prediction. Savunma Bilimleri Dergisi, Cilt: 22 Sayı: 1, 97–108. https://doi.org/10.17134/khosbd.1774200

📄 Full Text PDF Viewer

📄

PDF görüntüleyici hazırlanıyor...

References (24)

  1. R. J. Hyndman and G. Athanasopoulos, Forecasting: principles and practice, 3rd ed. Melbourne, Australia: OTexts, 2021.
  2. S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory,” Neural Comput, vol. 9, no. 8, pp. 1735–1780, Nov. 1997, doi: 10.1162/neco.1997.9.8.1735.
  3. I. Goodfellow, Y. Bengio, and A. Courville, Deep Learning. MIT Press, 2016.
  4. G. P. Zhang, “Time series forecasting using a hybrid ARIMA and neural network model,” 2003. [Online]. Available: www.elsevier.com/locate/neucom
  5. A. İ. Şimşek, “Predicting Bitcoin Price: Comparative Analysis of Machine Learning and Deep Learning Models,” Savunma Bilimleri Dergisi, Apr. 2024, doi: 10.17134/khosbd.1394501.
  6. C. Bulut and B. Hüdaverdi, “Hybrid Approaches in Financial Time Series Forecasting: A Stock Market Application,” Ekoist: Journal of Econometrics and Statistics, vol. 0, no. 37, pp. 53–68, Dec. 2022, doi: 10.26650/ekoist.2022.37.1108411.
  7. G. Kaya Aydın, U. Aydın, and B. Ülengin, “A Comparison of Forecasting Performance of PPML and OLS estimators: The Gravity Model in the Air Cargo Market,” Ekoist: Journal of Econometrics and Statistics, vol. 0, no. 39, pp. 112–128, Dec. 2023, doi: 10.26650/ekoist.2023.39.1310639.
  8. C. Tang, B. Abbatematteo, J. Hu, R. Chandra, R. Martín-Martín, and P. Stone, “Deep Reinforcement Learning for Robotics: A Survey of Real-World Successes,” 2025. [Online]. Available: https://www.arxiv.org/abs/2408.03539
  9. K. Hu et al., “A review of research on reinforcement learning algorithms for multi-agents,” Sep. 28, 2024, Elsevier B.V. doi: 10.1016/j.neucom.2024.128068.
  10. W. Pinthurat, T. Surinkaew, and B. Hredzak, “An overview of reinforcement learning-based approaches for smart home energy management systems with energy storages,” Sep. 01, 2024, Elsevier Ltd. doi: 10.1016/j.rser.2024.114648.
  11. H. Xie et al., “Reinforcement learning for vehicle-to-grid: A review,” Mar. 01, 2025, Elsevier Ltd. doi: 10.1016/j.adapen.2025.100214.
  12. H. Gharoun, F. Momenifar, F. Chen, and A. H. Gandomi, “Meta-learning Approaches for Few-Shot Learning: A Survey of Recent Advances,” ACM Comput Surv, vol. 56, no. 12, Jul. 2024, doi: 10.1145/3659943.
  13. A. Vettoruzzo, M. R. Bouguelia, J. Vanschoren, T. Rognvaldsson, and K. C. Santosh, “Advances and Challenges in Meta-Learning: A Technical Review,” IEEE Trans Pattern Anal Mach Intell, vol. 46, no. 7, pp. 4763–4779, Jul. 2024, doi: 10.1109/TPAMI.2024.3357847.
  14. S. Wang et al., “Few-shot fault diagnosis of axial piston pump based on prior knowledge-embedded meta learning vision transformer under variable operating conditions,” Expert Syst Appl, vol. 269, Apr. 2025, doi: 10.1016/j.eswa.2025.126452.
  15. M. Dobrevski and D. Skocaj, “Dynamic Adaptive Dynamic Window Approach,” IEEE Transactions on Robotics, vol. 40, pp. 3068–3081, 2024, doi: 10.1109/TRO.2024.3400932.
  16. S. Y. Shih, F. K. Sun, and H. yi Lee, “Temporal pattern attention for multivariate time series forecasting,” Mach Learn, vol. 108, no. 8–9, pp. 1421–1441, Sep. 2019, doi: 10.1007/s10994-019-05815-0.
  17. A. Vaswani et al., “Attention Is All You Need,” Aug. 2023, [Online]. Available: http://arxiv.org/abs/1706.03762
  18. W. Zhou, D. Wang, H. Li, and W. Song, “Long-term forecasting of time series based on sliding window information granules and fuzzy inference system,” in 2018 International Conference on Information, Cybernetics, and Computational Social Systems: IEEE ICCSS 2018, IEEE, 2018, pp. 375–380.
  19. P. Kapoor and S. S. Bedi, “Weather Forecasting Using Sliding Window Algorithm,” ISRN Signal Processing, vol. 2013, pp. 1–5, Dec.
  20. K. Cho et al., “Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation,” Sep. 2014, [Online]. Available: http://arxiv.org/abs/1406.1078
  21. C. Li, G. Tang, X. Xue, A. Saeed, and X. Hu, “Short-Term Wind Speed Interval Prediction Based on Ensemble GRU Model,” IEEE Trans Sustain Energy, vol. 11, no. 3, pp. 1370–1380, Jul. 2020, doi: 10.1109/TSTE.2019.2926147.
  22. L. A. Zadeh, “Fuzzy Sets,” 1965.
  23. M. Beğenirbaş, K. G. Kurtay, H. A. Dağıstanlı, A. Altundaş, “Savunma Tedarik Sürecinde Çalışanlarda Etkili Kriterlerin Önemlilik Düzeyinin Bulanık Dematel Yöntemleriyle Belirlenmesi,” Savunma Bilimleri Dergisi, vol. 2, no. 43, pp. 269–294, Nov. 2023, doi: 10.17134/khosbd.1216154.
  24. W. Zhou, D. Wang, H. Li, and W. Song, “Long-term forecasting of time series based on sliding window information granules and fuzzy inference system,” in 2018 International Conference on Information, Cybernetics, and Computational Social Systems: IEEE ICCSS 2018, IEEE, 2018, pp. 375–380.