STOCK PRICE PREDICTION USING SUPPORT VECTOR REGRESSION AND K-NEAREST NEIGHBORS: A COMPARISON

Authors

  • Ghosh Madhumita Research Scholar, Department of Mathematics, Gujarat University, Ahmedabad-380009
  • Ravi Gor Department of Mathematics, Gujarat University, Ahmedabad-380009

DOI:

https://doi.org/10.29121/ijoest.v6.i4.2022.354

Keywords:

Supervised Learning, Support Vector Regression (SVR), K-Nearest Neighbors (KNN), Stock Market

Abstract

Supervised Learning is an important type of Machine learning. It includes regression and classification problems. In Supervised learning, Support Vector Machine (SVM) and K-Nearest Neighbors (KNN) can be used for classification and regression. Here, both algorithms are used for regression problem. The stock data is trained by SVR and KNN respectively to predict the stock price of the next day using python tool. Both algorithms are compared and it is observed that the price predicted by SVR is closer as compared to KNN.

Downloads

Download data is not yet available.

References

Martin, J. M. (2012). Adaptive Motion Compensation in Radiotherapy. CRC Press. https://www.routledge.com/Adaptive-Motion-Compensation-in-Radiotherapy/Murphy/p/book/9781138374294

algorithmxlab (n.d.). https://algorithmxlab.com/blog/applications-machine-learning-finance/

Singh, A. (2018). A Practical Introduction to K-Nearest Neighbors Algorithm for Regression (with Python code). https://www.analyticsvidhya.com/blog/2018/08/k-nearest-neighbor-introduction-regression-python/

analyticsvidhya (n.d.). https://www.analyticsvidhya.com/blog/2018/10/predicting-stock-price-machine-learningnd-deep-learning-techniques-python/

Bhavsar, S. & Gor, R. (2022). Predicting Restaurant Ratings using Back Propagation Algorithm. International Organization of Scientific Research Journal of Applied Mathematics (IOSR-JM), 18(2), 5-9. https://iosrjournals.org/iosr-jm/papers/Vol18-issue2/Ser-2/C1802021014.pdf

Bhavsar, S. & Gor, R. (2022). Comparison of Back propagation algorithms: Bidirectional GRU and Genetic Deep Neural Network for Churn Customer. IOSR Journal of Computer Engineering (IOSR-JCE), 24(3), 7-12.

Bhavsar, S. & Gor, R. (2022). Stock Price Prediction using Grid Hyper parameter Tuning in Gated Recurrent Unit (In Press). International Journal of Engineering Science Technologies (IJOEST).

corporatefinanceinstitute. (n.d.). https://corporatefinanceinstitute.com/resources/knowledge/trading-investing/financial-markets/

datarevenue. (n.d.). https://www.datarevenue.com/en-blog/machine-learning-for-trading

finance.yahoo (n.d.). https://finance.yahoo.com/quote/yhoo/history/

Ghosh, M. & Gor, R. (2022). Short Message Service Classifier Application using Naïve Bayes algorithm. International Organization of Scientific Research Journal of Computer Engineering (IOSR-JCE).

Gururaj, V. Shriya , V. & Ashwini, K. (2019). Stock Market Prediction using Linear Regression and Support Vector Machines. International Journal of Applied Engineering Research, 14(8), 1931-1934. https://www.ripublication.com/ijaer19/ijaerv14n8_24.pdf

Julius, T. & Seng, H. (2019). LQ45 Stock Index Prediction using k-Nearest Neighbors Regression. International Journal of Recent Technology and Engineering (IJRTE), 8(3). https://www.researchgate.net/profile/Julius-Tanuwijaya/publication/336715759_LQ45_Stock_Index_Prediction_using_k-Nearest_Neighbors_Regression/links/5dae7e5ca6fdccc99d929d4a/LQ45-Stock-Index-Prediction-using-k-Nearest-Neighbors-Regression.pdf

Mohammadreza, G. & Hamidreza , A. (2019). Forecasting Stock Market with Support Vector Regression and Butterfly Optimization Algorithm. Elsevier, 1-11. https://arxiv.org/abs/1905.11462

ritchieng. (n.d.). https://www.ritchieng.com/machine-learning-k-nearest-neighbors-knn/

Sadegh, B. I. & Mohammad, B. (2013). Application of K-Nearest Neighbor (KNN) Approach for Predicting Economic Events: Theoretical Background. International Journal of Engineering Research and Applications, 3(5), 605-610. https://www.researchgate.net/publication/304826093_Application_of_K-nearest_neighbor_KNN_approach_for_predicting_economic_events_theoretical_background

Sahoo, P. & Charlapally, K. (2015). Stock Price Prediction Using Regression Analysis. International Journal of Scientific & Engineering Research, 6(3), 1855-1859. https://www.ijser.org/researchpaper/Stock-Price-Prediction-Using-Regression-Analysis.pdf

Samruddhi, K. & Kumar, R. (2020). Used Car Price Prediction using K-Nearest Neighbor Based Model. International Journal of Innovative Research in Applied Sciences and Engineering, 4(3), 686-689. https://www.ijirase.com/assets/paper/issue_1/volume_4/V4-Issue-3-686-689.pdf

searchengineland. (n.d.). Retrieved from https://searchengineland.com/heres-how-i-used-python-to-build-a-regression-model-using-an-e-commerce-dataset-326493

Seethalakshmi, R. (2018). Analysis of stock market predictor variables using Linear Regression. International Journal of Pure and Applied Mathematics, 199(15), 369-378. https://www.researchgate.net/publication/326253896_Analysis_of_stock_market_predictor_variables_using_linear_regression

Shakhla, S. Shah, B. Unadkat, V. Kanani, P. & Shah, N. (2018). Stock Price Trend Prediction Using Multiple Linear Regression. International Journal of Engineering Science Invention, 7(10), 29-33. http://www.ijesi.org/papers/Vol(7)i10/Version-2/D0710022933.pdf

towardsai. (n.d.). https://towardsai.net/p/machine-learning/netflix-stock-prediction-model-a-comparative-study-of-linear-regression-k-nearest-neighbor-knn-4527ff17939b

towardsdatascience. (n.d.). https://towardsdatascience.com/machine-learning-techniques-applied-to-stock-price-prediction-6c1994da8001

Martin, J. M. (2012). Adaptive Motion Compensation in Radiotherapy. CRC Press. https://www.routledge.com/Adaptive-Motion-Compensation-in-Radiotherapy/Murphy/p/book/9781138374294

algorithmxlab (n.d.). https://algorithmxlab.com/blog/applications-machine-learning-finance/

Singh, A. (2018). A Practical Introduction to K-Nearest Neighbors Algorithm for Regression (with Python code). https://www.analyticsvidhya.com/blog/2018/08/k-nearest-neighbor-introduction-regression-python/

analyticsvidhya (n.d.). https://www.analyticsvidhya.com/blog/2018/10/predicting-stock-price-machine-learningnd-deep-learning-techniques-python/

Bhavsar, S. & Gor, R. (2022). Predicting Restaurant Ratings using Back Propagation Algorithm. International Organization of Scientific Research Journal of Applied Mathematics (IOSR-JM), 18(2), 5-9. https://iosrjournals.org/iosr-jm/papers/Vol18-issue2/Ser-2/C1802021014.pdf

Bhavsar, S. & Gor, R. (2022). Comparison of Back propagation algorithms: Bidirectional GRU and Genetic Deep Neural Network for Churn Customer. IOSR Journal of Computer Engineering (IOSR-JCE), 24(3), 7-12.

Bhavsar, S. & Gor, R. (2022). Stock Price Prediction using Grid Hyper parameter Tuning in Gated Recurrent Unit (In Press). International Journal of Engineering Science Technologies (IJOEST).

corporatefinanceinstitute. (n.d.). https://corporatefinanceinstitute.com/resources/knowledge/trading-investing/financial-markets/

datarevenue. (n.d.). https://www.datarevenue.com/en-blog/machine-learning-for-trading

finance.yahoo (n.d.). https://finance.yahoo.com/quote/yhoo/history/

Ghosh, M. & Gor, R. (2022). Short Message Service Classifier Application using Naïve Bayes algorithm. International Organization of Scientific Research Journal of Computer Engineering (IOSR-JCE).

Gururaj, V. Shriya , V. & Ashwini, K. (2019). Stock Market Prediction using Linear Regression and Support Vector Machines. International Journal of Applied Engineering Research, 14(8), 1931-1934. https://www.ripublication.com/ijaer19/ijaerv14n8_24.pdf

Julius, T. & Seng, H. (2019). LQ45 Stock Index Prediction using k-Nearest Neighbors Regression. International Journal of Recent Technology and Engineering (IJRTE), 8(3). https://www.researchgate.net/profile/Julius-Tanuwijaya/publication/336715759_LQ45_Stock_Index_Prediction_using_k-Nearest_Neighbors_Regression/links/5dae7e5ca6fdccc99d929d4a/LQ45-Stock-Index-Prediction-using-k-Nearest-Neighbors-Regression.pdf

Mohammadreza, G. & Hamidreza , A. (2019). Forecasting Stock Market with Support Vector Regression and Butterfly Optimization Algorithm. Elsevier, 1-11. https://arxiv.org/abs/1905.11462

ritchieng. (n.d.). https://www.ritchieng.com/machine-learning-k-nearest-neighbors-knn/

Sadegh, B. I. & Mohammad, B. (2013). Application of K-Nearest Neighbor (KNN) Approach for Predicting Economic Events: Theoretical Background. International Journal of Engineering Research and Applications, 3(5), 605-610. https://www.researchgate.net/publication/304826093_Application_of_K-nearest_neighbor_KNN_approach_for_predicting_economic_events_theoretical_background

Sahoo, P. & Charlapally, K. (2015). Stock Price Prediction Using Regression Analysis. International Journal of Scientific & Engineering Research, 6(3), 1855-1859. https://www.ijser.org/researchpaper/Stock-Price-Prediction-Using-Regression-Analysis.pdf

Samruddhi, K. & Kumar, R. (2020). Used Car Price Prediction using K-Nearest Neighbor Based Model. International Journal of Innovative Research in Applied Sciences and Engineering, 4(3), 686-689. https://www.ijirase.com/assets/paper/issue_1/volume_4/V4-Issue-3-686-689.pdf

searchengineland. (n.d.). Retrieved from https://searchengineland.com/heres-how-i-used-python-to-build-a-regression-model-using-an-e-commerce-dataset-326493

Seethalakshmi, R. (2018). Analysis of stock market predictor variables using Linear Regression. International Journal of Pure and Applied Mathematics, 199(15), 369-378. https://www.researchgate.net/publication/326253896_Analysis_of_stock_market_predictor_variables_using_linear_regression

Shakhla, S. Shah, B. Unadkat, V. Kanani, P. & Shah, N. (2018). Stock Price Trend Prediction Using Multiple Linear Regression. International Journal of Engineering Science Invention, 7(10), 29-33. http://www.ijesi.org/papers/Vol(7)i10/Version-2/D0710022933.pdf

towardsai. (n.d.). https://towardsai.net/p/machine-learning/netflix-stock-prediction-model-a-comparative-study-of-linear-regression-k-nearest-neighbor-knn-4527ff17939b

towardsdatascience. (n.d.). https://towardsdatascience.com/machine-learning-techniques-applied-to-stock-price-prediction-6c1994da8001

Downloads

Published

2022-07-05

How to Cite

Ghosh, M., & Gor, R. (2022). STOCK PRICE PREDICTION USING SUPPORT VECTOR REGRESSION AND K-NEAREST NEIGHBORS: A COMPARISON. International Journal of Engineering Science Technologies, 6(4), 1–9. https://doi.org/10.29121/ijoest.v6.i4.2022.354

Most read articles by the same author(s)