Financial time series are characterized by non-linearity, inherent volatility, and changing temporal patterns making accurate predictions very challenging. This study deploys a CNN-LSTM hybrid model to predict the USD/KES exchange rate giving particular emphasis to the effect the size of the historical input window has on the hybrid model forecasting performance. The study relied on Daily USD/KES exchange-rate data obtained from the Central Bank of Kenya to train, evaluate and validate the hybrid model. This data was prepossessed and transformed into sequential inputs using different window configurations, allowing the models to learn from varying amounts of historical information. The study combined a CNN-based local pattern extraction with an LSTM-based temporal dependency learning model to develop a hybrid CNN-LSTM model. The hybrid's model performance was then subjected to a comparison with standalone CNN and LSTM model and evaluated using Root Mean Square Error (RMSE) and Mean Absolute Error (MAE) The hybrid CNN-LSTM prediction results indicated that the model was more effective in prediction among the evaluated architecture. The choice of the input window sizes affected the model's ability to learn and capture trends in the time series data. The results from the rolling-window experiments demonstrated that shorter and moderately sized historical windows can provide a more responsive representation of recent exchange-rate movements than an expanding window, particularly during periods of pronounced market variation. These findings highlight the importance of considering both model architecture and input-window design when developing deep-learning approaches for USD/KES exchange-rate forecasting. The study provides an empirical basis for selecting appropriate historical window sizes when applying hybrid deep-learning models to volatile financial time series in the Kenyan foreign-exchange market.
| Published in | International Journal of Data Science and Analysis (Volume 12, Issue 5) |
| DOI | 10.11648/j.ijdsa.20261205.13 |
| Page(s) | 129-138 |
| Creative Commons |
This is an Open Access article, distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution and reproduction in any medium or format, provided the original work is properly cited. |
| Copyright |
Copyright © The Author(s), 2026. Published by Science Publishing Group |
USD/KES Exchange Rate, Exchange-rate Forecasting, CNN-LSTM, Deep Learning, Time-series Forecasting, Rolling Window, Window Size, Financial Time Series
| [1] | Sezer, O. B., Gudelek, M. U., & Ozbayoglu, A. M. (2020). Financial time series forecasting with deep learning: A systematic literature review: 2005-2019. Applied soft computing, 90, 106181. |
| [2] | Tang, Y., Song, Z., Zhu, Y., Yuan, H., Hou, M., Ji, J., ... & Li, J. (2022). A survey on machine learning models for financial time series forecasting. Neurocomputing, 512, 363-380. |
| [3] | Musyoki, D., Pokhariyal, G. P., & Pundo, M. (2012). The impact of real exchange rate volatility on economic growth: Kenyan evidence. Business and Economic Horizons, 7(1), 59-75. |
| [4] | Nyambariga, M. D. (2017). Effects of exchange rate volatility on imports and exports in Kenya. International Journal of Economics, 2(3), 71-84. |
| [5] | Zhang, G. P. (2003). Time series forecasting using a hybrid ARIMA and neural network model. Neurocomputing, 50, 159-175. |
| [6] | Aryal, S., Nadarajah, D., Kasthurirathna, D., Rupasinghe, L., & Jayawardena, C. (2019, December). Comparative analysis of the application of Deep Learning techniques for Forex Rate prediction. In 2019 international conference on advancements in computing (ICAC) (pp. 329-333). IEEE. |
| [7] | Dautel, A. J., Härdle, W. K., Lessmann, S., & Seow, H. V. (2020). Forex exchange rate forecasting using deep recurrent neural networks. Digital Finance, 2(1), 69-96. |
| [8] | Biswas, A., Uday, I. A., Rahat, K. M., Akter, M. S., & Mahdy, M. R. C. (2023). Forecasting the United State Dollar (USD)/Bangladeshi Taka (BDT) exchange rate with deep learning models: Inclusion of macroeconomic factors influencing the currency exchange rates. PloS one, 18(2), e0279602. |
| [9] | Azlan, A., Yusof, Y., & Mohsin, M. F. M. (2019). Determining the impact of window length on time series forecasting using deep learning. International Journal of Advanced Computer Research, 9(44), 260-267. |
| [10] | Yu, L., Wang, S., & Lai, K. K. (2005). Adaptive smoothing neural networks in foreign exchange rate forecasting. In International conference on computational science (pp. 523530). |
| [11] | de Prado, M. L. (2018). Advances in nancial machine learning. Hoboken, NJ: John Wiley & Sons. |
| [12] | Patel, J., Shah, S., Thakkar, P., & Kotecha, K. (2015). Predicting stock and stock price index movement using trend deterministic data preparation and machine learning techniques. Expert Systems with Applications, 42(1), 259268. |
| [13] | Bollerslev, T. (1986). Generalized autoregressive conditional heteroskedasticity. Journal of Econometrics, 31(3), 307327. |
| [14] | Hu, Z., Zhao, Y., & Khushi, M. (2021). A survey of Forex and stock price prediction using deep learning. Applied System Innovation, 4(1), 9. |
| [15] | Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural computation, 9(8), 1735-1780. |
APA Style
Mwangi, C. W., Kithinji, M. M., Kilai, M. (2026). The Impact of Varying Window Sizes on the Performance of a Hybrid CNN-LSTM Model A Case of Forecasting USD VS KES. International Journal of Data Science and Analysis, 12(5), 129-138. https://doi.org/10.11648/j.ijdsa.20261205.13
ACS Style
Mwangi, C. W.; Kithinji, M. M.; Kilai, M. The Impact of Varying Window Sizes on the Performance of a Hybrid CNN-LSTM Model A Case of Forecasting USD VS KES. Int. J. Data Sci. Anal. 2026, 12(5), 129-138. doi: 10.11648/j.ijdsa.20261205.13
AMA Style
Mwangi CW, Kithinji MM, Kilai M. The Impact of Varying Window Sizes on the Performance of a Hybrid CNN-LSTM Model A Case of Forecasting USD VS KES. Int J Data Sci Anal. 2026;12(5):129-138. doi: 10.11648/j.ijdsa.20261205.13
@article{10.11648/j.ijdsa.20261205.13,
author = {Crispus Waweru Mwangi and Martin Mutwiri Kithinji and Mutua Kilai},
title = {The Impact of Varying Window Sizes on the Performance of a Hybrid CNN-LSTM Model A Case of Forecasting USD VS KES},
journal = {International Journal of Data Science and Analysis},
volume = {12},
number = {5},
pages = {129-138},
doi = {10.11648/j.ijdsa.20261205.13},
url = {https://doi.org/10.11648/j.ijdsa.20261205.13},
eprint = {https://article.sciencepublishinggroup.com/pdf/10.11648.j.ijdsa.20261205.13},
abstract = {Financial time series are characterized by non-linearity, inherent volatility, and changing temporal patterns making accurate predictions very challenging. This study deploys a CNN-LSTM hybrid model to predict the USD/KES exchange rate giving particular emphasis to the effect the size of the historical input window has on the hybrid model forecasting performance. The study relied on Daily USD/KES exchange-rate data obtained from the Central Bank of Kenya to train, evaluate and validate the hybrid model. This data was prepossessed and transformed into sequential inputs using different window configurations, allowing the models to learn from varying amounts of historical information. The study combined a CNN-based local pattern extraction with an LSTM-based temporal dependency learning model to develop a hybrid CNN-LSTM model. The hybrid's model performance was then subjected to a comparison with standalone CNN and LSTM model and evaluated using Root Mean Square Error (RMSE) and Mean Absolute Error (MAE) The hybrid CNN-LSTM prediction results indicated that the model was more effective in prediction among the evaluated architecture. The choice of the input window sizes affected the model's ability to learn and capture trends in the time series data. The results from the rolling-window experiments demonstrated that shorter and moderately sized historical windows can provide a more responsive representation of recent exchange-rate movements than an expanding window, particularly during periods of pronounced market variation. These findings highlight the importance of considering both model architecture and input-window design when developing deep-learning approaches for USD/KES exchange-rate forecasting. The study provides an empirical basis for selecting appropriate historical window sizes when applying hybrid deep-learning models to volatile financial time series in the Kenyan foreign-exchange market.},
year = {2026}
}
TY - JOUR T1 - The Impact of Varying Window Sizes on the Performance of a Hybrid CNN-LSTM Model A Case of Forecasting USD VS KES AU - Crispus Waweru Mwangi AU - Martin Mutwiri Kithinji AU - Mutua Kilai Y1 - 2026/09/28 PY - 2026 N1 - https://doi.org/10.11648/j.ijdsa.20261205.13 DO - 10.11648/j.ijdsa.20261205.13 T2 - International Journal of Data Science and Analysis JF - International Journal of Data Science and Analysis JO - International Journal of Data Science and Analysis SP - 129 EP - 138 PB - Science Publishing Group SN - 2575-1891 UR - https://doi.org/10.11648/j.ijdsa.20261205.13 AB - Financial time series are characterized by non-linearity, inherent volatility, and changing temporal patterns making accurate predictions very challenging. This study deploys a CNN-LSTM hybrid model to predict the USD/KES exchange rate giving particular emphasis to the effect the size of the historical input window has on the hybrid model forecasting performance. The study relied on Daily USD/KES exchange-rate data obtained from the Central Bank of Kenya to train, evaluate and validate the hybrid model. This data was prepossessed and transformed into sequential inputs using different window configurations, allowing the models to learn from varying amounts of historical information. The study combined a CNN-based local pattern extraction with an LSTM-based temporal dependency learning model to develop a hybrid CNN-LSTM model. The hybrid's model performance was then subjected to a comparison with standalone CNN and LSTM model and evaluated using Root Mean Square Error (RMSE) and Mean Absolute Error (MAE) The hybrid CNN-LSTM prediction results indicated that the model was more effective in prediction among the evaluated architecture. The choice of the input window sizes affected the model's ability to learn and capture trends in the time series data. The results from the rolling-window experiments demonstrated that shorter and moderately sized historical windows can provide a more responsive representation of recent exchange-rate movements than an expanding window, particularly during periods of pronounced market variation. These findings highlight the importance of considering both model architecture and input-window design when developing deep-learning approaches for USD/KES exchange-rate forecasting. The study provides an empirical basis for selecting appropriate historical window sizes when applying hybrid deep-learning models to volatile financial time series in the Kenyan foreign-exchange market. VL - 12 IS - 5 ER -