Skip to main content
Log in

Improving Sliding Window Effect of LSTM in Stock Prediction Based on Econometrics Theory

  • Published:
Computational Economics Aims and scope Submit manuscript

Abstract

This study examines the influence of the sliding window in the LSTM model on its predictive performance in the stock market. The investigation encompasses three aspects: the impact of the stationarity of the original data, the effect of the time interval, and the influence of the input order of data. Additionally, a standard VAR model is established for a comparative benchmark. The experimental dataset comprises the daily stock index prices of the six major stock markets from the January 2010 to December 2019. The experimental results demonstrate that stationary input data enhances the predictive performance of the LSTM model. Furthermore, shorter time interval tends to yield improved outcomes, while the order of input data does not impact the performance of the LSTM. Although the predictive capability of the LSTM model may not consistently surpass that of the standard VAR model, which is different from the previous research, it serves to compensate for the conditional limitations associated with VAR model construction.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5

Similar content being viewed by others

References

  • Allen, D. E., Amram, R., & McAleer, M. (2013). Volatility spillovers from the Chinese stock market to economic neighbours. Mathematics and Computers in Simulation, 94, 238–257.

    Article  Google Scholar 

  • Bhandari, H. N., Rimal, B., Pokhrel, N. R., Rimal, R., Dahal, K. R., & Khatri, R. K. (2022). Predicting stock market index using LSTM. Machine Learning with Applications, 9, 100320. https://doi.org/10.1016/j.mlwa.2022.100320

    Article  Google Scholar 

  • Christou, C., Cunado, J., Gupta, R., & Hassapis, C. (2017). Economic policy uncertainty and stock market returns in pacific-rim countries: Evidence based on a Bayesian panel VAR model. Journal of Multinational Financial Management, 40, 92–102.

    Article  Google Scholar 

  • Cuestas, J. C., & Tang, B. (2021). A Markov switching SVAR analysis on the relationship between exchange rate changes and stock returns in China. International Journal of Emerging Markets, 16(3), 625–642.

    Article  Google Scholar 

  • Curto, J. D., Pinto, J. C., & Tavares, G. A. N. (2009). Modeling stock markets’ volatility using GARCH models with normal, student’s t and stable Paretian distributions. Statistical Papers, 50(2), 311.

    Article  Google Scholar 

  • Dickey, D. A., & Fuller, W. A. (1981). Likelihood ratio statistics for autoregressive time series with a unit root. Econometrica: Journal of the Econometric Society, 49, 1057–1072.

    Article  Google Scholar 

  • Döpke, J., & Pierdzioch, C. (2006). Politics and the stock market: Evidence from Germany. European Journal of Political Economy, 22(4), 925–943.

    Article  Google Scholar 

  • Engle, R. F., & Granger, C. W. (1987). Co-integration and error correction: representation, estimation, and testing. Econometrica: Journal of the Econometric Society, 55, 251–276.

    Article  Google Scholar 

  • Hamilton, J. D. (2020). Time series analysis. Princeton University Press.

    Book  Google Scholar 

  • He, Z., He, L., & Wen, F. (2019). Risk compensation and market returns: The role of investor sentiment in the stock market. Emerging Markets Finance and Trade, 55(3), 704–718.

    Article  Google Scholar 

  • Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735–1780.

    Article  Google Scholar 

  • Ikram, J., Mohamed, A., & Frédéric, T. (2014). On the effects of world stock market and oil price shocks on food prices: An empirical investigation based on TVP-VAR models with stochastic volatility. Energy Economics, 45(1), 66–98.

    Google Scholar 

  • Jiang, W. (2021). Applications of deep learning in stock market prediction: recent progress. Expert Systems with Applications, 184, 115537.

    Article  Google Scholar 

  • Johansen, S. (1988). Statistical analysis of cointegration vectors. Journal of Economic Dynamics and Control, 12(2–3), 231–254.

    Article  Google Scholar 

  • Judge, G. G., Griffiths, W. E., Hill, R. C., Lütkepohl, H., & Lee, T.-C. (1991). The theory and practice of econometrics (Vol. 49). John Wiley & Sons.

    Google Scholar 

  • Kamara, A. F., Chen, E., & Pan, Z. (2022). An ensemble of a boosted hybrid of deep learning models and technical analysis for forecasting stock prices. Information Sciences, 594, 1–19.

    Article  Google Scholar 

  • Kulshreshtha, S. (2020). An ARIMA-LSTM hybrid model for stock market prediction using live data. Journal of Engineering Science & Technology Review, 13(4), 117–123.

    Article  Google Scholar 

  • Lee, S. I., & Yoo, S. J. (2020). Threshold-based portfolio: The role of the threshold and its applications. The Journal of Supercomputing, 76(10), 8040–8057.

    Article  Google Scholar 

  • Lin, Y., Yan, Y., Xu, J., Liao, Y., & Ma, F. (2021). Forecasting stock index price using the CEEMDAN-LSTM model. The North American Journal of Economics and Finance, 57, 101421.

    Article  Google Scholar 

  • Liu, Q., Tao, Z., Tse, Y., & Wang, C. (2021). Stock market prediction with deep learning: The case of China. Finance Research Letters, 4, 102209.

    Google Scholar 

  • Lu, W., Li, J., Li, Y., Sun, A., & Wang, J. (2020). A CNN-LSTM-based model to forecast stock prices. Complexity, 2020, 1–10.

    Google Scholar 

  • Rezaei, H., Faaljou, H., & Mansourfar, G. (2021). Stock price prediction using deep learning and frequency decomposition. Expert Systems with Applications, 169, 114332.

    Article  Google Scholar 

  • Saleem, M. H., Potgieter, J., & Arif, K. M. (2021). Automation in agriculture by machine and deep learning techniques: A review of recent developments. Precision Agriculture, 22(6), 2053–2091.

    Article  Google Scholar 

  • Sims, C. A. (1980). Macroeconomics and reality. Econometrica: Journal of the Econometric Society, 48, 1.

    Article  Google Scholar 

  • Singh, S., Parmar, K. S., & Kumar, J. (2021). Soft computing model coupled with statistical models to estimate future of stock market. Neural Computing and Applications, 33, 7629–7647.

    Article  Google Scholar 

  • Toparli, E. A., Çatık, A. N., & Balcılar, M. (2019). The impact of oil prices on the stock returns in Turkey: A TVP-VAR approach. Physica a: Statistical Mechanics and Its Applications, 535, 122392.

    Article  Google Scholar 

  • Wainberg, M., Merico, D., Delong, A., & Frey, B. J. (2018). Deep learning in biomedicine. Nature Biotechnology, 36(9), 829–838.

    Article  Google Scholar 

  • Xu, W., Fu, Z., Li, H., Huang, J., Xu, W., & Luo, Y. (2023). A study of the impact of COVID-19 on the Chinese stock market based on a new textual multiple ARMA model. Statistical Analysis and Data Mining: THe ASA Data Science Journal, 16(1), 5–15.

    Article  Google Scholar 

  • Youssef, M., Mokni, K., & Ajmi, A. N. (2021). Dynamic connectedness between stock markets in the presence of the COVID-19 pandemic: Does economic policy uncertainty matter? Financial Innovation, 7(1), 13.

    Article  Google Scholar 

  • Zhou, X., Pan, Z., Hu, G., Tang, S., & Zhao, C. (2018). Stock market prediction on high-frequency data using generative adversarial nets. Mathematical Problems in Engineering. https://doi.org/10.1155/2018/4907423

    Article  Google Scholar 

  • Biswas, M., Shome, A., Islam, M. A., Nova, A. J., & Ahmed, S. (2021). Predicting stock market price: A logical strategy using deep learning. In 2021 IEEE 11th IEEE symposium on computer applications & industrial electronics (ISCAIE).

  • Lai, C. Y., Chen, R.-C., & Caraka, R. E. (2019). Prediction stock price based on different index factors using LSTM. In 2019 International conference on machine learning and cybernetics (ICMLC).

  • Qian, F., & Chen, X. (2019). Stock prediction based on LSTM under different stability. In 2019 IEEE 4th international conference on cloud computing and big data analysis (ICCCBDA).

  • Samarawickrama, A., & Fernando, T. (2017). A recurrent neural network approach in predicting daily stock prices an application to the Sri Lankan stock market. In 2017 IEEE International Conference on Industrial and Information Systems (ICIIS).

  • Song, Y. (2018). Stock trend prediction: Based on machine learning methods UCLA].

  • Vora, V., Shah, M., Chouhan, A., & Tawde, P. (2022). Stock market prices and returns forecasting using deep learning based on technical and fundamental analysis. In Information and communication technology for competitive strategies (ICTCS 2021) intelligent strategies for ICT (pp. 717–728). Springer.

  • Zou, Z., & Qu, Z. (2020). Using lstm in stock prediction and quantitative trading. CS230: Deep Learning, Winter, 1–6.

Download references

Acknowledgements

We would like to express our gratitude to Ao Li, an undergraduate student from the School of Computer Science and Technology at Anyang Institute of Technology, for providing assistance in LSTM modeling and visualizing the research results.

Funding

This research received no external funding.

Author information

Authors and Affiliations

Authors

Contributions

Conceptualization, investigation, methodology, data curation, validation, writing—original draft preparation, and writing—review and editing were carried out by Xiaoxiao Liu; software and resources required for computation were provided by Wei Wang. All authors have reviewed and approved the final version of the manuscript for publication.

Corresponding author

Correspondence to Wei Wang.

Ethics declarations

Conflict of interest

The authors declare no conflict of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix 1

Appendix 1

See Tables 4, 5, 6, 7, 8, 9.

Table 4 VAR Lag Order Selection Criteria for American SP500
Table 5 VAR Lag Order Selection Criteria for British FTSE
Table 6 VAR Lag Order Selection Criteria for French FCHI
Table 7 VAR lag order selection criteria for German GDAXI
Table 8 VAR lag order selection criteria for Hong Kong HSI
Table 9 VAR lag order selection criteria for Japanese N225

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Liu, X., Wang, W. Improving Sliding Window Effect of LSTM in Stock Prediction Based on Econometrics Theory. Comput Econ (2024). https://doi.org/10.1007/s10614-024-10627-z

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10614-024-10627-z

Keywords

JEL Classification

Navigation