Using Social Media & Sentiment Analysis to Make Investment Decisions
Abstract
:1. Introduction
2. Literature Review
2.1. Public Sentiment and Stock Market Performance
2.2. Social Media
2.3. Sentiment Analysis
2.3.1. An Introduction to SA
2.3.2. Investigating SNLP Algorithms
2.3.3. Related Literature
3. Methodology and Implementation
3.1. Analysis and Requirements
- Functional Requirements
- Login authentication and user accounts.
- An interface to allow users to add and delete stocks (assets) to a portfolio.
- A SA algorithm that can calculate the sentiment of tweets correlated to each asset (stock).
- Display the sentiment metrics on the user interface, from which the user can make investment decisions.
- A Twitter dataset to train and test the SA models.
- Twitter Integration to extract relevant and public tweets.
- Provide appropriate error and exception handling.
- Display a list of tweets on the user interface from the current day.
- Non-Functional Requirements
- Interoperability.
- Scalability.
3.2. Design
3.2.1. Use Cases
- The Web Application, in which the user can:
- Login or register.
- View their portfolio.
- Add, and delete assets.
- View the SA metrics of each asset to help users make investment decisions.
- The Deep Learning System: which runs independently from the web application as a CRON job. This prevents any slowness on the web application as it’s executed on a different server, which was crucial to ensure a good user experience. In this system:
- The assets in the database are obtained.
- Tweets correlated to those assets are extracted using the Twitter API.
- Those tweets are analyzed for sentiment using an AI Library.
- The SA metrics are saved to the database.
3.2.2. System Architecture
3.2.3. System Models
3.2.4. User Interface
3.2.5. Deep Learning System
3.3. Implementation
3.3.1. Web Application
3.3.2. Deep Learning System
3.4. Testing
4. Evaluation
4.1. Realization
4.2. Results and Discussion
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Mukhtar, N. Can We Beat The Stock Market Using Twitter?|by Noah Mukhtar|Towards Data Science. Towards Data Science. 2020. Available online: https://towardsdatascience.com/can-we-beat-the-stock-market-using-twitter-ef8465fd12e2 (accessed on 1 November 2022).
- Facebook MAU Worldwide 2021; Statista: Hamburg, Germany, 2021. Available online: https://www.statista.com/statistics/264810/number-of-monthly-active-facebook-users-worldwide/ (accessed on 1 November 2022).
- Wołk, K. Advanced social media sentiment analysis for short-term cryptocurrency price prediction. Expert Syst. 2020, 37, e12493. [Google Scholar] [CrossRef]
- Smailović, J.; Grčar, M.; Lavrač, N.; Žnidaršič, M. Stream-based active learning for sentiment analysis in the financial domain. Inf. Sci. 2014, 285, 181–203. [Google Scholar] [CrossRef]
- Bollen, J.; Mao, H.; Zeng, X. Twitter mood predicts the stock market. J. Comput. Sci. 2011, 2, 1–8. [Google Scholar] [CrossRef] [Green Version]
- Nasdaq. How Does Social Media Influence Financial Markets; Nasdaq: New York, NY, USA, 2019. [Google Scholar]
- Atwater, P. Moods and Markets: A New Way to Invest in Good Times and in Bad, 1st ed.; Pearson: London, UK, 2012. [Google Scholar]
- Dolan, R.J. Emotion, Cognition, and Behavior. Science 2002, 298, 1191–1194. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Bossaerts, P.; Bossaerts, P.; Bossaerts, P. How Neurobiology Elucidates the Role of Emotions in Financial Decision-Making. Front. Psychol. 2021, 12, 697375. [Google Scholar] [CrossRef] [PubMed]
- Padhanarath, P.; Aunhathaweesup, Y.; Kiattisin, S. Sentiment analysis and relationship between social media and stock market: Pantip.com and SET. In IOP Conference Series: Materials Science and Engineering; IOP Publishing: Bristol, UK, 2019; Volume 620, p. 12094. [Google Scholar] [CrossRef]
- Ni, Y.; Su, Z.; Wang, W.; Ying, Y. A novel stock evaluation index based on public opinion analysis. Procedia Comput. Sci. 2019, 147, 581–587. [Google Scholar] [CrossRef]
- Xing, F.Z.; Cambria, E.; Welsch, R.E. Natural language based financial forecasting: A survey. Artif. Intell. Rev. 2018, 50, 49–73. [Google Scholar] [CrossRef] [Green Version]
- Shead, S. Elon Musk’s Tweets Are Moving Markets—And Some Investors Are Worried. CNBC. 2021. Available online: https://www.cnbc.com/2021/01/29/elon-musks-tweets-are-moving-markets.html (accessed on 1 November 2022).
- Porcher, S.; Renault, T. Social distancing beliefs and human mobility: Evidence from Twitter. PLoS ONE 2021, 16, e0246949. [Google Scholar] [CrossRef] [PubMed]
- Chauhan, P.; Sharma, N.; Sikka, G. The emergence of social media data and sentiment analysis in election prediction. J. Ambient. Intell. Humaniz. Comput. 2021, 12, 2601–2627. [Google Scholar] [CrossRef]
- Renault, T. Sentiment analysis and machine learning in finance: A comparison of methods and models on one million messages. Digit. Financ. 2020, 2, 1–13. [Google Scholar] [CrossRef] [Green Version]
- Times, E. Extent of Elon Musk’s Influence on Cryptocurrency; Where Is IT Headed? The Economic Times. 2021. Available online: https://economictimes.indiatimes.com/markets/cryptocurrency/extent-of-elon-musks-influence-on-cryptocurrency-where-is-it-headed/articleshow/83037268.cms (accessed on 1 November 2022).
- Shashank Gupta. Sentiment Analysis: Concept, Analysis and Applications|by Shashank Gupta|Towards Data Science. Towards Data Science. 2018. Available online: https://towardsdatascience.com/sentiment-analysis-concept-analysis-and-applications-6c94d6f58c17 (accessed on 1 November 2022).
- Shukri, S.E.; Yaghi, R.I.; Aljarah, I.; Alsawalqah, H. Twitter sentiment analysis: A case study in the automotive industry. In Proceedings of the 2015 IEEE Jordan Conference on Applied Electrical Engineering and Computing Technologies (AEECT), Amman, Jordan, 3–5 November 2015; pp. 1–5. [Google Scholar] [CrossRef]
- Barba, P. Machine Learning (ML) for Natural Language Processing (NLP); Lexalytics: Amherst, MA, USA, 2020; Available online: https://www.lexalytics.com/lexablog/machine-learning-natural-language-processing#supervised (accessed on 1 November 2022).
- Brownlee, J. Logistic Regression for Machine Learning. In Machine Learning Mastery; 2016; Available online: https://machinelearningmastery.com/logistic-regression-for-machine-learning/ (accessed on 1 November 2022).
- Krouska, A.; Troussas, C.; Virvou, M. Comparative evaluation of algorithms for sentiment analysis over social networking services Real-Time Face Mask Detector Using Convolutional Neural Networks Amidst COVID-19 Pandemic View project Comparative Evaluation of Algorithms for Sentiment Analysis over Social Networking Services. J. Univers. Comput. Sci. 2017, 23, 755–768. Available online: http://www.internetlivestats.com/ (accessed on 1 November 2022).
- Prasad, A. Decision Trees For Classification (ID3)|Machine Learning|by Ashwin Prasad|Analytics Vidhya|Medium. Medium. 2021. Available online: https://medium.com/analytics-vidhya/decision-trees-for-classification-id3-machine-learning-6844f026bf1a (accessed on 1 November 2022).
- IBM Cloud Education. What are Neural Networks?—United Kingdom|IBM. IBM Cloud Education. 2020. Available online: https://www.ibm.com/uk-en/cloud/learn/neural-networks (accessed on 1 November 2022).
- Sohangir, S.; Wang, D.; Pomeranets, A.; Khoshgoftaar, T.M. Big Data: Deep Learning for financial sentiment analysis. J. Big Data 2018, 5, 3. [Google Scholar] [CrossRef] [Green Version]
- Agarwal, S.; Kumar, S.; Goel, U. Stock market response to information diffusion through internet sources: A literature review. Int. J. Inf. Manag. 2019, 45, 118–131. [Google Scholar] [CrossRef]
- Zhang, X.; Shi, J.; Wang, D.; Fang, B. Exploiting investors social network for stock prediction in China’s market. J. Comput. Sci. 2018, 28, 294–303. [Google Scholar] [CrossRef] [Green Version]
- Pathak, A.R.; Pandey, M.; Rautaray, S. Topic-level sentiment analysis of social media data using deep learning. Appl. Soft Comput. 2021, 108, 107440. [Google Scholar] [CrossRef]
- Catelli, R.; Pelosi, S.; Esposito, M. Lexicon-Based vs. Bert-Based Sentiment Analysis: A Comparative Study in Italian. Electronics 2022, 11, 374. [Google Scholar] [CrossRef]
- Pota, M.; Ventura, M.; Catelli, R.; Esposito, M. An Effective BERT-Based Pipeline for Twitter Sentiment Analysis: A Case Study in Italian. Sensors 2021, 21, 133. [Google Scholar] [CrossRef] [PubMed]
- Catelli, R.; Fujita, H.; De Pietro, G.; Esposito, M. Deceptive reviews and sentiment polarity: Effective link by exploiting BERT. Expert Syst. Appl. 2022, 209, 118290. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Hasselgren, B.; Chrysoulas, C.; Pitropakis, N.; Buchanan, W.J. Using Social Media & Sentiment Analysis to Make Investment Decisions. Future Internet 2023, 15, 5. https://doi.org/10.3390/fi15010005
Hasselgren B, Chrysoulas C, Pitropakis N, Buchanan WJ. Using Social Media & Sentiment Analysis to Make Investment Decisions. Future Internet. 2023; 15(1):5. https://doi.org/10.3390/fi15010005
Chicago/Turabian StyleHasselgren, Ben, Christos Chrysoulas, Nikolaos Pitropakis, and William J. Buchanan. 2023. "Using Social Media & Sentiment Analysis to Make Investment Decisions" Future Internet 15, no. 1: 5. https://doi.org/10.3390/fi15010005
APA StyleHasselgren, B., Chrysoulas, C., Pitropakis, N., & Buchanan, W. J. (2023). Using Social Media & Sentiment Analysis to Make Investment Decisions. Future Internet, 15(1), 5. https://doi.org/10.3390/fi15010005