The Impact of Varying Window Sizes on the Performance of a Hybrid CNN-LSTM Model A Case of Forecasting USD VS KES
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.
Authors
- Martin M. Kithinji (ORCID: https://orcid.org/0000-0002-0449-3776)
- Mutua Kilai (ORCID: https://orcid.org/0000-0001-6290-9728)
- Crispus Mwangi (ORCID: https://orcid.org/0009-0005-0275-4257)
Institutions
- Kirinyaga University (KE)
Publication Details
- Journal
- International Journal of Data Science and Analysis
- Published
- 2026-09-28
- DOI
- https://doi.org/10.11648/j.ijdsa.20261205.13
- Primary Topic
- Stock Market Forecasting Methods
- Type
- article
- Field-Weighted Citation Impact
- 0.00