Stock Price predication based on Linear Regression, RNN, LSTM
DOI:
https://doi.org/10.54691/bcpbm.v38i.3715Keywords:
Stock Price Prediction; Machine Learning; Linear Regression; Random Forest; LSTM.Abstract
The prediction of stock price has always been a topic of concern by the financial analysis industry. With the progress of science and technology, the prediction methods of stock price are becoming more and more rich and advanced. From classical linear regression to the state-of-art neural network scenarios, from mathematics to AI deep learning, the introduction of computers and the development of programming also provide a new direction for the prediction of stock prices. This study takes the stock of Johnson & Johnson in the past five years as an example, selects the open, high, low price of the stock as the explanatory variable, and chooses the close price as the explanatory variable to establish a linear regression model. This study also establishes RNN and LSTM models to predict stock prices. Subsequently, the R2, RMSE, MAE of the model are evaluated, where LSTM model have the best R2 score and the best prediction of future stock price. These results shed light on guiding further exploration to the short-term stock price prediction.
Downloads
References
Wang Peidong. Analysis and prediction of stock price based on multiple linear regression. Science and technology economic market, 2020, vol. 01, pp 90-91.
Kohara K, Ishikawa T, Fukuhara Y, et al. Stock price prediction using prior knowledge and neural networks. Intelligent Systems in Accounting, Finance & Management, 1997, 6(1): 11-22.
Yu P, Yan X. Stock price prediction based on deep neural networks. Neural Computing and Applications, 2020, 32(6): 1609-1628.
Hidalgo B, Goodman M. Multivariate or multivariable regression?. American journal of public health, 2013, 103(1): 39-40.
Shah D, Isah H, Zulkernine F. Stock market analysis: A review and taxonomy of prediction techniques. International Journal of Financial Studies, 2019, 7(2): 26.
IBM Cloud Education. Recurrent Neural Networks, IBM, Retrieved from: https://www.ibm.com/cloud/learn/recurrent-neural-networks
Erin Schumaker. Timeline: How coronavirus got started, abcNEWS, September 22, 2020, Retrieved from: https://abcnews.go.com/Health/timeline-coronavirus-started/story?id=69435165
Goh T S, Henry H, Albert A. Determinants and prediction of the stock market during COVID-19: Evidence from Indonesia. The Journal of Asian Finance, Economics and Business, 2021, 8(1): 1-6.
Pushkar Jain. Stock Price Prediction, Kaggle, Retrieved from: https://www.kaggle.com/code/l33tc0d3r/stock-price-prediction/notebook
Yash Patel. Advanced Stock Pred using SVR, RFR, KNN, LSTM, GRU, Kaggle, Retrieved from: https://www.kaggle.com/code/ysthehurricane/advanced-stock-pred-using-svr-rfr-knn-lstm-gru/notebook