Yıl: 2021 Cilt: 34 Sayı: 1 Sayfa Aralığı: 63 - 82 Metin Dili: İngilizce DOI: 10.35378/gujs.679103 İndeks Tarihi: 03-11-2022

Predicting Stock Prices Using Machine Learning Methods and Deep Learning Algorithms: The Sample of the Istanbul Stock Exchange

Öz:
Stock market prediction in financial and commodity markets is a major challenge for speculators, investors, and companies but also profitable with an accurate prediction. Thus, obtaining accurate prediction results becomes extremely important especially while the stock market is essentially volatile, nonlinear, complicated, adaptive, nonparametric and unpredictable in nature. This study aims to forecast the opening and closing stock prices of 42 firms listed in Istanbul Stock Exchange National 100 Index (ISE-100) using well-known machine learning methods, Multilayer Perceptrons (MLP) and Support Vector Machines (SVM) models and deep learning algorithm, Long Short Term Memory (LSTM) by comparing their forecasting performances. The analysis includes 9 years of data from 01.01.2010 to 01.01.2019. For each firm 2249 data for the opening and 2249 for the closing stock prices were established as daily data sets. Forecasting performance of these methods was evaluated by applying different criteria for each model: root mean squared error (RMSE), mean squared error (MSE) and R-squared (R2). The results of this study show that MLP and LSTM models become advantageous in estimating the opening and closing stock prices comparing to SVM model.
Anahtar Kelime: Stock market prices Estimation Machine learning Deep learning Python language

Belge Türü: Makale Makale Türü: Araştırma Makalesi Erişim Türü: Erişime Açık
  • [1] Abu-Mostafa, Y. S., Atiya, A. F., “Introduction to financial forecasting”, Applied Intelligence, 6(3): 205-213, (1996).
  • [2] Huang, W., Nakamori, Y., Wang S. Y., “Forecasting stock market movement direction with support vector machine”, Computers and Operations Research, 32(10): 2513-2522, (2005).
  • [3] Kara, Y., Boyacioglu, M. A., Baykan, O. K., “Predicting direction of stock price index movement using artificial neural networks and support vector machines: The sample of the Istanbul Stock Exchange”, Expert Systems with Applications, 38(5): 5311-5319, (2011).
  • [4] Northover, K., Lo, A. W., “Computational finance”, Computer in Science & Engineering, 1(6): 22, (2000).
  • [5] Tan, T. Z., Quek, C., Ng, G. S., “Biological brain-inspired genetic complementary learning for stock market and bank failure prediction”, Computer Intelligence, 23(2): 236-261, (2007).
  • [6] Blank, S. C., “'Chaos' in futures markets? A nonlinear dynamical analysis”, The Journal of Futures Markets, 11(6): 711, (1991).
  • [7] Zhang, G., Patuwo, B. E., Hu, M. Y., “Forecasting with artificial neural networks: The state of the art” International Journal of Forecasting, 14(1): 35-62, (1998).
  • [8] Lapedes, A., Farber, R., “Nonlinear signal processing using neural networks: Prediction and system modelling”, 1. IEEE international conference on neural networks, San Diego, CA, USA, No. LA-UR- 87-2662; CONF-8706130-4, (1987).
  • [9] Gorr, W. L., Nagin, D., Szczypula, J., “Comparative study of artificial neural network and statistical models for predicting student grade point averages”, International Journal of Forecasting, 10(1): 17- 34, (1994).
  • [10] Ruiz-Suarez, J., Mayora-Ibarra, O., Torres-Jimenez, J., Ruiz-Suarez, L., “Short-term ozone forecasting by artificial neural networks”, Advances in Engineering Software, 23(3): 143-9, (1995).
  • [11] Kohzadi, N., Boyd, M. S., Kermanshahi, B., Kaastra, I., “A comparison of artificial neural network and time series models for forecasting commodity prices”, Neurocomputing, 10(2): 169-81, (1996).
  • [12] Poh, H. L., Yao, J., Jašic, T., “Neural networks for the analysis and forecasting of advertising and promotion impact”, Intelligent Systems in Accounting, Finance and Management, 7(4): 253-68, (1998).
  • [13] Darbellay, G. A., Slama, M., “Forecasting the short-term demand for electricity: Do neural networks stand a better chance?”, International Journal of Forecasting, 16(1): 71-83, (2000).
  • [14] Aminian, F., Suarez, E. D., Aminian, M., Walz, D. T., “Forecasting economic data with neural networks”, Computational Economics, 28(1): 71-88, (2006).
  • [15] Zhuo, W., Li-Min, J., Yong, Q., Yan-Hui, W., “Railway passenger traffic volume prediction based on neural network”, Applied Artificial Intelligence, 21(1): 1-10, (2007).
  • [16] Yu, L., Wang, S., Lai, K. K., “A neural-network-based nonlinear metamodeling approach to financial time series forecasting”, Applied Soft Computing, 9(2): 563-74, (2009).
  • [17] Kaastra, I., Boyd, M., “Designing a neural network for forecasting financial and economic time series”, Neurocomputing, 10(3): 215-36, (1996).
  • [18] Schierholt, K., Dagli, C. H., “Stock market prediction using different neural network classification architectures”, IEEE/IAFE 1996 Conference On Computational Intelligence for Financial Engineering (CIFEr), 72-8, (1996).
  • [19] Mostafa, M. M., “Forecasting stock exchange movements using neural networks: Empirical evidence from Kuwait”, Expert Systems with Applications, 37(9): 6302-9, (2010).
  • [20] Naeini, M. P., Taremian, H., Hashemi, H. B., “Stock market value prediction using neural networks”, 2010 International Conference On Computer Information Systems and Industrial Management Applications (CISIM), 132-6, (2010).
  • [21] Devadoss, A. V., Ligori, T. A. A., “Forecasting of stock prices using multi-layer perceptron”, International Journal of Computing Algorithm, 2: 440-9, (2013).
  • [22] Kutlu, B., Ozturan, M., Badur, B., “Stock market prediction using artificial neural networks”, Proceedings of the 3rd International Conference on Business, Hawaii, (2003).
  • [23] Yumlu, S., Gurgen, F. S., Okay, N., “A comparison of global, recurrent and smoothed-piecewise neural models for Istanbul stock exchange (ISE) prediction”, Pattern Recognition Letters, 26(13): 2093-103, (2005).
  • [24] Guresen, E., Kayakutlu, G., Daim, T. U., “Using artificial neural network models in stock market index prediction” Expert Systems with Applications, 38(8): 10389–97, (2011).
  • [25] Burges, C. J., “A tutorial on support vector machines for pattern recognition”, Data Mining and Knowledge Discovery, 2(2): 121–67, (1998).
  • [26] Mukherjee, S., Osuna, E., Girosi, F., “Nonlinear prediction of chaotic time series using support vector machines”, Neural Networks for Signal Processing VII Proceedings of the 1997 IEEE Signal Processing Society Workshop, 511-20, (1997).
  • [27] Müller, K. R., Smola, A. J., Rätsch, G., Schölkopf, B., Kohlmorgen, J., Vapnik, V., “Predicting time series with support vector machines”, International Conference on Artificial Neural Networks, 999- 1004, (1997).
  • [28] Smola, A. J., Schölkopf, B., “A tutorial on support vector regression”, Statistics and Computing, 14(3): 199-222, (2004).
  • [29] Vapnik, V., “Statistical learning Theory”, John Wiley and Sons Inc., (1998).
  • [30] Cao, L., Tay, F. E., “Financial forecasting using support vector machines”, Neural Computing and Applications, 10(2): 184-92, (2001).
  • [31] Tay, F. E., Cao, L., “Application of support vector machines in financial time series forecasting”, Omega, 29(4): 309-17, (2001).
  • [32] Tay, F. E., Cao, L., “Improved financial time series forecasting by combining support vector machines with self-organizing feature map”, Intelligent Data Analysis, 5(4): 339-54, (2001).
  • [33] Tay, F. E., Cao, L., “Modified support vector machines in financial time series forecasting”, Neurocomputing, 48(1-4): 847-61, (2002).
  • [34] Kim, K., “Financial time series forecasting using support vector machines”, Neurocomputing, 55(1- 2): 307-19, (2003).
  • [35] Pai, P. F., Lin, C. S., “A hybrid ARIMA and support vector machines model in stock price forecasting”, Omega, 33(6): 497-505, (2005).
  • [36] Kumar M., Thenmozhi M., “Forecasting stock index movement: A comparison of support vector machines and random forest”, 9th Capital Markets Conference, Indian Institute of Capital Markets Paper, (2006).
  • [37] Kumar, M., Thenmozhi, M., “Support vector machines approach to predict the S&P CNX NIFTY index returns”, 10th Capital Markets Conference, Indian Institute of Capital Markets Paper, (2007).
  • [38] Hsu, S. H., Hsieh, J. P. A., Chih, T. C., Hsu, K. C., “A two-stage architecture for stock price forecasting by integrating self-organizing map and support vector regression”, Expert Systems with Applications, 36(4): 7947-51, (2009).
  • [39] Özdemir, A. K., Tolun S., Demirci, “Endeks Getirisi Yönünün İkili Sınıflandırma Yöntemiyle Tahmin Edilmesi: İMKB 100 Endeksi Örneği”, Ömer Halisdemir Üniversitesi İktisadi Ve İdari Bilim Fakültesi Dergisi, 4(2): 45, (2011).
  • [40] Tayyar, N., Tekin, S., “İMKB-100 endeksinin destek vektör makineleri ile günlük, haftalık ve aylık veriler kullanarak tahmin edilmesi”, Abant İzzet Baysal Üniversitesi Sosyal Bilimler Enstitüsü Dergisi, 13(1): 189-217, (2013).
  • [41] Yakut, E., Elmas, B., Yavuz, S., “Yapay sinir ağları ve destek vektör makineleri Yöntemleriyle borsa endeksi tahmini”, Süleyman Demirel Üniversitesi İktisadi Ve İdari Bilimler Fakültesi Dergisi, 19(1): 139-57, (2014).
  • [42] Hochreiter, S., Schmidhuber, J., “Long short-term memory”, Neural Computation, 9(8): 1735-80, (1997).
  • [43] Baccouche, M., Mamalet, F., Wolf, C., Garcia, C., Baskurt, A., “Sequential deep learning for human action recognition”, International Workshop on Human Behaviour Understanding, 29-39, (2011).
  • [44] Fernandez, S., Graves, A., Schmidhuber, J., “An application of recurrent neural networks to discriminative keyword spotting”, International Conference on Artificial Neural Networks, 220-9, (2007).
  • [45] Graves, A., Mohamed, A., Hinton, G., “Speech recognition with deep recurrent neural networks”, 2013 IEEE International Conference on Acoustics, Speech and Signal Processing, 6645-9, (2013).
  • [46] Graves, A., Schmidhuber, J., “Framewise phoneme classification with bidirectional LSTM and other neural network architectures”, Neural Networks, 18(5-6): 602-10, (2005).
  • [47] Graves, A., Schmidhuber, J., “Offline handwriting recognition with multidimensional recurrent neural networks”, Advances in Neural Information Processing Systems, 545-52, (2009).
  • [48] Schmidhuber, J., “Deep learning in neural networks: An overview”, Neural Networks, 61: 85-117, (2015).
  • [49] Eck, D., Schmidhuber, J., “Learning the long-term structure of the blues”, International Conference on Artificial Neural Networks, 284-9, (2002).
  • [50] Hochreiter, S., Heusel, M., Obermayer, K., “Fast model-based protein homology detection without alignment”, Bioinformatics, 23(14): 1728-36, (2007).
  • [51] Mayer, H., Gomez, F., Wierstra, D., Nagy, I., Knoll, A., Schmidhuber, J., “A system for robotic heart surgery that learns to tie knots using recurrent neural networks”, Advanced Robotics, 22(13-14): 1521-37, (2008).
  • [52] Schmidhuber, J., Gers, F., Eck, D., “Learning nonregular languages: A comparison of simple recurrent networks and LSTM”, Neural Computation, 14(9): 2039-41, (2002).
  • [53] Giles, C. L., Lawrence, S., Tsoi, A. C., “Noisy time series prediction using recurrent neural networks and grammatical inference”, Machine Learning, 44(1-2): 161-83, (2001).
  • [54] Xiong, R., Nichols, E. P., Shen, Y., “Deep learning stock volatility with google domestic trends” ArXiv Prepr ArXiv151204916, (2015).
  • [55] Roondiwala, M., Patel, H., Varma, S., “Predicting stock prices using LSTM”, International Journal of Science and Research, 6(4): 1754-6, (2015).
  • [56] Shen, F., Chao, J., Zhao, J., “Forecasting exchange rate using deep belief networks and conjugate gradient method”, Neurocomputing, 167: 243-53, (2015).
  • [57] Pang, X. W., Zhou, Y., Wang, P., Lin W., Chang, V., “Stock market prediction based on deep long short term memory neural network”, Complexis, 102-8, (2018).
  • [58] Fischer, T., Krauss, C., “Deep learning with long short-term memory networks for financial market predictions”, European Journal of Operational Research, 270(2): 654-69, (2018).
  • [59] Kohonen, T., “An introduction to neural computing”, Neural Networks, 1(1): 3-16, (1988).
  • [60] Lippmann, R. P., “An introduction to computing with neural nets”, Artificial Neural Networks: Theoretical Concepts, 36–54, (1988).
  • [61] Rumelhart, D. E., McClelland, J. L., Group, P. R., “Parallel distributed processing: Exploration in the microstructure of cognition, Vol. 1”, (1986).
  • [62] Cortes, C., Vapnik, V., “Support-vector networks”, Machine Learning, 20(3): 273-97, (1995).
  • [63] Vapnik, V., Golowich, S. E., Smola, A. J., “Support vector method for function approximation, regression estimation and signal processing”, Advances in Neural Information Processing Systems, 281-7, (1997).
APA Demirel U, ÇAM H, ÜNLÜ R (2021). Predicting Stock Prices Using Machine Learning Methods and Deep Learning Algorithms: The Sample of the Istanbul Stock Exchange. , 63 - 82. 10.35378/gujs.679103
Chicago Demirel Uğur,ÇAM HANDAN,ÜNLÜ RAMAZAN Predicting Stock Prices Using Machine Learning Methods and Deep Learning Algorithms: The Sample of the Istanbul Stock Exchange. (2021): 63 - 82. 10.35378/gujs.679103
MLA Demirel Uğur,ÇAM HANDAN,ÜNLÜ RAMAZAN Predicting Stock Prices Using Machine Learning Methods and Deep Learning Algorithms: The Sample of the Istanbul Stock Exchange. , 2021, ss.63 - 82. 10.35378/gujs.679103
AMA Demirel U,ÇAM H,ÜNLÜ R Predicting Stock Prices Using Machine Learning Methods and Deep Learning Algorithms: The Sample of the Istanbul Stock Exchange. . 2021; 63 - 82. 10.35378/gujs.679103
Vancouver Demirel U,ÇAM H,ÜNLÜ R Predicting Stock Prices Using Machine Learning Methods and Deep Learning Algorithms: The Sample of the Istanbul Stock Exchange. . 2021; 63 - 82. 10.35378/gujs.679103
IEEE Demirel U,ÇAM H,ÜNLÜ R "Predicting Stock Prices Using Machine Learning Methods and Deep Learning Algorithms: The Sample of the Istanbul Stock Exchange." , ss.63 - 82, 2021. 10.35378/gujs.679103
ISNAD Demirel, Uğur vd. "Predicting Stock Prices Using Machine Learning Methods and Deep Learning Algorithms: The Sample of the Istanbul Stock Exchange". (2021), 63-82. https://doi.org/10.35378/gujs.679103
APA Demirel U, ÇAM H, ÜNLÜ R (2021). Predicting Stock Prices Using Machine Learning Methods and Deep Learning Algorithms: The Sample of the Istanbul Stock Exchange. Gazi University Journal of Science, 34(1), 63 - 82. 10.35378/gujs.679103
Chicago Demirel Uğur,ÇAM HANDAN,ÜNLÜ RAMAZAN Predicting Stock Prices Using Machine Learning Methods and Deep Learning Algorithms: The Sample of the Istanbul Stock Exchange. Gazi University Journal of Science 34, no.1 (2021): 63 - 82. 10.35378/gujs.679103
MLA Demirel Uğur,ÇAM HANDAN,ÜNLÜ RAMAZAN Predicting Stock Prices Using Machine Learning Methods and Deep Learning Algorithms: The Sample of the Istanbul Stock Exchange. Gazi University Journal of Science, vol.34, no.1, 2021, ss.63 - 82. 10.35378/gujs.679103
AMA Demirel U,ÇAM H,ÜNLÜ R Predicting Stock Prices Using Machine Learning Methods and Deep Learning Algorithms: The Sample of the Istanbul Stock Exchange. Gazi University Journal of Science. 2021; 34(1): 63 - 82. 10.35378/gujs.679103
Vancouver Demirel U,ÇAM H,ÜNLÜ R Predicting Stock Prices Using Machine Learning Methods and Deep Learning Algorithms: The Sample of the Istanbul Stock Exchange. Gazi University Journal of Science. 2021; 34(1): 63 - 82. 10.35378/gujs.679103
IEEE Demirel U,ÇAM H,ÜNLÜ R "Predicting Stock Prices Using Machine Learning Methods and Deep Learning Algorithms: The Sample of the Istanbul Stock Exchange." Gazi University Journal of Science, 34, ss.63 - 82, 2021. 10.35378/gujs.679103
ISNAD Demirel, Uğur vd. "Predicting Stock Prices Using Machine Learning Methods and Deep Learning Algorithms: The Sample of the Istanbul Stock Exchange". Gazi University Journal of Science 34/1 (2021), 63-82. https://doi.org/10.35378/gujs.679103