Title
Predicting stock market trends using machine learning algorithms via public sentiment and political situation analysis
Abstract
Stock market trends can be affected by external factors such as public sentiment and political events. The goal of this research is to find whether or not public sentiment and political situation on a given day can affect stock market trends of individual companies or the overall market. For this purpose, the sentiment and situation features are used in a machine learning model to find the effect of public sentiment and political situation on the prediction accuracy of algorithms for 7 days in future. Besides, interdependencies among companies and stock markets are also studied. For the sake of experimentation, stock market historical data are downloaded from Yahoo! Finance and public sentiments are obtained from Twitter. Important political events data of Pakistan are crawled from Wikipedia. The raw text data are then pre-processed, and the sentiment and situation features are generated to create the final data sets. Ten machine learning algorithms are applied to the final data sets to predict the stock market future trend. The experimental results show that the sentiment feature improves the prediction accuracy of machine learning algorithms by 0–3%, and political situation feature improves the prediction accuracy of algorithms by about 20%. Furthermore, the sentiment attribute is most effective on day 7, while the political situation attribute is most effective on day 5. SMO algorithm is found to show the best performance, while ASC and Bagging show poor performance. The interdependency results indicate that stock markets in the same industry show a medium positive correlation with each other.
Year
DOI
Venue
2020
10.1007/s00500-019-04347-y
Soft Computing
Keywords
DocType
Volume
Natural language processing, Predictive models, Stock markets, Sentiment analysis
Journal
24
Issue
ISSN
Citations 
15
1432-7643
3
PageRank 
References 
Authors
0.38
0
6
Name
Order
Citations
PageRank
Wasiat Khan130.38
Usman Malik231.40
Mustansar Ali Ghazanfar3256.27
Muhammad Awais Azam417824.45
khaled h alyoubi5103.54
Ahmed S. Alfakeeh695.22