Predicting Stock Prices Using The RF-LSTM Combination Model
DOI:
https://doi.org/10.54097/ptm7gz19Keywords:
Machine learning; Stock price prediction; Long-short term memory; Random Forest.Abstract
Because of the nonlinearity and complexity of stock data, a single model's prediction performance is insufficient. A combined RF-LSTM model is suggested to forecast the closing price of stocks in order to solve this problem. Firstly, stock data is obtained from the Kaggle platform, feature sets are constructed, and data is normalized. Secondly, considering the high nonlinearity and information redundancy among multiple features, the optimal feature set is selected using random forest (RF) to reduce data dimensionality and training complexity. Ultimately, a long-short term memory (LSTM) network—which is capable of processing time series data in deep learning—is used to forecast stock prices, and the prediction model is modified accordingly. Comparing the proposed RF-LSTM combined model to the single LSTM neural network model, the results indicate a reduction in root mean squared error (RMSE) and mean squared error (MSE) of 4.14% and 1.00%, respectively. The prediction accuracy of stock prices can be increased by using this combined model.
Downloads
References
Su Z, Fang T, Yin L. Understanding stock market volatility: What is the role of US uncertainty. The North American Journal of Economics and Finance, 2019, 48: 582-590.
Nikou M, Mansourfar G, Bagherzadeh J. Stock price prediction using DEEP learning algorithm and its comparison with machine learning algorithms. Intelligent Systems in Accounting, Finance and Management, 2019, 26(4): 164-174.
Balaji A J, Ram D S H, Nair B B. Applicability of deep learning models for stock price forecasting an empirical study on BANKEX data. Procedia computer science, 2018, 143: 947-953.
Kumar G, Jain S, Singh U P. Stock market forecasting using computational intelligence: A survey. Archives of computational methods in engineering, 2021, 28(3): 1069-1101.
Orimoloye L O, Sung M C, Ma T, et al. Comparing the effectiveness of deep feedforward neural networks and shallow architectures for predicting stock price indices. Expert Systems with Applications, 2020, 139: 112828.
Chen K, Zhou Y, Dai F. A LSTM-based method for stock returns prediction: A case study of China stock market. 2015 IEEE international conference on big data (big data). IEEE, 2015: 2823-2824.
Tan Z, Yan Z, Zhu G. Stock selection with random forest: An exploitation of excess return in the Chinese stock market. Heliyon, 2019, 5(8).
Lohrmann C, Luukka P. Classification of intraday S&P500 returns with a Random Forest. International Journal of Forecasting, 2019, 35(1): 390-407.
Oriani F B, Coelho G P. Evaluating the impact of technical indicators on stock forecasting. 2016 IEEE Symposium Series on Computational Intelligence (SSCI). IEEE, 2016: 1-8.
Schonlau M, Zou R Y. The random forest algorithm for statistical learning. The Stata Journal, 2020, 20(1): 3-29.
Bansal M, Goyal A, Choudhary A. A comparative analysis of K-nearest neighbor, genetic, support vector machine, decision tree, and long short-term memory algorithms in machine learning. Decision Analytics Journal, 2022, 3: 100071.
Downloads
Published
Issue
Section
License
Copyright (c) 2024 Highlights in Science, Engineering and Technology

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.







