Predictive Analysis of AAPL Stock Trend by Random Forest and K-NN Classifier
DOI:
https://doi.org/10.54097/pgh78d83Keywords:
APPLE; Random Forest; KNNAbstract
While perfection in stock market prediction is impossible to accomplish, minimizing the investment risk utilizing data mining classifier to forecast the Stock Market trend becomes one of the most popular fields to research. This paper analysis and forecast AAPL ’s daily stock trends by utilize two most frequently use data mining algorithm K-Nearest Neighbor and Random Forest Classifier. By comparing the accuracy of the two model to finds out which model would best estimate the AAPL’s stock price. Both Algorithm utilize simple rolling average as the predictors to increase the accuracy of the prediction. The result points out that random forest classifier has 61% of the total accuracy which is greater than K-Nearest Neighbor (KNN) with only 53% of accuracy in total for forecasting the AAPL stock trend. Random Forest Classifier have a better performance in predicting the AAPL’s stock market compared to KNN, however it may show a different result when it comes to other stock data.
Downloads
References
Imandoust, S. B., & Bolandraftar, M. Application of k-nearest neighbor (knn) approach for predicting economic events: Theoretical background. International journal of engineering research and applications, 2013, 3(5): 605-610.
Tan, T. Z., Quek, C., & Ng, G. S. Biological brain‐inspired genetic complementary learning for stock market and bank failure prediction 1. Computational intelligence, 2007, 23(2): 236-261.
Subha, M. V., & Nambi, S. T. Classification of Stock Index movement using k-Nearest Neighbours (k-NN) algorithm. WSEAS Transactions on Information Science & Applications, 2012, 9(9): 261-270.
Khaidem, L., Saha, S., & Dey, S. R. Predicting the direction of stock market prices using random forest. 2016. arXiv preprint arXiv:1605.00003.
Boateng, E. Y., Otoo, J., & Abaye, D. A. Basic tenets of classification algorithms K-nearest-neighbor, support vector machine, random forest and neural network: a review. Journal of Data Analysis and Information Processing, 2020, 8(4): 341-357.
Alkhatib, K., Najadat, H., Hmeidi, I., & Shatnawi, M. K. A. Stock price prediction using k-nearest neighbor (kNN) algorithm. International Journal of Business, Humanities and Technology, 2013, 3(3): 32-44.
Halvani, O., Steinebach, M., & Zimmermann, R. Authorship verification via k-nearest neighbor estimation. Notebook PAN at CLEF, 2013.
Abraham, R., Samad, M. E., Bakhach, A. M., El-Chaarani, H., Sardouk, A., Nemar, S. E., & Jaber, D. Forecasting a stock trend using genetic algorithm and random forest. Journal of Risk and Financial Management, 2022, 15(5): 188.
Ansary, M. S., & Brinto, A. Prediction of Stock Price Direction with Trading Indicators using Machine Learning Techniques. In 2022 IEEE International Women in Engineering (WIE) Conference on Electrical and Computer Engineering. 2022: 1-4.
Breiman, L. Random forests. Machine learning, 2001, 45: 5-32.
Downloads
Published
Issue
Section
License

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






