Research Article
BibTex RIS Cite

Sector-Based Stock Price Prediction with Machine Learning Models

Year 2022, Volume: 5 Issue: 3, 415 - 426, 31.12.2022
https://doi.org/10.35377/saucis...1200151

Abstract

Stock price prediction is an important topic for investors and companies. The increasing effect of machine learning methods in every field also applies to stock forecasting. In this study, it is aimed to predict the future prices of the stocks of companies in different sectors traded on the Borsa Istanbul (BIST) 30 Index. For the study, the data of two companies selected as examples from each of the holding, white goods, petrochemical, iron and steel, transportation and communication sectors were analyzed. In the study, in addition to the share analysis of the sectors, the price prediction performances of the machine learning algorithm on a sectoral basis were examined. For these tests, XGBoost, Support Vector Machines (SVM), K-nearest neighbors (KNN) and Random Forest (RF) algorithms were used. The obtained results were analyzed with mean absolute error (MAE), mean absolute percent error (MAPE), mean squared error (MSE), and R2 correlation metrics. The best estimations on a sectoral basis were made for companies in the Iron and Steel and Petroleum field. One of the most important innovations in the study is the examination of the effect of current macro changes on the forecasting model. As an example, the effect of the changes in the Central Bank Governors, which took place three times in the 5-year period, on the forecast was investigated. The results showed that the unpredictable effects on the policies after the change of Governors also negatively affected the forecast performance

Thanks

This study was partially carried out in the Software Technologies Research Laboratory (STAR Lab) of the Kocaeli University Software Engineering Department.

References

  • [1] I. K. Nti, A. F. Adekoya and B. A. Weyori, "A systematic review of fundamental and technical analysis of stock market predictions," Artificial Intelligence Review, 53(4), pp. 3007-3057, 2020.
  • [2] H. Dağlı, "Sermaye Piyasası ve Portföy Analizi," 3rd Ed., Derya Kitabevi, Trabzon, 2009.
  • [3] S. Tekin, "Destek vektör makineleri yöntemi ile İMKB 100 endeksi hareket yönü tahmini" Uşak University Social Sciences Institute, Master Thesis, Uşak, 2013.
  • [4] U Demirel, "Hisse senedi fiyatlarının makine öğrenmesi yöntemleri ve derin öğrenme algoritmaları ile tahmini", Giresun University Social Sciences Institute, Master Thesis, 2019
  • [5] P. Chhajer, M. Shah and A. Kshirsagar, "The applications of artificial neural networks, support vector machines, and long–short term memory for stock market prediction," Decision Analytics Journal, 2, 100015, 2022.
  • [6] Z. D. Akşehir and E. Kılıç, "Prediction of Bank Stocks Price with Machine Learning Techniques", TBV Journal of Computer Science and Engineering, 12 (2) , pp. 30-39, 2019.
  • [7] E. Filiz, H. A. Karaboğa and S. Akoğul, "Bist-50 index change values classification using machine learning methods and artificial neural networks", Çukurova Üniversitesi Sosyal Bilimler Enstitüsü Dergisi, 26(1), pp. 231-241, 2017.
  • [8] H. S. Sim, H. I. Kim and J. J. Ahn, "Is Deep Learning for Image Recognition Applicable to Stock Market Prediction", Complexity, 4324878, 2019.
  • [9] Z. Ivanovski, N. Ivanovska and Z. Narasanov, "The regression analysis of stock returns at MSE", Journal of Modern Accounting and Auditing, 12(4), pp. 217-224, 2016.
  • [10] G. Şişmanoğlu, F. Koçer, M. Önde and O. K. Sahingoz, " Price Forecasting in Stock Exchange with Deep Learning Methods ", BEU Journal of Science, 9(1), pp. 434-445, 2020.
  • [11] V. Gururaj, V.R. Shriya, and K. Ashwini, "Stock market prediction using linear regression and support vector machines", Int J Appl Eng Res, 14(8), 1931-1934, 2019.
  • [12] S. Karasu, A. Altan, S. Bekiros and W. Ahmad, "A new forecasting model with wrapper-based feature selection approach using multi-objective optimization technique for chaotic crude oil time series", Energy, 212, 118750, 2020.
  • [13] N. K. Ustalı, N. Tosun, and Ö. Tosun, "Stock Price Forecasting Using Machine Learning Techniques", Eskişehir Osmangazi University Journal of Economics and Administrative Sciences, 16(1), pp. 1-16, 2021.
  • [14] M. E. Arslan and P. Kırcı, "Stock Market Analysis with Machine Learning". European Journal of Science and Technology, (28), pp. 1117-1120, 2021.
  • [15] S. Arslankaya and Ş. Toprak, "Using Machine Learning and Deep Learning Algorithms for Stock Price Prediction", International Journal of Engineering Research and Development, 13(1), 178-192, 2021.
  • [16] Y. C. Chen and W. C. Huang, "Constructing a stock-price forecast CNN model with gold and crude oil indicators", Applied Soft Computing, 112, 107760, 2021.
  • [17] Z. D. Akşehir and E. Kılıç, "A new rule-based approach for encountered data imbalance problem in stock predicition and 2D-CNN model", TBV Journal of Computer Science and Engineering, 15 (1), pp. 6-13, 2022.
  • [18] M. Leippold, Q. Wang and W. Zhou, "Machine learning in the Chinese stock market", Journal of Financial Economics, 145(2), pp. 64-82, 2022.
  • [19] V. V. Prasad, S. Gumparthi, L.Y. Venkataramana, S. Srinethe, R. M. Sruthi Sree and K. Nishanthi, "Prediction of Stock Prices Using Statistical and Machine Learning Models: A Comparative Analysis", The Computer Journal, 65(5), 1338-1351, 2022.
  • [20] V. Vapnik, S. Golowich and A. "Smola, Support vector method for function approximation, regression estimation and signal processing", Advances in neural information processing systems, 9, 1996.
  • [21] S.B. Imandoust and M. Bolandraftar, "Application of k-nearest neighbor (knn) approach for predicting economic events: Theoretical background", Internat. J. Eng. Res. Appl. 3(5), 605-610, 2013.
  • [22] L. Huang, Y. Li, S. Chen, Q. Zhang, Y. Song, J. Zhang and M. Wang, "Building safety monitoring based on extreme gradient boosting in distributed optical fiber sensing", Optical Fiber Technol., 55, 102149, 2020.
  • [23] S. Obata, C. J. Cieszewski, R. C. Lowe III, and P. Bettinger, "Random Forest Regression Model for Estimation of the Growing Stock Volumes in Georgia, USA, Using Dense Landsat Time Series and FIA Dataset" Remote Sensing, 13(2), 218.
  • [24] IS Investment, , “Market Data,” 2022. [Online]. Available: https://www.isyatirim.com.tr. [Accessed: 24-May-2022].
  • [25] F. Alareqi and M. Z. Konyar , "High Accuracy Classification of Covid-19 from CT Images Using Transfer Learning Architectures", Dicle University Journal of Engineering, 13(3), pp. 457-466, 2022
  • [26] F. Al-Areqi and M. Z. Konyar, "Effectiveness evaluation of different feature extraction methods for classification of covid-19 from computed tomography images: A high accuracy classification study", Biomedical Signal Processing and Control, 76, 103662, 2022.
Year 2022, Volume: 5 Issue: 3, 415 - 426, 31.12.2022
https://doi.org/10.35377/saucis...1200151

Abstract

References

  • [1] I. K. Nti, A. F. Adekoya and B. A. Weyori, "A systematic review of fundamental and technical analysis of stock market predictions," Artificial Intelligence Review, 53(4), pp. 3007-3057, 2020.
  • [2] H. Dağlı, "Sermaye Piyasası ve Portföy Analizi," 3rd Ed., Derya Kitabevi, Trabzon, 2009.
  • [3] S. Tekin, "Destek vektör makineleri yöntemi ile İMKB 100 endeksi hareket yönü tahmini" Uşak University Social Sciences Institute, Master Thesis, Uşak, 2013.
  • [4] U Demirel, "Hisse senedi fiyatlarının makine öğrenmesi yöntemleri ve derin öğrenme algoritmaları ile tahmini", Giresun University Social Sciences Institute, Master Thesis, 2019
  • [5] P. Chhajer, M. Shah and A. Kshirsagar, "The applications of artificial neural networks, support vector machines, and long–short term memory for stock market prediction," Decision Analytics Journal, 2, 100015, 2022.
  • [6] Z. D. Akşehir and E. Kılıç, "Prediction of Bank Stocks Price with Machine Learning Techniques", TBV Journal of Computer Science and Engineering, 12 (2) , pp. 30-39, 2019.
  • [7] E. Filiz, H. A. Karaboğa and S. Akoğul, "Bist-50 index change values classification using machine learning methods and artificial neural networks", Çukurova Üniversitesi Sosyal Bilimler Enstitüsü Dergisi, 26(1), pp. 231-241, 2017.
  • [8] H. S. Sim, H. I. Kim and J. J. Ahn, "Is Deep Learning for Image Recognition Applicable to Stock Market Prediction", Complexity, 4324878, 2019.
  • [9] Z. Ivanovski, N. Ivanovska and Z. Narasanov, "The regression analysis of stock returns at MSE", Journal of Modern Accounting and Auditing, 12(4), pp. 217-224, 2016.
  • [10] G. Şişmanoğlu, F. Koçer, M. Önde and O. K. Sahingoz, " Price Forecasting in Stock Exchange with Deep Learning Methods ", BEU Journal of Science, 9(1), pp. 434-445, 2020.
  • [11] V. Gururaj, V.R. Shriya, and K. Ashwini, "Stock market prediction using linear regression and support vector machines", Int J Appl Eng Res, 14(8), 1931-1934, 2019.
  • [12] S. Karasu, A. Altan, S. Bekiros and W. Ahmad, "A new forecasting model with wrapper-based feature selection approach using multi-objective optimization technique for chaotic crude oil time series", Energy, 212, 118750, 2020.
  • [13] N. K. Ustalı, N. Tosun, and Ö. Tosun, "Stock Price Forecasting Using Machine Learning Techniques", Eskişehir Osmangazi University Journal of Economics and Administrative Sciences, 16(1), pp. 1-16, 2021.
  • [14] M. E. Arslan and P. Kırcı, "Stock Market Analysis with Machine Learning". European Journal of Science and Technology, (28), pp. 1117-1120, 2021.
  • [15] S. Arslankaya and Ş. Toprak, "Using Machine Learning and Deep Learning Algorithms for Stock Price Prediction", International Journal of Engineering Research and Development, 13(1), 178-192, 2021.
  • [16] Y. C. Chen and W. C. Huang, "Constructing a stock-price forecast CNN model with gold and crude oil indicators", Applied Soft Computing, 112, 107760, 2021.
  • [17] Z. D. Akşehir and E. Kılıç, "A new rule-based approach for encountered data imbalance problem in stock predicition and 2D-CNN model", TBV Journal of Computer Science and Engineering, 15 (1), pp. 6-13, 2022.
  • [18] M. Leippold, Q. Wang and W. Zhou, "Machine learning in the Chinese stock market", Journal of Financial Economics, 145(2), pp. 64-82, 2022.
  • [19] V. V. Prasad, S. Gumparthi, L.Y. Venkataramana, S. Srinethe, R. M. Sruthi Sree and K. Nishanthi, "Prediction of Stock Prices Using Statistical and Machine Learning Models: A Comparative Analysis", The Computer Journal, 65(5), 1338-1351, 2022.
  • [20] V. Vapnik, S. Golowich and A. "Smola, Support vector method for function approximation, regression estimation and signal processing", Advances in neural information processing systems, 9, 1996.
  • [21] S.B. Imandoust and M. Bolandraftar, "Application of k-nearest neighbor (knn) approach for predicting economic events: Theoretical background", Internat. J. Eng. Res. Appl. 3(5), 605-610, 2013.
  • [22] L. Huang, Y. Li, S. Chen, Q. Zhang, Y. Song, J. Zhang and M. Wang, "Building safety monitoring based on extreme gradient boosting in distributed optical fiber sensing", Optical Fiber Technol., 55, 102149, 2020.
  • [23] S. Obata, C. J. Cieszewski, R. C. Lowe III, and P. Bettinger, "Random Forest Regression Model for Estimation of the Growing Stock Volumes in Georgia, USA, Using Dense Landsat Time Series and FIA Dataset" Remote Sensing, 13(2), 218.
  • [24] IS Investment, , “Market Data,” 2022. [Online]. Available: https://www.isyatirim.com.tr. [Accessed: 24-May-2022].
  • [25] F. Alareqi and M. Z. Konyar , "High Accuracy Classification of Covid-19 from CT Images Using Transfer Learning Architectures", Dicle University Journal of Engineering, 13(3), pp. 457-466, 2022
  • [26] F. Al-Areqi and M. Z. Konyar, "Effectiveness evaluation of different feature extraction methods for classification of covid-19 from computed tomography images: A high accuracy classification study", Biomedical Signal Processing and Control, 76, 103662, 2022.
There are 26 citations in total.

Details

Primary Language English
Subjects Artificial Intelligence, Software Engineering
Journal Section Articles
Authors

Doğangün Kocaoğlu 0000-0002-5983-7855

Korhan Turgut 0000-0001-8759-3678

Mehmet Zeki Konyar 0000-0001-8914-5553

Publication Date December 31, 2022
Submission Date November 7, 2022
Acceptance Date November 30, 2022
Published in Issue Year 2022Volume: 5 Issue: 3

Cite

IEEE D. Kocaoğlu, K. Turgut, and M. Z. Konyar, “Sector-Based Stock Price Prediction with Machine Learning Models”, SAUCIS, vol. 5, no. 3, pp. 415–426, 2022, doi: 10.35377/saucis...1200151.

Sakarya University Journal of Computer and Information Sciences in Applied Sciences and Engineering: An interdisciplinary journal of information science      28938