Research Article
BibTex RIS Cite

Prediction of Gold Price Direction using Convolutional Neural Networks and a Transfer Learning Approach

Year 2022, Volume: Vol:7 Issue: Issue:2, 124 - 131, 07.12.2022
https://doi.org/10.53070/bbd.1205299

Abstract

With the financial time series forecasting, it is aimed to increase the profitability by making the right buying-selling decisions for financial assets. The prices of financial assets are in a fragile structure affected by many factors. Therefore, financial time series forecasting is a very challenging task that has attracted attention by researchers from different disciplines for many years. In this study, 15 years of historical price data covering the years 2007 – 2021 are used to predict the daily ounce gold price direction. Gold price data has been converted into graphic images with the help of candlestick charts and technical analysis indicators. In this way, gold price direction prediction is reduced to a 2-class image classification problem. AlexNet, one of the pioneering pre-trained convolutional neural network models for the classification of images, was fine-tuned and adapted. According to the experimental results, the classification performance of the proposed approach was measured as 53.8%, 66.97%, 37.54% and 42.05% for accuracy, sensitivity, specificity and f-score performance metrics, respectively. In addition, profitability analyzes of the trading strategy based on the predictions of the proposed approach were also made and compared with the Relative Strength Index and Buy and Hold investment strategies, which are frequently used by investors. According to the market simulation results carried out during the 3-year maturity, the proposed approach yielded better results than other investment strategies with a profit rate of 51,77%.

References

  • Achelis, S.B. (1995). Technical Analysis from A to Z. Second Edition. McGraw-Hill, New York, USA.
  • Aldhyani, Theyazn H.H., and Ali Alzahrani. (2022). Framework for Predicting and Modeling Stock Market Prices Based on Deep Learning Algorithms. Electronics 2022, Vol. 11, Page 3149 11(19): 3149.
  • Altuntaş, Yahya, Cömert, Zafer and Kocamaz, Adnan Fatih. (2019). Identification of Haploid and Diploid Maize Seeds Using Convolutional Neural Networks and a Transfer Learning Approach. Computers and Electronics in Agriculture 163(40): 1–11.
  • Altuntaş, Yahya, and Kocamaz, Adnan Fatih. (2021). Deep Feature Extraction for Detection of Tomato Plant Diseases and Pests Based on Leaf Images. Celal Bayar Üniversitesi Fen Bilimleri Dergisi 17(2): 145–52.
  • Cao, Jiasheng, and Jinghan Wang. (2019). Stock Price Forecasting Model Based on Modified Convolution Neural Network and Financial Time Series Analysis. International Journal of Communication Systems 32(12): e3987.
  • Cavalcante, Rodolfo C. et al. (2016). Computational Intelligence and Financial Markets: A Survey and Future Directions. Expert Systems with Applications 55: 194–211. http://dx.doi.org/10.1016/j.eswa.2016.02.006.
  • Chen, Jou Fan et al. (2017). Financial Time-Series Data Analysis Using Deep Convolutional Neural Networks. Proceedings-2016 7th International Conference on Cloud Computing and Big Data, CCBD 2016: 87–92.
  • Dingli, Alexiei, and Fournier, Karl Sant. (2017). Financial Time Series Forecasting – A Deep Learning Approach. International Journal of Machine Learning and Computing 7(5): 118–22.
  • Durairaj, M., & Krishna Mohan, B. H. (2019). A review of two decades of deep learning hybrids for financial time series prediction. International Journal on Emerging Technologies, 10(3), 324–331.
  • Fırıldak, K. & Talu, M.F. (2019). Evrişimsel Sinir Ağlarında Kullanılan Transfer Öğrenme Yaklaşımlarının İncelenmesi. Computer Science, 4(2), 88-95.
  • Jiang, W. (2021). Applications of deep learning in stock market prediction: Recent progress. Expert Systems with Applications, 184(March 2020), 115537.
  • Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton. (2017). ImageNet Classification with Deep Convolutional Neural Networks. Communications of the ACM 60(6): 84–90.
  • Lecun, Yann, Yoshua Bengio, and Geoffrey Hinton. (2015). Deep Learning. Nature 521(7553): 436–44.
  • Li, A. W., & Bastos, G. S. (2020). Stock market forecasting using deep learning and technical analysis: A systematic review. IEEE Access, 8, 185232–185242.
  • Liu, Liying, and Si, Yain Whar. (2022). 1D Convolutional Neural Networks for Chart Pattern Classification in Financial Time Series. Journal of Supercomputing 78(12): 14191–214.
  • Murphy, John J. (1986) Technical Analysis of the Futures Market. New York Institute of Finance.
  • Niu, Tong et al. (2020). Developing a Deep Learning Framework with Two-Stage Feature Selection for Multivariate Financial Time Series Forecasting. Expert Systems with Applications 148: 113237.
  • Özbayoğlu, A. M., Güdelek, M. U., & Sezer, Ö. B. (2020). Deep learning for financial applications: A survey. Applied Soft Computing Journal, 93, 106384.
  • Sezer, Ömer Berat, and Ahmet Murat Özbayoğlu. (2018). Algorithmic Financial Trading with Deep Convolutional Neural Networks: Time Series to Image Conversion Approach. Applied Soft Computing 70: 525–38.
  • Sezer, Ö. B., Güdelek, M. U., & Özbayoğlu, A. M. (2020). Financial time series forecasting with deep learning: A systematic literature review: 2005–2019. Applied Soft Computing Journal, 90, 106181.
  • Zulqarnain, Muhammad et al. (2020). Predicting Financial Prices of Stock Market Using Recurrent Convolutional Neural Networks. International Journal of Intelligent Systems and Applications 12(6): 21–32.

Evrişimsel Sinir Ağları ve Transfer Öğrenme Yaklaşımı Kullanılarak Altın Fiyat Yönünün Tahmini

Year 2022, Volume: Vol:7 Issue: Issue:2, 124 - 131, 07.12.2022
https://doi.org/10.53070/bbd.1205299

Abstract

Finansal zaman serisi tahmini ile finansal varlıklar için doğru alım-satım kararları vererek karlılığın arttırılması amaçlanmaktadır. Finansal varlıkların fiyatları pek çok faktörden etkilenen kırılgan bir yapıdadır. Bu nedenle, finansal zaman serisi tahmini uzun yıllardır farklı disiplinlerden araştırmacılar tarafından ilgi gören oldukça zorlu bir görevdir. Bu çalışmada, günlük ons altın fiyat yönünün tahmini için 2007 – 2021 yıllarını kapsayan 15 yıllık tarihsel fiyat verisi kullanılmıştır. Altın fiyat verileri mum grafikleri ve teknik analiz göstergeleri yardımıyla grafik görüntülere dönüştürülmüştür. Bu sayede altın fiyat yön tahmini 2-sınıflı görüntü sınıflandırma problemine indirgenmiştir. Görüntülerin sınıflandırılması için öncü ön-eğitimli evrişimsel sinir ağı modellerinden AlexNet ince-ayarlanarak adapte edilmiştir. Gerçekleştirilen deney sonuçlarına göre, önerilen yaklaşımın sınıflandırma performansı doğruluk, duyarlılık, hassasiyet ve f-ölçütü performans metrikleri için sırasıyla %53,8, %66,97, %37,54 ve %42,05 olarak ölçülmüştür. Ayrıca önerilen yaklaşımın tahminlerine dayalı gerçekleştirilen ticaret stratejisinin karlılık analizleri de yapılmış ve yatırımcılar tarafından sıklıkla kullanılan Göreceli Güç Endeksi ve Al ve Tut yatırım stratejileri ile karşılaştırılmıştır. 3 yıllık vade boyunca gerçekleştirilen piyasa benzetim sonuçlarına göre önerilen yaklaşım %51,77 kar oranıyla diğer yatırım stratejilerinden daha iyi sonuç vermiştir.

References

  • Achelis, S.B. (1995). Technical Analysis from A to Z. Second Edition. McGraw-Hill, New York, USA.
  • Aldhyani, Theyazn H.H., and Ali Alzahrani. (2022). Framework for Predicting and Modeling Stock Market Prices Based on Deep Learning Algorithms. Electronics 2022, Vol. 11, Page 3149 11(19): 3149.
  • Altuntaş, Yahya, Cömert, Zafer and Kocamaz, Adnan Fatih. (2019). Identification of Haploid and Diploid Maize Seeds Using Convolutional Neural Networks and a Transfer Learning Approach. Computers and Electronics in Agriculture 163(40): 1–11.
  • Altuntaş, Yahya, and Kocamaz, Adnan Fatih. (2021). Deep Feature Extraction for Detection of Tomato Plant Diseases and Pests Based on Leaf Images. Celal Bayar Üniversitesi Fen Bilimleri Dergisi 17(2): 145–52.
  • Cao, Jiasheng, and Jinghan Wang. (2019). Stock Price Forecasting Model Based on Modified Convolution Neural Network and Financial Time Series Analysis. International Journal of Communication Systems 32(12): e3987.
  • Cavalcante, Rodolfo C. et al. (2016). Computational Intelligence and Financial Markets: A Survey and Future Directions. Expert Systems with Applications 55: 194–211. http://dx.doi.org/10.1016/j.eswa.2016.02.006.
  • Chen, Jou Fan et al. (2017). Financial Time-Series Data Analysis Using Deep Convolutional Neural Networks. Proceedings-2016 7th International Conference on Cloud Computing and Big Data, CCBD 2016: 87–92.
  • Dingli, Alexiei, and Fournier, Karl Sant. (2017). Financial Time Series Forecasting – A Deep Learning Approach. International Journal of Machine Learning and Computing 7(5): 118–22.
  • Durairaj, M., & Krishna Mohan, B. H. (2019). A review of two decades of deep learning hybrids for financial time series prediction. International Journal on Emerging Technologies, 10(3), 324–331.
  • Fırıldak, K. & Talu, M.F. (2019). Evrişimsel Sinir Ağlarında Kullanılan Transfer Öğrenme Yaklaşımlarının İncelenmesi. Computer Science, 4(2), 88-95.
  • Jiang, W. (2021). Applications of deep learning in stock market prediction: Recent progress. Expert Systems with Applications, 184(March 2020), 115537.
  • Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton. (2017). ImageNet Classification with Deep Convolutional Neural Networks. Communications of the ACM 60(6): 84–90.
  • Lecun, Yann, Yoshua Bengio, and Geoffrey Hinton. (2015). Deep Learning. Nature 521(7553): 436–44.
  • Li, A. W., & Bastos, G. S. (2020). Stock market forecasting using deep learning and technical analysis: A systematic review. IEEE Access, 8, 185232–185242.
  • Liu, Liying, and Si, Yain Whar. (2022). 1D Convolutional Neural Networks for Chart Pattern Classification in Financial Time Series. Journal of Supercomputing 78(12): 14191–214.
  • Murphy, John J. (1986) Technical Analysis of the Futures Market. New York Institute of Finance.
  • Niu, Tong et al. (2020). Developing a Deep Learning Framework with Two-Stage Feature Selection for Multivariate Financial Time Series Forecasting. Expert Systems with Applications 148: 113237.
  • Özbayoğlu, A. M., Güdelek, M. U., & Sezer, Ö. B. (2020). Deep learning for financial applications: A survey. Applied Soft Computing Journal, 93, 106384.
  • Sezer, Ömer Berat, and Ahmet Murat Özbayoğlu. (2018). Algorithmic Financial Trading with Deep Convolutional Neural Networks: Time Series to Image Conversion Approach. Applied Soft Computing 70: 525–38.
  • Sezer, Ö. B., Güdelek, M. U., & Özbayoğlu, A. M. (2020). Financial time series forecasting with deep learning: A systematic literature review: 2005–2019. Applied Soft Computing Journal, 90, 106181.
  • Zulqarnain, Muhammad et al. (2020). Predicting Financial Prices of Stock Market Using Recurrent Convolutional Neural Networks. International Journal of Intelligent Systems and Applications 12(6): 21–32.
There are 21 citations in total.

Details

Primary Language Turkish
Subjects Artificial Intelligence
Journal Section PAPERS
Authors

Yahya Altuntaş 0000-0002-7472-8251

Fatih Okumuş 0000-0003-3046-9558

Fatih Kocamaz 0000-0002-7729-8322

Publication Date December 7, 2022
Submission Date November 15, 2022
Acceptance Date November 30, 2022
Published in Issue Year 2022 Volume: Vol:7 Issue: Issue:2

Cite

APA Altuntaş, Y., Okumuş, F., & Kocamaz, F. (2022). Evrişimsel Sinir Ağları ve Transfer Öğrenme Yaklaşımı Kullanılarak Altın Fiyat Yönünün Tahmini. Computer Science, Vol:7(Issue:2), 124-131. https://doi.org/10.53070/bbd.1205299

The Creative Commons Attribution 4.0 International License 88x31.png is applied to all research papers published by JCS and

A Digital Object Identifier (DOI) Logo_TM.png is assigned for each published paper