Twitter'da Duygu Analizi Yöntemi Kullanılarak Bitcoin Değer Tahminlemesi

Bütün sektörler dahilinde finans sektöründe de müşterilere ait fikir ve düşüncelerinin belirlenmesi, firma ve kurumların ileriki dönemler için sunacağı hizmetleri etkilemektedir. Kripto para birimlerinin (Bitcoin, Ethereum, Ripple vb.) ekonomik ve sosyal etkileri hızla artmaya devam ettikçe, ilgili haber makalelerinin ve sosyal medya yayınlarının, özellikle de tweetlerin yaygınlığı da artmaktadır. Bu çalışmada, Twitter kullanıcılarının finans sektörü konularından biri olan Bitcoin ile ilgili yorumları derlenerek bir duygu analizi çalışması yapılmıştır. Kullanıcı yorumları, Twitter’ın sunmuş olduğu API hizmeti vasıtasıyla Python Programlama Dili kullanılarak alınmış; yorumlar olumlu, nötr ve olumsuz etiketler ile ayrıştırılmış, etiket bulutunda toplanmıştır. Naïve Bayes ve Lojistik Regresyon algoritmaları kullanılarak oluşturulan modellerde başarı oranları karşılaştırılmıştır. Naïve Bayes uygulamasının tweetlerin duygularını tahmin etmedeki başarı oranı %72,19 olurken, Lojistik Regresyon uygulamasında bu oran %75,53 olmuştur. Çalışmanın ikinci aşamasında ise, duygu analizinden sonra “Bitcoin” anahtar kelimesi içeren günlük pozitif tweet oranı ile Bitcoin günlük açılış değeri beraber kullanılarak Bitcoin kapanış değeri tahminlemesi yapılmıştır. Finans verileri Yahoo Finance web sitesi üzerinden alınmış; Doğrusal Regresyon ve Rastgele Orman Regresyon yöntemleri ile modeller oluşturulmuştur. Doğrusal Regresyon için r² değeri %88,97 çıkarken, Rastgele Orman Regresyonu için ise %94,16 olmuştur.Anahtar Kelimeler: Duygu analizi, Twitter, Bitcoin, Makine öğrenmesi, Veri madenciliği, Finans

Bitcoin Price Prediction Using Sentiment Analysis on Twitter

The identification of actual and potential customers' opinions before and after purchase shapes the services offered by companies in the financial sector as well as in every sector. Cryptocurrencies as their economic and social impact continues to increase rapidly, the prevalence of related news articles and social media posts, especially tweets, also increases. In this study, sentiment analysis was applied by collecting comments and thoughts about Bitcoin on the social media platform Twitter. User comments were received using the Python Programming Language via the API offered by Twitter. Compiled user comments were separated with positive, negative and neutral tags, and the results were analyzed using Naïve Bayes and Logistic Regression. Success rate of sentiment prediction with Naïve Bayes was found 72,19% and for Logistic Regression 75,33%. After sentiment analysis, this study attempts to predict Bitcoin daily closing value using percentage of positive tweets that include “Bitcoin” keyword and Bitcoin daily opening value. Yahoo Finance has been the source of the financial data used in this study. Models were created using Linear Regression and Random Forest Regression. The r² value for Linear Regression was found 88,97%, for Random Forest Regression the r² value was found 94,16%.Keywords: Sentiment analysis, Twitter, Bitcoin, Machine learning, Data mining, Finance

___

  • [1] S. Karasu, A. Altan, Z. Saraç, & R. Hacioğlu, “Prediction of Bitcoin Prices with Machine Learning Methods Using Time Series Data”, In 2018 26th Signal Processing and Communications Applications Conference (SIU), İKÇU, İzmir, 1-4, 25 Mayıs, 2018.
  • [2] F. Aslan, I. Pençe, M. S. Çeşmeli, & A. Kalkan, “Bitcoin’in Türkiye Piyasasındaki Değerinin Yapay Zeka Teknikleri ile Tahmini”, 5th International Management Information Systems Conference, Ankara, 59-62, 2426 Ekim, 2018.
  • [3] C. Zheshi, L. Chunhong, & S. Wenjun, “Bitcoin Price Prediction Using Machine Learning: An Approach to Sample Dimension Engineering” Journal of Computational and Applied Mathematics, Cilt 36, Editör: Efendiev, Y., Keller, A., Mitsui, T., Ng, M., Romani, L., & Tank, F., Darren Sugrue, Elsevier, 112395, 2020.
  • [4] S. Rahman, J. N. Hemel, S. J. A. Anta, H. A. Muhee, & J. Uddin, “Sentiment Analysis Using R: An Approach to Correlate Cryptocurrency Price Fluctuations with Change in User Sentiment Using Machine Learning”, 2018 Joint 7th International Conference on Informatics, Electronics & Vision (ICIEV) and 2018 2nd International Conference on Imaging, Vision & Pattern Recognition (icIVPR), Kitakyushu, Japan, 492-497, 2529 Haziran, 2018.
  • [5] B. Sakiz, & E. Kutlugün, “Bitcoin Price Forecast via Blockchain Technology and Artificial Intelligence Algorithms”, In 2018 26th Signal Processing and Communications Applications Conference (SIU), İKÇU, İzmir, 1-4, 25 Mayıs, 2018.
  • [6] D. R. Pant, P. Neupane, A. Poudel, A. K. Pokhrel, & B. K. Lama, “Recurrent Neural Network Based Bitcoin Price Prediction by Twitter Sentiment Analysis”, In 2018 IEEE 3rd International Conference on Computing, Communication and Security (ICCCS), Nepal, 128-132, 2527 Ekim, 2018.
  • [7] C. Lamon, E. Nielsen, & E. Redondo, “Cryptocurrency Price Prediction Using News and Social Media Sentiment” SMU Data Sci. Rev, Cilt 1(3), Editör: Engels, D., SMU Scholar, Singapur, 1-22, 2017.
  • [8] F. Valencia, A. Gómez-Espinosa, & B. Valdés-Aguirre, “Price Movement Prediction of Cryptocurrencies Using Sentiment Analysis and Machine Learning”, Entropy, Cilt 21(6), İsviçre, 589, 2019.
  • [9] M. Wimalagunaratne, & G. Poravi, “A Predictive Model for the Global Cryptocurrency Market: A Holistic Approach to Predicting Cryptocurrency Prices”, In 2018 8th International Conference on Intelligent Systems, Modelling and Simulation (ISMS), Singapur, 78-83, 810 Mayıs, 2018.
  • [10] S. Colianni, S. Rosales, & M. Signorotti, “Algorithmic Trading of Cryptocurrency Based on Twitter Sentiment Analysis”, CS229 Project, Kaliforniya, 1-5, 2015.
  • [11] D. Ayata, M. Saraçlar, & A. Özgür, “Turkish Tweet Sentiment Analysis with Word Embedding and Machine Learning”, In 2017 25th Signal Processing and Communications Applications Conference (SIU), Antalya, 1-4, 1518 Mayıs, 2017.
  • [12] B. Agarwal, & N. Mittal, Prominent Feature Extraction For Sentiment Analysis, Cilt 28, Springer, İsviçre, 2016.
  • [13] B. Agarwal, & N. Mittal, “Semantic Feature Clustering For Sentiment Analysis of English Reviews”, IETE Journal of Research, Cilt 60, Editör: Koul, S., Taylor and Francis Ltd., Birleşik Krallık, 414-422, 2014.
  • [14] S. A. El Rahman, F. A. AlOtaibi, & W. A. AlShehri, “Sentiment Analysis of Twitter Data”, In 2019 International Conference on Computer and Information Sciences (ICCIS), Suudi Arabistan, 1-4, 34 Nisan, 2019.
  • [15] B. Gokulakrishnan, P. Priyanthan, T. Ragavan, N. Prasath, & A. Perera, “Opinion Mining And Sentiment Analysis On A Twitter Data Stream”, In International Conference on Advances in ICT for Emerging Regions (ICTer2012), Sri Lanka, 182-188, 1215 Aralık, 2012.
  • [16] M. Meral, & B. Diri, “Sentiment Analysis on Twitter” In 2014 22nd Signal Processing and Communications Applications Conference (SIU), Trabzon, 690-693, 2325 Nisan, 2014.
  • [17] Ö. Çoban, B. Özyer, & G. T. Özyer, “Sentiment Analysis For Turkish Twitter Feeds”, In 2015 23nd Signal Processing and Communications Applications Conference (SIU), Malatya, 2388-2391, 1619 Mayıs, 2015.
  • [18] B. İ. Sevindi, Türkçe metinlerde denetimli ve sözlük tabanlı duygu analizi yaklaşımlarının karşılaştırılması, Yüksek Lisans Tezi, Gazi Üniversitesi, Fen Bilimleri Enstitüsü, 2013.
  • [19] B. Karaöz, & U. T. Gürsoy, “Adaptif Öğrenme Sözlüğü Temelli Duygu Analiz Algoritması Önerisi”, Bilişim Teknolojileri Dergisi, Cilt 11, Editör: Tüfekci, A., Gazi Üniversitesi, Ankara, 245-253, 2018.
  • [20] S. Mete, O. Çakır, O. Bayat, D. Göksel Duru, & A. DURU, “Gözbebeği Hareketleri Temelli Duygu Durumu Sınıflandırılması”, Bilişim Teknolojileri Dergisi, Cilt 13, Editör: Tüfekci, A., Ankara, 137-144, 2020.
  • [21] F. S. Çetin, & G. Eryiğit, “Türkçe Hedef Tabanlı Duygu Analizi İçin Alt Görevlerin İncelenmesi – Hedef Terim, Hedef Kategori ve Duygu Sınıfı Belirleme”, Bilişim Teknolojileri Dergisi, Cilt 11, Editör: Tüfekci, A., Ankara, 43-56, 2018.
  • [22] M. Loureiro, & M. Alló, “Sensing Climate Change and Energy Issues: Sentiment and Emotion Analysis with Social Media in the U.K. and Spain”, Energy Policy, Cilt 143, Editör: Antunes, C. H. & Yeh, S., Elsevier Ltd., 2020.
  • [23] K. Sailunaz, & R. Alhajj, “Emotion and Sentiment Analysis From Twitter Text”, Journal of Computational Science, Cilt 36, Editör: Abramson, D., Alexandrov, V., Bader, M., Boghosian, B., Elsevier Ltd., 2019.
  • [24] Ç. Ü. Yurtöz, Measuring The Sentiment Effects Using Emoticon Features For A General Turkish Corpus, Yüksek Lisans Tezi, Galatasaray Üniversitesi, Fen Bilimleri Enstitüsü, 2019.