Deep Learning on SPY Stock Prices Using Improved Multi-Step LSTM
DOI:
https://doi.org/10.47747/ijfr.v3i2.785Keywords:
SPY, stock, multistep, LSTM, deep learning, S&P 500, multivariateAbstract
Stock price prediction has been a widely pursued topic by researchers in recent years due to the great impact that significant research can have on the economy. LSTM is commonly used for stock price prediction as it has strong time series predictive capabilities. However, it is limited by its loss function, which only takes one parameter (predicted stock price) into account. This paper proposes a multivariate multi-step, vector output predictive model using LSTM, with both the stock price and the relative return as inputs of the neural network. Furthermore, a novel loss function that combines both the standard mean squared error, and the relative return mean squared error to hone accuracy is introduced. The model’s predictive capabilities are demonstrated on the S&P 500 Index. This improved LSTM model reaches a test MSE of 0.0076, which is a result that is significantly stronger than results demonstrated by standard LSTM stock prediction networks, and which outperforms most of the LSTM models mentioned in the literature.
References
Aasi, B., Imtiaz, S. A., Qadeer, H. A., Singarajah, M., and Kashef, R. (2021). Stock price prediction us- ing a multivariate multistep lstm: A sentiment and public engagement analysis model. In 2021 IEEE International IOT, Electronics and Mechatronics Conference (IEMTRONICS), pages 1–8. IEEE.
Atsalakis, G. S. and Valavanis, K. P. (2009). Surveying stock market forecasting techniques–part ii: Soft computing methods. Expert Systems with applications, 36(3):5932–5941.
Bao, W., Yue, J., and Rao, Y. (2017). A deep learning framework for financial time series using stacked autoencoders and long-short term memory. PloS one, 12(7):e0180944.
Borovkova, S. and Tsiamas, I. (2019). An ensemble of lstm neural networks for high-frequency stock market classification. Journal of Forecasting, 38(6):600–619.
Kamalov, F. (2020). Forecasting significant stock price changes using neural networks. Neural Com- puting and Applications, 32(23):17655–17667.
Kamalov, F., Smail, L., and Gurrib, I. (2020). Stock price forecast with deep learning. In 2020 Interna- tional Conference on Decision Aid Sciences and Application (DASA), pages 1098–1102. IEEE.
Lakshminarayanan, S. K. and McCrae, J. P. (2019). A comparative study of svm and lstm deep learning algorithms for stock market prediction. In AICS, pages 446–457.
Lee, J. and Kang, J. (2020). Effectively training neural networks for stock index prediction: Predicting the s&p 500 index without using its index data. PloS one, 15(4):e0230635.
Liang, X., Ge, Z., Sun, L., He, M., and Chen, H. (2019). Lstm with wavelet transform based data preprocessing for stock price prediction. Mathematical Problems in Engineering, 2019.
Muncharaz, J. O. (2020). Comparing classic time series models and the lstm recurrent neural network: An application to s&p 500 stocks. Finance, Markets and Valuation, 6(2):137–148.
Mustapa, F. H. and Ismail, M. T. (2019). Modelling and forecasting s&p 500 stock prices using hybrid arima-garch model. In Journal of Physics: Conference Series, volume 1366, page 012130. IOP Publishing.
Patel, J., Shah, S., Thakkar, P., and 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):259–268.
Qiu, J., Wang, B., and Zhou, C. (2020). Forecasting stock prices with long-short term memory neural network based on attention mechanism. PloS one, 15(1):e0227222.
Sun, C., Shrivastava, A., Singh, S., and Gupta, A. (2017). Revisiting unreasonable effectiveness of data in deep learning era. In Proceedings of the IEEE international conference on computer vision, pages 843–852.
Unterluggauer, T., Rauma, K., Järventausta, P., and Rehtanz, C. (2021). Short-term load forecasting at electric vehicle charging sites using a multivariate multi-step long short-term memory: A case study from finland. IET Electrical Systems in Transportation, 11(4):405–419.
Wu, J., Wu, Q., Zhou, L., Cai, C., Du, B., Zhai, Y., Wei, W., Shen, J., and Zhou, Q. (2021). Multivariate multi-step train delay forecasting: A hybrid lstm-cps solution. Technical report.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2022 Yulong Eric Lian

This work is licensed under a Creative Commons Attribution 4.0 International License.
Copyright for this article is retained by the author(s), with first publication rights granted to the journal.
It is an open-access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/4.0/)









