
Comparative Analysis of K-NN and Naïve Bayes Methods to Predict Stock Prices
Author(s) -
Budi Soepriyanto
Publication year - 2021
Publication title -
international journal of computer and information system
Language(s) - English
Resource type - Journals
ISSN - 2745-9659
DOI - 10.29040/ijcis.v2i2.32
Subject(s) - naive bayes classifier , database transaction , bayes' theorem , profit (economics) , stock (firearms) , econometrics , transaction data , stock price , k nearest neighbors algorithm , value (mathematics) , computer science , business , economics , artificial intelligence , support vector machine , machine learning , microeconomics , bayesian probability , engineering , database , mechanical engineering , paleontology , series (stratigraphy) , biology
— Buying and selling shares is a transaction that is widely carried out at this time, especially buying and selling stocks online which are widely available in the market, to make buying and selling shares require ability or knowledge so that the buying and selling of shares are profitable, to be able to help economic players predict prices. Profit shares or not purchased in the future, this research will conduct stock price predictions using classification methods, namely K-Nearest Neighbor and Naïve Bayes, to predict the stock price data used for one month in minute levels totalling 39065 data, based on prediction results. The highest results obtained were using Naïve Bayes with an accuracy value of 69.38 then the K-Nearest Neighbor method with a K = 5 value of 67.25%, based on these results it can be concluded that the use of the K-Nearest Neighbor and Naïve Bayes methods for prediction share price not yet owned I high accuracy, so it can be combined with other methods or by using other variable predictors.