Skip to main content
Erschienen in: Soft Computing 15/2020

17.09.2019 | Focus

Predicting stock market trends using machine learning algorithms via public sentiment and political situation analysis

verfasst von: Wasiat Khan, Usman Malik, Mustansar Ali Ghazanfar, Muhammad Awais Azam, Khaled H. Alyoubi, Ahmed S. Alfakeeh

Erschienen in: Soft Computing | Ausgabe 15/2020

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

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.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Literatur
Zurück zum Zitat Ahuja R, Rastogi H, Choudhuri A, Garg B (2015) Stock market forecast using sentiment analysis. In: IEEE 2nd international conference on computers for sustainable global development, pp 1008–1010 Ahuja R, Rastogi H, Choudhuri A, Garg B (2015) Stock market forecast using sentiment analysis. In: IEEE 2nd international conference on computers for sustainable global development, pp 1008–1010
Zurück zum Zitat Beaulieu MC, Cosset JC, Essaddam N (2005) The impact of political risk on the volatility of stock returns: the case of Canada. J Int Bus Stud 36(6):701–718CrossRef Beaulieu MC, Cosset JC, Essaddam N (2005) The impact of political risk on the volatility of stock returns: the case of Canada. J Int Bus Stud 36(6):701–718CrossRef
Zurück zum Zitat Billsus D, Pazzani MJ (2000) User modelling for adaptive news access. User Modell User Adapt Interact 10(2–3):147–180CrossRef Billsus D, Pazzani MJ (2000) User modelling for adaptive news access. User Modell User Adapt Interact 10(2–3):147–180CrossRef
Zurück zum Zitat Bing L, Chan KC, Ou C (2014) Public sentiment analysis in Twitter data for prediction of a company’s stock price movements. In: 2014 IEEE 11th international conference on e-Business engineering (ICEBE), pp 232–239 Bing L, Chan KC, Ou C (2014) Public sentiment analysis in Twitter data for prediction of a company’s stock price movements. In: 2014 IEEE 11th international conference on e-Business engineering (ICEBE), pp 232–239
Zurück zum Zitat Bollen J, Mao H, Pepe A (2011) Modeling public mood and emotion: twitter sentiment and socio-economic phenomena. In: 5th international AAAI conference on weblogs and social media Bollen J, Mao H, Pepe A (2011) Modeling public mood and emotion: twitter sentiment and socio-economic phenomena. In: 5th international AAAI conference on weblogs and social media
Zurück zum Zitat Bollerslev T (1986) Generalized autoregressive conditional heteroscedasticity. J Econ China 31(3):307–327MATH Bollerslev T (1986) Generalized autoregressive conditional heteroscedasticity. J Econ China 31(3):307–327MATH
Zurück zum Zitat Cardoso B, Almeida R, Dias M, Coelho G (2008) Structural reliability analysis using Monte Carlo simulation and neural networks. Adv Eng Soft 39(6):505–513CrossRef Cardoso B, Almeida R, Dias M, Coelho G (2008) Structural reliability analysis using Monte Carlo simulation and neural networks. Adv Eng Soft 39(6):505–513CrossRef
Zurück zum Zitat Chen DH, Bin FS, Chen CD (2005) The impacts of political events on foreign institutional investors and stock returns: emerging market evidence from Taiwan. Int J Bus 10(2) Chen DH, Bin FS, Chen CD (2005) The impacts of political events on foreign institutional investors and stock returns: emerging market evidence from Taiwan. Int J Bus 10(2)
Zurück zum Zitat Chou J, Lin C (2012) Predicting disputes in public-private partnership projects: classification and ensemble models. J Comput Civil Eng 27(1):51–60CrossRef Chou J, Lin C (2012) Predicting disputes in public-private partnership projects: classification and ensemble models. J Comput Civil Eng 27(1):51–60CrossRef
Zurück zum Zitat Chouliaras A (2015) High frequency newswire textual sentiment analysis: evidence from international stock markets during the European financial crisis. Available at SSRN 2572597 Chouliaras A (2015) High frequency newswire textual sentiment analysis: evidence from international stock markets during the European financial crisis. Available at SSRN 2572597
Zurück zum Zitat Egeli B., Badur B, Ozturan M, Badur B (2003) Stock market prediction using artificial neural networks, In: Proceedings of the 3rd Hawaii international conference on business, pp 1–8 Egeli B., Badur B, Ozturan M, Badur B (2003) Stock market prediction using artificial neural networks, In: Proceedings of the 3rd Hawaii international conference on business, pp 1–8
Zurück zum Zitat Frank E, Hall MA, Witten IH (2016) The WEKA workbench. Online appendix for data mining: practical machine learning tools and techniques, 4th edn. Morgan Kaufmann, Burlington Frank E, Hall MA, Witten IH (2016) The WEKA workbench. Online appendix for data mining: practical machine learning tools and techniques, 4th edn. Morgan Kaufmann, Burlington
Zurück zum Zitat Gidofalvi G, Elkan C (2001) Using news articles to predict stock price movements. Department of Computer Science and Engineering, University of California, San Diego Gidofalvi G, Elkan C (2001) Using news articles to predict stock price movements. Department of Computer Science and Engineering, University of California, San Diego
Zurück zum Zitat Go A, Bhayani R, Huang L (2009) Twitter sentiment classification using distant supervision. CS224 N project report, Stanford 1(1) Go A, Bhayani R, Huang L (2009) Twitter sentiment classification using distant supervision. CS224 N project report, Stanford 1(1)
Zurück zum Zitat Hagenau M, Liebmann M, Neumann D (2013) Automated news reading: stock price prediction based on financial news using context-capturing features. Decis Support Syst 55(3):685–697CrossRef Hagenau M, Liebmann M, Neumann D (2013) Automated news reading: stock price prediction based on financial news using context-capturing features. Decis Support Syst 55(3):685–697CrossRef
Zurück zum Zitat Hegazy O, Soliman OS, Salam MA (2014) A machine learning model for stock market prediction. Int J Comput Sci Telecom 4(12):16–23 Hegazy O, Soliman OS, Salam MA (2014) A machine learning model for stock market prediction. Int J Comput Sci Telecom 4(12):16–23
Zurück zum Zitat Kara Y, Boyacioglu MA, Baykan OK (2011) Predicting direction of stock price index movement using artificial neural networks and support vector machines: the sample of the Istanbul stock exchange. Exp Syst Appl 38(5):5311–5319CrossRef Kara Y, Boyacioglu MA, Baykan OK (2011) Predicting direction of stock price index movement using artificial neural networks and support vector machines: the sample of the Istanbul stock exchange. Exp Syst Appl 38(5):5311–5319CrossRef
Zurück zum Zitat Kazem A, Sharifi E, Hussain FK, Saberi M, Hussain OK (2013) Support vector regression with chaos-based firefly algorithm for stock market price forecasting. Appl Soft Comput 13(2):947–958CrossRef Kazem A, Sharifi E, Hussain FK, Saberi M, Hussain OK (2013) Support vector regression with chaos-based firefly algorithm for stock market price forecasting. Appl Soft Comput 13(2):947–958CrossRef
Zurück zum Zitat Kohavi R (1995) A study of cross-validation and bootstrap for accuracy estimation and model selection. Ijcai 14(2):1137–1145 Kohavi R (1995) A study of cross-validation and bootstrap for accuracy estimation and model selection. Ijcai 14(2):1137–1145
Zurück zum Zitat Lakshmi V, Harika K, Bavishya H, Sri Harsha C (2017) Sentiment analysis of twitter data. Int Res J Eng Technol 4(2):2224–2227 Lakshmi V, Harika K, Bavishya H, Sri Harsha C (2017) Sentiment analysis of twitter data. Int Res J Eng Technol 4(2):2224–2227
Zurück zum Zitat Lee H, Surdeanu M, MacCartney B, Jurafsky D (2014) On the importance of text analysis for stock price prediction. LREC 2014:1170–1175 Lee H, Surdeanu M, MacCartney B, Jurafsky D (2014) On the importance of text analysis for stock price prediction. LREC 2014:1170–1175
Zurück zum Zitat Li Q, Wang T, Li P, Liu L, Gong Q, Chen Y (2014a) The effect of news and public mood on stock movements. Inf Sci 278:826–840CrossRef Li Q, Wang T, Li P, Liu L, Gong Q, Chen Y (2014a) The effect of news and public mood on stock movements. Inf Sci 278:826–840CrossRef
Zurück zum Zitat Li X, Xie H, Chen L, Wang J, Deng X (2014b) News impact on stock price return via sentiment analysis. Knowl Based Syst 69:14–23CrossRef Li X, Xie H, Chen L, Wang J, Deng X (2014b) News impact on stock price return via sentiment analysis. Knowl Based Syst 69:14–23CrossRef
Zurück zum Zitat Lu N (2016) A machine learning approach to automated trading. M.S. thesis. Department of Computer Science, Boston College, Boston, USA Lu N (2016) A machine learning approach to automated trading. M.S. thesis. Department of Computer Science, Boston College, Boston, USA
Zurück zum Zitat Makrehchi M, Shah S, Liao W (2013) Stock prediction using event-based sentiment analysis. In: 2013 IEEE/WIC/ACM international joint conference on WI and IAT 1, pp 337–342 Makrehchi M, Shah S, Liao W (2013) Stock prediction using event-based sentiment analysis. In: 2013 IEEE/WIC/ACM international joint conference on WI and IAT 1, pp 337–342
Zurück zum Zitat Malik S, Hussain S, Ahmed S (2009) Impact of political event on trading volume and stock returns: the case of KSE. Int Rev Bus Res Papers 5(4):354–364 Malik S, Hussain S, Ahmed S (2009) Impact of political event on trading volume and stock returns: the case of KSE. Int Rev Bus Res Papers 5(4):354–364
Zurück zum Zitat Mostafa MM (2010) Forecasting stock exchange movements using neural networks: empirical evidence from Kuwait. Exp Syst Appl 37(9):6302–6309CrossRef Mostafa MM (2010) Forecasting stock exchange movements using neural networks: empirical evidence from Kuwait. Exp Syst Appl 37(9):6302–6309CrossRef
Zurück zum Zitat Murphy JJ (1999) Technical analysis of the financial markets: a comprehensive guide to trading methods and applications. Penguin, London Murphy JJ (1999) Technical analysis of the financial markets: a comprehensive guide to trading methods and applications. Penguin, London
Zurück zum Zitat Nguyen TH, Shirai K, Velcin J (2015) Sentiment analysis on social media for stock movement prediction. Exp Syst Appl 42(24):9603–9611CrossRef Nguyen TH, Shirai K, Velcin J (2015) Sentiment analysis on social media for stock movement prediction. Exp Syst Appl 42(24):9603–9611CrossRef
Zurück zum Zitat Oh C, Chong, Sheng O (2011) Investigating predictive power of stock micro blog sentiment in forecasting future stock price directional movement. In: ICIS, Shanghai, China Oh C, Chong, Sheng O (2011) Investigating predictive power of stock micro blog sentiment in forecasting future stock price directional movement. In: ICIS, Shanghai, China
Zurück zum Zitat Olaniyi SAS, Adewole KS, Jimoh RG (2011) Stock trend prediction using regression analysis–a data mining approach. ARPN J Syst Softw 1(4):154–157 Olaniyi SAS, Adewole KS, Jimoh RG (2011) Stock trend prediction using regression analysis–a data mining approach. ARPN J Syst Softw 1(4):154–157
Zurück zum Zitat Oliveira N, Cortez P, Areal N (2013) On the predictability of stock market behavior using stocktwits sentiment and posting volume. Portuguese conference on artificial intelligence. Springer, Berlin, pp 355–365 Oliveira N, Cortez P, Areal N (2013) On the predictability of stock market behavior using stocktwits sentiment and posting volume. Portuguese conference on artificial intelligence. Springer, Berlin, pp 355–365
Zurück zum Zitat Ou P, Wang H (2009) Prediction of stock market index movement by ten data mining techniques. Mod Appl Sci 3(12):28CrossRef Ou P, Wang H (2009) Prediction of stock market index movement by ten data mining techniques. Mod Appl Sci 3(12):28CrossRef
Zurück zum Zitat Pak A, Paroubek P (2010) Twitter as a corpus for sentiment analysis and opinion mining. LREc 10(2010):1320–1326 Pak A, Paroubek P (2010) Twitter as a corpus for sentiment analysis and opinion mining. LREc 10(2010):1320–1326
Zurück zum Zitat Papadrakakis M, Lagaros D (2002) Reliability-based structural optimization using neural networks and Monte Carlo simulation. Comput Methods Appl Mech Eng 191(32):3491–3507CrossRef Papadrakakis M, Lagaros D (2002) Reliability-based structural optimization using neural networks and Monte Carlo simulation. Comput Methods Appl Mech Eng 191(32):3491–3507CrossRef
Zurück zum Zitat Rahman A, Ali A (2016) Sentiment analysis on Twitter data. B.S. thesis. Department of Computer Science and Engineering, East West University, Dhaka, Bangladesh Rahman A, Ali A (2016) Sentiment analysis on Twitter data. B.S. thesis. Department of Computer Science and Engineering, East West University, Dhaka, Bangladesh
Zurück zum Zitat Sadhukhan S, Dhadekar M, Bhonar S (2016) Stock market prediction using artificial neural networks. Imp J Interdiscip Res 2(5) Sadhukhan S, Dhadekar M, Bhonar S (2016) Stock market prediction using artificial neural networks. Imp J Interdiscip Res 2(5)
Zurück zum Zitat Schumaker RP, Chen H (2009) Textual analysis of stock market prediction using breaking financial news: the AZFin text system. ACM Trans Inf Syst (TOIS) 27(2):12CrossRef Schumaker RP, Chen H (2009) Textual analysis of stock market prediction using breaking financial news: the AZFin text system. ACM Trans Inf Syst (TOIS) 27(2):12CrossRef
Zurück zum Zitat Shahbaz P, Ahmad B, Reza EA, Jalal JM (2014) Stock market forecasting using artificial neural networks. Eur Online J Nat Soc Sci 2(3):2404–2411 Shahbaz P, Ahmad B, Reza EA, Jalal JM (2014) Stock market forecasting using artificial neural networks. Eur Online J Nat Soc Sci 2(3):2404–2411
Zurück zum Zitat Shen S, Jiang H, Zhang T (2012) Stock market forecasting using machine learning algorithms. Department of Electrical Engineering, Stanford University, Stanford Shen S, Jiang H, Zhang T (2012) Stock market forecasting using machine learning algorithms. Department of Electrical Engineering, Stanford University, Stanford
Zurück zum Zitat Socher R, Perelygin A, Wu J, Chuang J, Manning CD, Ng A, Potts C (2013) Recursive deep models for semantic compositionality over a sentiment Treebank. In: Proceedings of the 2013 conference on empirical methods in natural language processing, pp 1631–1642 Socher R, Perelygin A, Wu J, Chuang J, Manning CD, Ng A, Potts C (2013) Recursive deep models for semantic compositionality over a sentiment Treebank. In: Proceedings of the 2013 conference on empirical methods in natural language processing, pp 1631–1642
Zurück zum Zitat Suleman MT (2012) Stock market reaction to good and bad political news. Asian J Finance Acc 4(1):299–312 Suleman MT (2012) Stock market reaction to good and bad political news. Asian J Finance Acc 4(1):299–312
Zurück zum Zitat Taimur M, Khan S (2015) Impact of political and catastrophic events on stock returns. VFAST Trans Edu Soc Sci 6(1):21–32 Taimur M, Khan S (2015) Impact of political and catastrophic events on stock returns. VFAST Trans Edu Soc Sci 6(1):21–32
Zurück zum Zitat Tang X, Yang C, Zhou J (2009) Stock price forecasting by combining news mining and time series analysis. IEEE/WIC/ACM Int Jt Conf Web Intel Intel Agent Technol 1:279–282 Tang X, Yang C, Zhou J (2009) Stock price forecasting by combining news mining and time series analysis. IEEE/WIC/ACM Int Jt Conf Web Intel Intel Agent Technol 1:279–282
Zurück zum Zitat Tayal D, Komaragiri S (2009) Comparative analysis of the impact of blogging and micro-blogging on market performance. Int J Comput Sci Eng 1(3):176–182 Tayal D, Komaragiri S (2009) Comparative analysis of the impact of blogging and micro-blogging on market performance. Int J Comput Sci Eng 1(3):176–182
Zurück zum Zitat Turner T, (2007) A beginner’s guide to day trading online. 2nd edn, Adams Media Turner T, (2007) A beginner’s guide to day trading online. 2nd edn, Adams Media
Zurück zum Zitat Yuan B (2016) Sentiment analysis of Twitter data. M.S. thesis, Department of Computer Science, Rensselaer Polytechnic Institute, New York Yuan B (2016) Sentiment analysis of Twitter data. M.S. thesis, Department of Computer Science, Rensselaer Polytechnic Institute, New York
Zurück zum Zitat Zhou Z, Zhao J, Xu K (2016) Can online emotions predict the stock market in China?. In: International conference on web information systems engineering, pp 328–342 Zhou Z, Zhao J, Xu K (2016) Can online emotions predict the stock market in China?. In: International conference on web information systems engineering, pp 328–342
Metadaten
Titel
Predicting stock market trends using machine learning algorithms via public sentiment and political situation analysis
verfasst von
Wasiat Khan
Usman Malik
Mustansar Ali Ghazanfar
Muhammad Awais Azam
Khaled H. Alyoubi
Ahmed S. Alfakeeh
Publikationsdatum
17.09.2019
Verlag
Springer Berlin Heidelberg
Erschienen in
Soft Computing / Ausgabe 15/2020
Print ISSN: 1432-7643
Elektronische ISSN: 1433-7479
DOI
https://doi.org/10.1007/s00500-019-04347-y

Weitere Artikel der Ausgabe 15/2020

Soft Computing 15/2020 Zur Ausgabe