Saudi Stock Market Sentiment Analysis using Twitter Data

Amal Alazba, Amal Alazba, Nora Alturayeif, Nora Alturayeif, Nouf Alturaief, Nouf Alturaief, Zainab Alhathloul


Sentiment analysis in the finance domain is widely applied by investors and researchers, but most of the work is conducted for English text. In this work, we present a framework to analyze and visualize the sentiments of Arabic tweets related to the Saudi stock market using machine learning methods. For the purpose of training and prediction, Twitter API was used for collecting off-line data, and Apache Kafka was used for real-time streaming tweets. Experiments were conducted using five machine learning classifiers with different feature extraction methods, including word embedding (word2vec) and the traditional BoW methods. The highest accuracy for the sentiment classification of Arabic tweets was 79.08%. This result was achieved with the SVM classifier combined with the TF-IDF feature extraction method. At the end, the predicted sentiments of the tweets using the outperforming classifier were visualized by several techniques. We developed a website to visualize the off-line and streaming tweets in various ways: by sentiments, by stock sectors, and by frequent terms.


Paper Citation