The Approaches to Predict Stock Prices by Random Forest
Abstract
People are always curious about how to predict the stock prices, various type of prediction tools are introduced to help people explore the trend of the stock price movement. With the development of the machine learning, there are more and more models and methods that we can use to predict the stock prices, while Random Forest, a typical machine learning algorithm, will be discussed in this article to examine its performance in the stock market. The data utilized in this study is sourced from Yahoo Finance, with several additional indicators computed and incorporated into feature set of the Random Forest model. To evaluate its performance, a comparison between the Random Forest model and the simple linear regression model is going to be conducted, which is a considerably basic model and serves as a benchmark for the minimum returns individuals can expect. The RMSE and MAPE will be compared firstly, which can help us assess which model demonstrates superior predictive accuracy, while the ROI derived from the strategy based on these models’ predictions will serve as a measure of their practical performance in the stock market. Collectively, this data will substantiate that Random Forest is indeed an effective model that is capable of assisting individuals in achieving greater profits.
References
- Hu, Z., Zhao, Y., & Khushi, M. (2021). A survey of forex and stock price prediction using deep learning. Applied System Innovation, 4(1), 9. https://doi.org/10.3390/asi4010009
- Khaidem, L., Saha, S., & Dey, S. R. (2016). Predicting the direction of stock market prices using random forest. arXiv preprint arXiv:1605.00003. https://doi.org/10.48550/arXiv.1605.00003
- Vijh, M., Chandola, D., Tikkiwal, V. A., & Kumar, A. (2020). Stock closing price prediction using machine learning techniques. Procedia Computer Science, 167, 599-606. https://doi.org/10.1016/j.procs.2020.03.326
- Jacobson, R. (1987). The validity of ROI as a measure of business performance. The American Economic Review, 77(3), 470-478. https://www.jstor.org/stable/1814548
- Sarica, A., Cerasa, A., & Quattrone, A. (2017). Random forest algorithm for the classification of neuroimaging data in Alzheimer's disease: A systematic review. Frontiers in Aging Neuroscience, 9, 329. https://doi.org/10.3389/fnagi.2017.00329
- Wright, M. N., & Ziegler, A. (2015). Ranger: A fast implementation of random forests for high dimensional data in C++ and R. arXiv preprint arXiv:1508.04409. https://doi.org/10.48550/arXiv.1508.04409
- Chai, T., & Draxler, R. R. (2014). Root mean square error (RMSE) or mean absolute error (MAE)?–Arguments against avoiding RMSE in the literature. Geoscientific Model Development, 7(3), 1247-1250. https://doi.org/10.5194/gmd-7-1247-2014
- Emioma, C. C., & Edeki, S. O. (2021). Stock price prediction using machine learning on least-squares linear regression basis. Journal of Physics: Conference Series, 1734(1), 012045. https://doi.org/10.1088/1742-6596/1734/1/012045