Research Article
BibTex RIS Cite

Deep Learning Based Regression Approach for Algorithmic Stock Trading: A Case Study of the Bist30

Year 2020, Volume: 10 Issue: 4, 1195 - 1211, 15.10.2020
https://doi.org/10.17714/gumusfenbil.707088

Abstract

Today, one of the common uses of artificial intelligence is financial markets. In these markets, which are known as stock market, making price predictions for the future using machine learning and deep learning, making the rise and fall forecasts of indices, sectors and stocks are the main approaches used in this field. In the near future in the financial markets, artificial intelligence based software robots are expected to operate instead of people. For this purpose, learning models are developed by using trend and stock price movements. Validation studies such as accuracy, error value and portfolio simulation are performed to demonstrate the performance of the developed models. In this study, a regression model using deep learning was developed to make adaptive buy-sell operations on the time series consisting of closing prices using data from Borsa İstanbul (BIST). The 2006-2015 range of the BIST30 index was used for training, the 2015-2018 range was used for testing, and the model portfolio value gained 39% on the test data for 694 trading days and the trend direction was estimated with 82% accuracy.

References

  • Acar, M., 2010. Designing an Early Warning System for Stock Market Crashes Based on Machine Learning Forecasting, Bahçeşehir University The Graduate School of Natural and Applied Sciences, 70p.
  • Acar, M., Karahoca, D. and Karahoca, A., 2013. Designing an Early Warning System for Stock Market Crashes by Using ANFIS, In Data Mining: Concepts, Methodologies, Tools, and Applications, 2250-2268.
  • Atan, S., 2016. Metin Madenciliği ile Sentiment Analizi ve Borsa İstanbul Uygulaması, Ankara University The Graduate School of Natural and Applied Sciences, 248p.
  • Atan, S. and Çınar, Y., 2019. Borsa İstanbul’da Finansal Haberler ile Piyasa Değeri İlişkisinin Metin Madenciliği ve Duygu (Sentiment) Analizi ile İncelenmesi. Ankara Üniversitesi SBF Dergisi, 74(1), 1-34.
  • Bahadır, İ., 2008. Bayes Teoremi ve Yapay Sinir Ağları Modelleriyle Borsa Gelecek Değer Tahmini Uygulaması, TOBB Economy ve Technology University The Graduate School of Natural and Applied Sciences, 99p.
  • Borsa İstanbul, (2020, 16 Mart). Borsa İstanbul A.Ş, https://www.borsaistanbul.com
  • Cartea, Á., Jaimungal, S., and Kinzebulatov, D., 2016. Algorithmic Trading With Learning. International Journal of Theoretical and Applied Finance, 19(04), 1650028.
  • Chiang, W. C., Enke, D., Wu, T. and Wang, R., 2016. An Adaptive Stock Index Trading Decision Support System. Expert Systems with Applications, 59, 195-207.
  • Chong, E., Han, C., Park and F. C., 2017. Deep Learning Networks For Stock Market Analysis And Prediction: Methodology, Data Representations, and Case Studies, Expert Systems with Applications, 83, 187-205.
  • Çelikel, A. D., 2018. Stock Value Prediction Using Machine Learning And Text Mining, Kadir Has University The Graduate School of Natural and Applied Sciences,54p.
  • Dicle, M. F., 2019. Candle Charts for Financial Technical Analysis. The Stata Journal, 19(1), 200-209.
  • Emir, Ş., 2013. Yapay Sinir Ağları ve Destek Vektör Makineleri Yöntemlerinin Sınıflandırma Performanslarının Karşılaştırılması: Borsa Endeks Yönünün Tahmini Üzerine bir Uygulama [Classification Performance Comparison of Artificial Neural Networks and Support Vector Machines Methods: An Empirical Study On Predicting Stockmarket İndex Movement Direction, İstanbul University The Graduate School of Natural and Applied Sciences, 257p.
  • Emir, S., 2013. Predicting the Istanbul Stock Exchange Index Return using Technical Indicators. International Journal of Finance & Banking Studies, 2(3), 111-117.
  • Ergür, B., 2014. Borsa İstanbul (BIST) Hisse Fiyat Değişim Yönünün ilişkisel Borsa Ağı Kullanılarak tahmin Edilmesi, İstanbul Teknik University The Graduate School of Natural and Applied Sciences, 111p.
  • Ergür, B. and Çataltepe, Z., 2013. Relational Stock Market Network Analysis, In 2013 21st Signal Processing and Communications Applications Conference (SIU), 1-4.
  • Fauzi, H., 2019. Multiple Stock Prediction Using Single NN, https://www.kaggle.com/humamfauzi/multiple-stock-prediction-using-single-nn.
  • Görgün, O., 2008. Neural Network as A Forecasting Tool for Financial Decision-Making, Işık University The Graduate School of Natural and Applied Sciences,53p.
  • Gümüş, A., 2019. Hisse Fiyat Bilgisi ve Duygu Analizi Kombinasyonu ile Pay Piyasasında Fiyat Tahmini, Bahçeşehir University The Graduate School of Natural and Applied Sciences, 59p.
  • Gündüz, H., 2013. Borsa İstanbul (bist) 100 Endeksi Yönünün Ekonomi Haberleri ile Tahmin Edilmesi, İstanbul Techinal University The Graduate School of Natural and Applied Sciences, 85p.
  • Hüseyinov, İ. and Uluçay, S., 2019. Application of Genetic and Particle Swarm Optimization Algorithms to Portfolio Optimization Problem: Borsa İstanbul and Crypto Money Exchange, In 2019 4th International Conference on Computer Science and Engineering (UBMK), 189-194.
  • Investing, (2020, 16 March). Investing Financial Markets, https://www.investing.com/
  • Irmak, H., 2019. Yapay Zekâ Kullanılarak Borsa İstanbul (Bıst) İçin Algoritmik İşlem Stratejilerinin Geliştirilmesi, Hacettepe University The Graduate School of Natural and Applied Sciences, 105p.
  • Karaoğlu, H.S., 2018. Derin Öğrenme Yöntemi ile Hisse Alım Satım Uygulaması, Işık University The Graduate School of Natural and Applied Sciences, 47p.
  • Kim, H. Y. and Won, C. H., 2018. Forecasting The Volatility of Stock Price İndex: A Hybrid Model İntegrating LSTM with Multiple GARCH-Type Models. Expert Systems with Applications, 103, 25-37.
  • Kutlu, B. and Badur, B., 2009. Yapay Sinir Ağları ile Borsa Endeksi Tahmini, Yönetim Dergisi, 20(63), 45-40.
  • Matriks, (2020, 16 March). Matriks Data, https://www.matriksdata.com/
  • Ozbayoglu, A. M., Gudelek, M. U. and Sezer, Ö. B., 2020. Deep Learning for Financial Applications: A survey. arXiv preprint arXiv:2002. 05786.
  • Özer E., 2015. Ekonomi Haberlerinin BIST100 ve Hisse Senetlerinin Fiyat Değişimleri Üzerindeki Etkisinin İncelenmesi (Master's thesis, Kadir Has Üniversitesi, Fen Bilimleri Enstitüsü). Kadir Has University The Graduate School of Natural and Applied Sciences,78p.
  • Qiu, H. and Liu, F., 2019. Candlestick Analysis in Forecasting US Stock Market: Are They Informative and Effective, In 2019 IEEE 4th International Conference on Big Data Analytics (ICBDA),325-328.
  • Raşo, H., 2019. Teknik Göstergeleri Kullanarak Derin Öğrenme İle Hisse Senedi Piyasası Tahmini Gerçekleştirme, Gazi University The Graduate School of Natural and Applied Sciences, 65p.
  • Raşo, H. and Demirci, M., 2019. Predicting the Turkish Stock Market BIST 30 Index using Deep Learning, Uluslararası Mühendislik Araştırma ve Geliştirme Dergisi, 11(1), 253-265.
  • Sezer, Ö. B., Gudelek, M. U. And Ozbayoglu, A. M., 2020. Financial Time Series Forecasting with Deep Learning: A Systematic Literature Review: 2005–2019. Applied Soft Computing, 106181.
  • Sezer, Ö. B., 2018. Zaman Serisi Verilerinin Derin Yapay Sinir Ağları ile Analizi ve Eniyilemesi: Finansal Tahmin Algoritmaları, TOBB University The Graduate School of Natural and Applied Sciences, 172p.
  • Sezer, Ö. B. and Ozbayoglu, A. M., 2018. Algorithmic Financial Trading with Deep Convolutional Neural Networks: Time Series to Image Conversion Approach. Applied Soft Computing, 70, 525-538.
  • Sezer, Ö. B., Ozbayoglu, A. M. and Dogdu, E., 2017. An Artificial Neural Network-Based Stock Trading System Using Technical Analysis and Big Data Framework. In Proceedings Of The Southeast Conference (pp. 223-226).
  • Sezer, Ö. B., Ozbayoglu, M. and Dogdu, E., 2017. A Deep Neural-Network Based Stock Trading System Based on Evolutionary Optimized Technical Analysis Parameters. Procedia Computer Science, 114, 473-480.
  • Sezer, Ö. B., Gudelek, M. U., and Ozbayoglu, A. M., 2020. Financial Time Series Forecasting With Deep Learning: A Systematic Literature Review: 2005–2019. Applied Soft Computing, 106181.
  • Sezer, Ö. B. and Ozbayoglu, A. M., 2019. Financial Trading Model with Stock Bar Chart Image Time Series with Deep Convolutional Neural Networks. arXiv preprint arXiv:1903.04610.
  • Singh, M. K., Kumar, H., Gupta, M. P. and Madaan, J., 2018. A Glimpse of Sustainable Electronics Manufacturing for India: A Study Using PEST-SWOT analysis, In Global Value Chains, Flexibility and Sustainability, 271-281.
  • Şenol, D., 2008. Prediction of Stock Price Direction by Artificial Neural Network Approach, Bogazici University The Graduate School of Natural and Applied Sciences, 74p.
  • Taburoğlu, S., 2019. A Hybrid and Reliable Method Integrating Depth and Technical Analysis with Machine Learning Techniques for Predicting Stock Prices, Hacettepe University The Graduate School of Natural and Applied Sciences,87p.
  • Taş, S., 2017. Mikroblog Mesajlar İle Hisse Fiyatları Arasındaki İlişkinin Analizi, Bahçeşehir University The Graduate School of Natural and Applied Sciences, 57p.
  • Tradingview, (2020, 16 March). Tradingview Financial Markets, https://www.tradingview.com/
  • Uluçay, S., 2019. Genetik ve Parçacık Sürü Algoritmalarının Portföy Optimizasyonuna Uyarlanması ve Borsa İstanbul ve Kripto Para, İstanbul Aydın University The Graduate School of Natural and Applied Sciences, 95p.
  • Visa, S., Ramsay, B., Ralescu, A. L. and Van Der Knaap, E., 2011. Confusion Matrix-based Feature Selection. MAICS, 710, 120-127.
  • Yümlü, M.S., 2004. Hisse Senedi Değişebilirliğinin Yapay Sinir Ağları ile Tahmin Edilmesi, Boğaziçi University The Graduate School of Natural and Applied Sciences, 120p.
  • Zaremba, W., Sutskever, I. and Vinyals, O., 2014. Recurrent Neural Network Regularization. arXiv preprint arXiv:1409.2329.
  • Ziyadoğlu, T., 2018. İstanbul Borsasının Fiyat Hareketini Tahmin Etmek için Farklı Makine Öğrenme Tekniklerinin Karşılaştırılması, Gazi University The Graduate School of Natural and Applied Sciences, 69p.

Algoritmik İşlemler İçin Derin Öğrenme Tabanlı Regresyon Yaklaşımı: BİST30 Örneği

Year 2020, Volume: 10 Issue: 4, 1195 - 1211, 15.10.2020
https://doi.org/10.17714/gumusfenbil.707088

Abstract

Günümüzde yapay zekânın yaygın kullanım alanlarından bir tanesi de finans piyasalarıdır. Kısa adı borsa olarak bilinen bu piyasalarda makine öğrenmesi ve derin öğrenme kullanılarak geleceğe yönelik fiyat tahminleri yapmak, endeks, sektör ve hisse senetlerinin yükseliş ve düşüş öngörülerinin yapılması bu alanda kullanılan temel yaklaşımlardır. Dünya genelinde finans piyasalarında yakın bir gelecekte yapay zekâ temelli yazılım robotlarının insanlar yerine işlem yapması öngörülmektedir. Bu amaçla gerçekleştirilen çalışmalarda endeks ve hisse senedi fiyat hareketleri kullanılarak öğrenme modelleri geliştirilmektedir. Geliştirilen modellerin başarımlarını göstermek için doğruluk, hata değeri ve portföy simülasyonu gibi doğrulama çalışmaları yapılmaktadır. Bu çalışmada, Borsa İstanbul’a (BİST) ait veriler kullanılarak kapanış fiyatlarından oluşan zaman serisi üzerinde adaptif al-sat işlemi yapılması için derin öğrenme kullanan bir regresyon modeli geliştirilmiştir. BİST30 endeksinin 2006-2015 aralığı eğitim, 2015-2018 aralığı ise test için kullanılmış ve 694 işlem gününe ait test verileri üzerinde model portföy değeri %39 değer kazanmış ve trend yönü %82 doğrulukla tahmin edilmiştir.

References

  • Acar, M., 2010. Designing an Early Warning System for Stock Market Crashes Based on Machine Learning Forecasting, Bahçeşehir University The Graduate School of Natural and Applied Sciences, 70p.
  • Acar, M., Karahoca, D. and Karahoca, A., 2013. Designing an Early Warning System for Stock Market Crashes by Using ANFIS, In Data Mining: Concepts, Methodologies, Tools, and Applications, 2250-2268.
  • Atan, S., 2016. Metin Madenciliği ile Sentiment Analizi ve Borsa İstanbul Uygulaması, Ankara University The Graduate School of Natural and Applied Sciences, 248p.
  • Atan, S. and Çınar, Y., 2019. Borsa İstanbul’da Finansal Haberler ile Piyasa Değeri İlişkisinin Metin Madenciliği ve Duygu (Sentiment) Analizi ile İncelenmesi. Ankara Üniversitesi SBF Dergisi, 74(1), 1-34.
  • Bahadır, İ., 2008. Bayes Teoremi ve Yapay Sinir Ağları Modelleriyle Borsa Gelecek Değer Tahmini Uygulaması, TOBB Economy ve Technology University The Graduate School of Natural and Applied Sciences, 99p.
  • Borsa İstanbul, (2020, 16 Mart). Borsa İstanbul A.Ş, https://www.borsaistanbul.com
  • Cartea, Á., Jaimungal, S., and Kinzebulatov, D., 2016. Algorithmic Trading With Learning. International Journal of Theoretical and Applied Finance, 19(04), 1650028.
  • Chiang, W. C., Enke, D., Wu, T. and Wang, R., 2016. An Adaptive Stock Index Trading Decision Support System. Expert Systems with Applications, 59, 195-207.
  • Chong, E., Han, C., Park and F. C., 2017. Deep Learning Networks For Stock Market Analysis And Prediction: Methodology, Data Representations, and Case Studies, Expert Systems with Applications, 83, 187-205.
  • Çelikel, A. D., 2018. Stock Value Prediction Using Machine Learning And Text Mining, Kadir Has University The Graduate School of Natural and Applied Sciences,54p.
  • Dicle, M. F., 2019. Candle Charts for Financial Technical Analysis. The Stata Journal, 19(1), 200-209.
  • Emir, Ş., 2013. Yapay Sinir Ağları ve Destek Vektör Makineleri Yöntemlerinin Sınıflandırma Performanslarının Karşılaştırılması: Borsa Endeks Yönünün Tahmini Üzerine bir Uygulama [Classification Performance Comparison of Artificial Neural Networks and Support Vector Machines Methods: An Empirical Study On Predicting Stockmarket İndex Movement Direction, İstanbul University The Graduate School of Natural and Applied Sciences, 257p.
  • Emir, S., 2013. Predicting the Istanbul Stock Exchange Index Return using Technical Indicators. International Journal of Finance & Banking Studies, 2(3), 111-117.
  • Ergür, B., 2014. Borsa İstanbul (BIST) Hisse Fiyat Değişim Yönünün ilişkisel Borsa Ağı Kullanılarak tahmin Edilmesi, İstanbul Teknik University The Graduate School of Natural and Applied Sciences, 111p.
  • Ergür, B. and Çataltepe, Z., 2013. Relational Stock Market Network Analysis, In 2013 21st Signal Processing and Communications Applications Conference (SIU), 1-4.
  • Fauzi, H., 2019. Multiple Stock Prediction Using Single NN, https://www.kaggle.com/humamfauzi/multiple-stock-prediction-using-single-nn.
  • Görgün, O., 2008. Neural Network as A Forecasting Tool for Financial Decision-Making, Işık University The Graduate School of Natural and Applied Sciences,53p.
  • Gümüş, A., 2019. Hisse Fiyat Bilgisi ve Duygu Analizi Kombinasyonu ile Pay Piyasasında Fiyat Tahmini, Bahçeşehir University The Graduate School of Natural and Applied Sciences, 59p.
  • Gündüz, H., 2013. Borsa İstanbul (bist) 100 Endeksi Yönünün Ekonomi Haberleri ile Tahmin Edilmesi, İstanbul Techinal University The Graduate School of Natural and Applied Sciences, 85p.
  • Hüseyinov, İ. and Uluçay, S., 2019. Application of Genetic and Particle Swarm Optimization Algorithms to Portfolio Optimization Problem: Borsa İstanbul and Crypto Money Exchange, In 2019 4th International Conference on Computer Science and Engineering (UBMK), 189-194.
  • Investing, (2020, 16 March). Investing Financial Markets, https://www.investing.com/
  • Irmak, H., 2019. Yapay Zekâ Kullanılarak Borsa İstanbul (Bıst) İçin Algoritmik İşlem Stratejilerinin Geliştirilmesi, Hacettepe University The Graduate School of Natural and Applied Sciences, 105p.
  • Karaoğlu, H.S., 2018. Derin Öğrenme Yöntemi ile Hisse Alım Satım Uygulaması, Işık University The Graduate School of Natural and Applied Sciences, 47p.
  • Kim, H. Y. and Won, C. H., 2018. Forecasting The Volatility of Stock Price İndex: A Hybrid Model İntegrating LSTM with Multiple GARCH-Type Models. Expert Systems with Applications, 103, 25-37.
  • Kutlu, B. and Badur, B., 2009. Yapay Sinir Ağları ile Borsa Endeksi Tahmini, Yönetim Dergisi, 20(63), 45-40.
  • Matriks, (2020, 16 March). Matriks Data, https://www.matriksdata.com/
  • Ozbayoglu, A. M., Gudelek, M. U. and Sezer, Ö. B., 2020. Deep Learning for Financial Applications: A survey. arXiv preprint arXiv:2002. 05786.
  • Özer E., 2015. Ekonomi Haberlerinin BIST100 ve Hisse Senetlerinin Fiyat Değişimleri Üzerindeki Etkisinin İncelenmesi (Master's thesis, Kadir Has Üniversitesi, Fen Bilimleri Enstitüsü). Kadir Has University The Graduate School of Natural and Applied Sciences,78p.
  • Qiu, H. and Liu, F., 2019. Candlestick Analysis in Forecasting US Stock Market: Are They Informative and Effective, In 2019 IEEE 4th International Conference on Big Data Analytics (ICBDA),325-328.
  • Raşo, H., 2019. Teknik Göstergeleri Kullanarak Derin Öğrenme İle Hisse Senedi Piyasası Tahmini Gerçekleştirme, Gazi University The Graduate School of Natural and Applied Sciences, 65p.
  • Raşo, H. and Demirci, M., 2019. Predicting the Turkish Stock Market BIST 30 Index using Deep Learning, Uluslararası Mühendislik Araştırma ve Geliştirme Dergisi, 11(1), 253-265.
  • Sezer, Ö. B., Gudelek, M. U. And Ozbayoglu, A. M., 2020. Financial Time Series Forecasting with Deep Learning: A Systematic Literature Review: 2005–2019. Applied Soft Computing, 106181.
  • Sezer, Ö. B., 2018. Zaman Serisi Verilerinin Derin Yapay Sinir Ağları ile Analizi ve Eniyilemesi: Finansal Tahmin Algoritmaları, TOBB University The Graduate School of Natural and Applied Sciences, 172p.
  • Sezer, Ö. B. and Ozbayoglu, A. M., 2018. Algorithmic Financial Trading with Deep Convolutional Neural Networks: Time Series to Image Conversion Approach. Applied Soft Computing, 70, 525-538.
  • Sezer, Ö. B., Ozbayoglu, A. M. and Dogdu, E., 2017. An Artificial Neural Network-Based Stock Trading System Using Technical Analysis and Big Data Framework. In Proceedings Of The Southeast Conference (pp. 223-226).
  • Sezer, Ö. B., Ozbayoglu, M. and Dogdu, E., 2017. A Deep Neural-Network Based Stock Trading System Based on Evolutionary Optimized Technical Analysis Parameters. Procedia Computer Science, 114, 473-480.
  • Sezer, Ö. B., Gudelek, M. U., and Ozbayoglu, A. M., 2020. Financial Time Series Forecasting With Deep Learning: A Systematic Literature Review: 2005–2019. Applied Soft Computing, 106181.
  • Sezer, Ö. B. and Ozbayoglu, A. M., 2019. Financial Trading Model with Stock Bar Chart Image Time Series with Deep Convolutional Neural Networks. arXiv preprint arXiv:1903.04610.
  • Singh, M. K., Kumar, H., Gupta, M. P. and Madaan, J., 2018. A Glimpse of Sustainable Electronics Manufacturing for India: A Study Using PEST-SWOT analysis, In Global Value Chains, Flexibility and Sustainability, 271-281.
  • Şenol, D., 2008. Prediction of Stock Price Direction by Artificial Neural Network Approach, Bogazici University The Graduate School of Natural and Applied Sciences, 74p.
  • Taburoğlu, S., 2019. A Hybrid and Reliable Method Integrating Depth and Technical Analysis with Machine Learning Techniques for Predicting Stock Prices, Hacettepe University The Graduate School of Natural and Applied Sciences,87p.
  • Taş, S., 2017. Mikroblog Mesajlar İle Hisse Fiyatları Arasındaki İlişkinin Analizi, Bahçeşehir University The Graduate School of Natural and Applied Sciences, 57p.
  • Tradingview, (2020, 16 March). Tradingview Financial Markets, https://www.tradingview.com/
  • Uluçay, S., 2019. Genetik ve Parçacık Sürü Algoritmalarının Portföy Optimizasyonuna Uyarlanması ve Borsa İstanbul ve Kripto Para, İstanbul Aydın University The Graduate School of Natural and Applied Sciences, 95p.
  • Visa, S., Ramsay, B., Ralescu, A. L. and Van Der Knaap, E., 2011. Confusion Matrix-based Feature Selection. MAICS, 710, 120-127.
  • Yümlü, M.S., 2004. Hisse Senedi Değişebilirliğinin Yapay Sinir Ağları ile Tahmin Edilmesi, Boğaziçi University The Graduate School of Natural and Applied Sciences, 120p.
  • Zaremba, W., Sutskever, I. and Vinyals, O., 2014. Recurrent Neural Network Regularization. arXiv preprint arXiv:1409.2329.
  • Ziyadoğlu, T., 2018. İstanbul Borsasının Fiyat Hareketini Tahmin Etmek için Farklı Makine Öğrenme Tekniklerinin Karşılaştırılması, Gazi University The Graduate School of Natural and Applied Sciences, 69p.
There are 48 citations in total.

Details

Primary Language English
Subjects Engineering
Journal Section Articles
Authors

Yunus Santur 0000-0002-8942-4605

Publication Date October 15, 2020
Submission Date March 20, 2020
Acceptance Date October 6, 2020
Published in Issue Year 2020 Volume: 10 Issue: 4

Cite

APA Santur, Y. (2020). Deep Learning Based Regression Approach for Algorithmic Stock Trading: A Case Study of the Bist30. Gümüşhane Üniversitesi Fen Bilimleri Dergisi, 10(4), 1195-1211. https://doi.org/10.17714/gumusfenbil.707088