Estimation of Stock Price Using LSTM Algorithm and Sentiment Analysis

Authors

  • Dr. Varsha Bendre Associate Professor, Department of Electronics and Telecommunications, Pimpri Chinchwad College of Engineering, Pune

Keywords:

Stock Price Prediction, Convolutional Neural Network, Training, LSTM, Sentiment Analysis, Deep Learning

Abstract

Predicting price of the stock is a complex job and it is almost impossible to predict the exact amount of the stock. However, it's possible to estimate future amount of the stock through searching at historical information. There are various machine learning models available with which stock price can be estimated. In this paper, initially a detailed survey is presented that is based on a comparison and examination of various deep learning algorithms for estimation of stock price. It includes Linear Regression, Support Vector Machine, Auto Regressive Integrated Moving Average, Convolutional Neural Network, Long Short-Term Memory, Artificial Neural network. It is observed that the LSTM algorithm has a better performance as compared to the others. In this work a univariate model is trained to estimate the price of the stock using LSTM model. To improve the results further a sentiment analysis based on twitter data is performed and a multivariate LSTM model is trained. The results presented in this work are based on three stocks Britannia, HDFC bank and Axis bank. The state-of-the-art natural language processing tool BERT are used to recognize the sentiments of text, and the long short term memory neural network (LSTM), which is good at analyzing time series data, is applied to forecast the stock price with stock historical transaction information and text sentiments The various performance parameters are also discussed in this paper. The analysis is performed based on changing number of epochs and it is observed that error percentage reduced with increasing number of epochs.

 

Downloads

Download data is not yet available.

References

Sukesti, I. Ghozali, F. Fuad, A. Kharis Almasyhari, and N. Nurcahyono, “Factors Affecting the Stock Price: The Role of Firm Performance,” The Journal of Asian Finance, Economics and Business, vol. 8, no. 2, pp. 165–173, Feb. 2021.

J. Rasheed, A. Jamil, A. Ali Hameed, M. Ilyas, A. Özyavaş and N. Ajlouni, "Improving Stock Prediction Accuracy Using CNN and LSTM," 2020 International Conference on Data Analytics for Business and Industry: Way Towards a Sustainable Economy (ICDABI), 2020, pp. 1-5

Mehar Vijh, Deeksha Chandola, Vinay Anand Tikkiwal, Arun Kumar, “Stock Closing Price Prediction using Machine Learning Techniques”, Procedia Computer Science, Volume 167, 2020, Pages 599-606.

Seber, George AF and Lee, Alan J. (2012) “Linear regression analysis.” John Wiley & Sons 329

Reichek, Nathaniel, and Richard B. Devereux. (1982) “Reliable estimation of peak left ventricular systolic pressure by M-mode echographicdetermined end-diastolic relative wall thickness: identification of severe valvular aortic stenosis in adult patients.” American heart journal 103 (2): 202-209.

Chong, Terence Tai-Leung, and Wing-Kam Ng. (2008) “Technical analysis and the London stock exchange: testing the MACD and RSI rules using the FT30.” Applied Economics Letters 15 (14): 1111-1114.

Zhang, G. Peter. (2003) “Time series forecasting using a hybrid ARIMA and neural network mode.” Neurocomputing 50: 159-175.

Liaw, Andy, and Matthew Wiener. (2002) “Classification and regression by Random Forest.” R news 2 (3): 18-22.

Li, Lei, Yabin Wu, Yihang Ou, Qi Li, Yanquan Zhou, and Daoxin Chen. (2017) “Research on machine learning algorithms and feature extraction for time series.” IEEE 28th Annual International Symposium on Personal, Indoor, and Mobile Radio Communications (PIMRC): 1-5.

Oyeyemi, Elijah O., Lee-Anne McKinnell, and Allon WV Poole. (2007) “Neural network-based prediction techniques for global modeling of M (3000) F2 ionospheric parameter.” Advances in Space Research 39 (5): 643-650.

G.W.R.I. Wijesinghe, R.M.K.T. Rathnayaka. "ARIMA and ANN Approach for forecasting daily stock price

fluctuations of industries in Colombo Stock Exchange, Sri Lanka", 2020 5th International Conference on Information Technology Research (ICITR), 2020

Ayodele Ariyo Adebiyi, Aderemi Oluyinka Adewumi, Charles Korede Ayo, "Comparison of ARIMA and Artificial Neural Networks Models for Stock Price Prediction", Journal of Applied Mathematics, vol. 2014, Article ID 614342, 7 pages, 2014.

Mehtab, Sidra and Sen, Jaydip, A Robust Predictive Model for Stock Price Prediction Using Deep Learning and Natural Language Processing (December 1, 2019). Proceedings of the 2019 International Conference on Business Analytics and Intelligence (ICBAI 2019), December 2019, Bangalore, INDIA.

S. Siami-Namini, N. Tavakoli and A. Siami Namin, "A Comparison of ARIMA and LSTM in Forecasting Time Series," 2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA), 2018, pp. 1394-1401

Lakshminarayanan, S. and John P. McCrae. “A Comparative Study of SVM and LSTM Deep Learning Algorithms for Stock Market Prediction.” AICS (2019).

G.G. Rajput, Bhagwat H. Kaular, “A Study of Effect of Training Period Duration and Share Split Event on Predicting Stock Price using Neural Networks”, 2017, International Journal of Advances in Electronics and Computer Science Volume 4(7)

Panwar, B.; Dhuriya, G.; Johri, P.; Yadav, S.S.; Gaur, N. “Stock Market Prediction Using Linear Regression and SVM”. In Proceedings of the 2021 International Conference on Advance Computing and Innovative Technologies in Engineering (ICACITE), Greater Noida, India, 4–5 March 2021; pp. 629–631.

S. Madge, "Predicting Stock Price Direction using Support Vector," Independent Work Report Spring, 2015.

A. Meyler, K. Geoff and Q. Terry, "Forecasting Irish Inflation Using ARIMA Models," 1998.

Q. Ma, "Comparison of ARIMA, ANN and LSTM for Stock Price Prediction," in E3S Web of Conferences, 2020.

R. Taneja and V., "Stock market prediction using regression," International Research Journal of Engineering and Technology (IRJET), vol. 05, no. 05, 2018.

O. Aissaoui, Y. Madani, L. Oughdir, A. Dakkak and Y. EL ALLIOUI, "A Multiple Linear Regression-Based Approach to Predict Student Performance," http://www.researchgate.net/, 2020, pp. 9-23.

A. Gupta and T. Nagalakshmi, "Stock Price Prediction using Linear Regression," International Journal of Innovative Technology and Exploring Engineering (IJITEE) ISSN: 2278-3075, Volume-8 Issue-12, October,2019

M. Khashei and M. Bijari, "An artificial neural network (p, d, q) model for timeseries forecasting," Expert Systems with Applications Volume 37, Issue 1, January 2010.

P. Zhang, E. Patuwo and M. Hu, "Forecasting with Artificial Neural Networks: The State of the Art," International Journal of Forecasting.

E. Hoseinzade and S. Haratizadeh, "CNNpred: CNN-based stock market prediction using a diverse set of variables," Expert Systems with Applications, 2019.

V. Gururaj and S. V R, "Stock Market Prediction using Linear Regression and Support Vector Machines," International Journal of Applied Engineering Research, vol. 14, no. 8, 2019.

H. Ahuja, S. Mehra and Y. Bhavaraju, "Stock Price Prediction using SVM and LSTM," International Research Journal of Engineering and Technology (IRJET), 2020.

R. Nandakumar, L. Y V and U. K R, "Stock Price Prediction Using Long Short-Term Memory," International Research Journal of Engineering and Technology (IRJET), vol. 5, no. 3, 2018.

Rubi Gupta, Min Chen,” Sentiment Analysis for Stock Price Prediction”,IEEE Conference on Multimedia Information Processing and Retrieval (MIPR)[2020]

Published

14-11-2024

How to Cite

Dr. Varsha Bendre. (2024). Estimation of Stock Price Using LSTM Algorithm and Sentiment Analysis. Communications in Mathematics and Applications, 15(2). Retrieved from https://rgnpublications.com/journals/index.php/cma/article/view/2595

Issue

Section

Research Article