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

Creative Commons License

Demirel U., Cam H., Unlu R.

GAZI UNIVERSITY JOURNAL OF SCIENCE, vol.34, no.1, pp.63-82, 2021 (ESCI) identifier identifier identifier

  • Publication Type: Article / Article
  • Volume: 34 Issue: 1
  • Publication Date: 2021
  • Doi Number: 10.35378/gujs.679103
  • Journal Indexes: Emerging Sources Citation Index (ESCI), Scopus, Academic Search Premier, Aerospace Database, Aquatic Science & Fisheries Abstracts (ASFA), Communication Abstracts, Compendex, Metadex, Civil Engineering Abstracts, TR DİZİN (ULAKBİM)
  • Page Numbers: pp.63-82
  • Keywords: Stock market prices, Estimation, Machine learning, Deep learning, Python language, SUPPORT VECTOR MACHINES, RECURRENT NEURAL-NETWORKS, MODELS, MARKET, TUTORIAL
  • Abdullah Gül University Affiliated: No


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.