Stock Prediction using LSTM model

Research Article
Open access

Stock Prediction using LSTM model

Junyan Xiao 1*
  • 1 Huaer zizhu academy    
  • *corresponding author xiaojunyan318619@qq.com
Published on 1 August 2023 | https://doi.org/10.54254/2755-2721/8/20230084
ACE Vol.8
ISSN (Print): 2755-273X
ISSN (Online): 2755-2721
ISBN (Print): 978-1-915371-63-8
ISBN (Online): 978-1-915371-64-5

Abstract

With the development of the times, investors are increasingly in demand for stock price forecasting. However, stock price fluctuations are full of uncertainty, making traditional machine learning algorithms more erroneous in long-term forecasting. Based on the LSTM model, this paper uses Tushare to obtain the historical price of stocks, and the optimal structure and best training parameters of the LSTM model in stock price prediction are determined experimentally. The prediction accuracy of the LSTM model was evaluated by MAE, and the best result was 69.15, which achieved accurate prediction of stock prices. Compared with the traditional SVR model and the ARMA model, the prediction results of LSTM are more in line with the actual value, and the prediction accuracy of the algorithm is higher.

Keywords:

stock prediction, data mining, LSTM

Xiao,J. (2023). Stock Prediction using LSTM model. Applied and Computational Engineering,8,74-79.
Export citation

References

[1]. Pahwa, N., Khalfay, N., Soni, V., & Vora, D. (2017). Stock prediction using machine learning a review paper. International Journal of Computer Applications, 163(5), 36-43.

[2]. TIAN Xiang,DENG Feiqi. Application of Accurate Online Support Vector Regression in Stock Index Forecasting[J]. Computer Engineering,2005,31(22):18-20

[3]. FENG Pan,CAO Xianbing. An Empirical Study on Stock Price Analysis and Prediction Based on ARMA Model[J]. Mathematics in Practice and Theory, 2011(22): 84-90

[4]. Wang Shuai,Shang Wei. Forecasting directionof china security index 300 movement with least squares support vector machine[J].Procedia Computer Science, 2014, 31:869 -874.

[5]. Liu, E. . (2021). Comparison of stock price prediction ability based on GARCH and BP_ANN. 2021 2nd International Conference on Computing and Data Science (CDS).

[6]. Deng, X. , Liang, W. , & Huang, N. . (2019). Stock prediction research based on dae-bp neural network. Computer Engineering and Applications.

[7]. Hochreiter, S.; Schmidhuber, J. Long short-term memory[J]. Neural Comput.1997, 9, 1735–1780.

[8]. Kingma, D. P., & Ba, J. (2015, January). Adam: A Method for Stochastic Optimization. In ICLR (Poster).

[9]. Huang, G., Liu, Z., Van Der Maaten, L., & Weinberger, K. Q. (2017). Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 4700-4708).

[10]. Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., & Wojna, Z. (2016). Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 2818-2826).


Cite this article

Xiao,J. (2023). Stock Prediction using LSTM model. Applied and Computational Engineering,8,74-79.

Data availability

The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.

Disclaimer/Publisher's Note

The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

About volume

Volume title: Proceedings of the 2023 International Conference on Software Engineering and Machine Learning

ISBN:978-1-915371-63-8(Print) / 978-1-915371-64-5(Online)
Editor:Anil Fernando, Marwan Omar
Conference website: http://www.confseml.org
Conference date: 19 April 2023
Series: Applied and Computational Engineering
Volume number: Vol.8
ISSN:2755-2721(Print) / 2755-273X(Online)

© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license. Authors who publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See Open access policy for details).

References

[1]. Pahwa, N., Khalfay, N., Soni, V., & Vora, D. (2017). Stock prediction using machine learning a review paper. International Journal of Computer Applications, 163(5), 36-43.

[2]. TIAN Xiang,DENG Feiqi. Application of Accurate Online Support Vector Regression in Stock Index Forecasting[J]. Computer Engineering,2005,31(22):18-20

[3]. FENG Pan,CAO Xianbing. An Empirical Study on Stock Price Analysis and Prediction Based on ARMA Model[J]. Mathematics in Practice and Theory, 2011(22): 84-90

[4]. Wang Shuai,Shang Wei. Forecasting directionof china security index 300 movement with least squares support vector machine[J].Procedia Computer Science, 2014, 31:869 -874.

[5]. Liu, E. . (2021). Comparison of stock price prediction ability based on GARCH and BP_ANN. 2021 2nd International Conference on Computing and Data Science (CDS).

[6]. Deng, X. , Liang, W. , & Huang, N. . (2019). Stock prediction research based on dae-bp neural network. Computer Engineering and Applications.

[7]. Hochreiter, S.; Schmidhuber, J. Long short-term memory[J]. Neural Comput.1997, 9, 1735–1780.

[8]. Kingma, D. P., & Ba, J. (2015, January). Adam: A Method for Stochastic Optimization. In ICLR (Poster).

[9]. Huang, G., Liu, Z., Van Der Maaten, L., & Weinberger, K. Q. (2017). Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 4700-4708).

[10]. Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., & Wojna, Z. (2016). Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition (pp. 2818-2826).