Source-linked AI summary
Potential of ChatGPT in predicting stock market trends based on Twitter Sentiment Analysis
Ummara Mumtaz, Summaya Mumtaz
TL;DR
Evidence for using social-media sentiment to predict stock movements is mixed, and ChatGPT’s role in financial prediction remains underexplored. This study applies zero-shot ChatGPT analysis to Twitter data about Microsoft and Google, finding accuracies of 70% and 63.88%, respectively.
Problem
ChatGPT’s role in predicting stock market returns from social-media sentiment remains a relatively new area of research.
Method
The study uses zero-shot ChatGPT to analyze daily Twitter sentiment and predict next-day Microsoft and Google stock trends, comparing forecasts with NASDAQ changes.
Results
ChatGPT achieved 70% accuracy for Microsoft and 63.88% for Google, markedly exceeding random prediction.
Takeaways & Limitations
The findings indicate that ChatGPT can provide informative stock-trend forecasts and identify factors associated with those trends from tweets.
Takeaways & Limitations
Twitter sentiment can be noisy because of bots and irrelevant content, and prior research has warned that heavy reliance on social-media data may cause overfitting.
Abstract
from arXiv · showhide
The rise of ChatGPT has brought a notable shift to the AI sector, with its exceptional conversational skills and deep grasp of language. Recognizing its value across different areas, our study investigates ChatGPT's capacity to predict stock market movements using only social media tweets and sentiment analysis. We aim to see if ChatGPT can tap into the vast sentiment data on platforms like Twitter to offer insightful predictions about stock trends. We focus on determining if a tweet has a positive, negative, or neutral effect on two big tech giants Microsoft and Google's stock value. Our findings highlight a positive link between ChatGPT's evaluations and the following days stock results for both tech companies. This research enriches our view on ChatGPT's adaptability and emphasizes the growing importance of AI in shaping financial market forecasts.
1. Introduction
The introduction frames ChatGPT as a language-capable AI system and motivates its zero-shot use for predicting stock market trends from Twitter sentiment analysis. The study explores this approach while considering its potential and limitations.
- ChatGPT and AI: ChatGPT uses the Generative Pre-trained Transformer architecture to understand and generate human-like, coherent, contextually relevant text.Its conversational capabilities have made it a significant participant in the AI industry.
- Sentiment-Based Prediction: Twitter sentiment analysis complements traditional stock prediction approaches by extracting public sentiment from large volumes of unstructured online data.These sentiment signals may provide insights into potential market movements.
- Zero-Shot Learning: Zero-shot learning enables ChatGPT to make predictions or categorizations for tasks whose examples were not included during training.The introduction presents ZSL as a way to apply models without explicit task-specific training.
- Study Objective: The study investigates ChatGPT’s ability to predict stock market trends solely from Twitter sentiment analysis using a zero-shot learning strategy.It aims to assess the approach’s potential and limitations in stock market trend prediction.
2. Literature Review
The literature has expanded from traditional fundamental and technical models toward social-media-based stock prediction, including recent ChatGPT applications. Findings support links between tweet activity or sentiment and market indicators, while noise and overfitting remain important limitations.
- Research has increasingly examined user-generated social-media content as a predictive source for stock-market movements alongside traditional fundamental and technical analyses.
- Tweet volume has been linked positively with company trading volume, while intraday analysis can provide more immediate insights than daily aggregation.Real-time sentiment shifts and tweet volumes may be more actionable for traders than daily summaries.
- ChatGPT classified news headlines as positive, negative, or neutral for stock prices, and its scores showed a significant positive link with subsequent daily returns.
- Some studies found no consistent, strong relationship between Twitter sentiment and stock movements, warning that heavy reliance on social-media data can cause overfitting.A mixed-methods approach was advocated to address this limitation.
- Bots and irrelevant content introduce social-media noise, making noise filtering a critical step in sentiment-based stock analysis.
3. Methodology
The study analyzed ChatGPT-, Microsoft-, and Google-related tweets alongside synchronized NASDAQ stock data, using standardized daily inputs and forward-looking prediction. ChatGPT achieved 70% accuracy for Microsoft and roughly 63.88% for Google under zero-shot conditions.
- Data Collection: The analysis used Kaggle’s “500k ChatGPT-related Tweets Jan-Mar 2023” dataset, covering 500K tweets from January 4 to March 29, 2023.Tweets were retrieved using “gpt” and targeted ChatGPT, Microsoft, and Google.
- Data Collection: Minimal cleaning removed only URLs, while emotion icons, hashtags, and other extraneous content remained in the tweets.This preserved the tweets’ authentic voice and sentiment.
- Data Preparation: NASDAQ data for Google and Microsoft covered January 4 through February 28, 2023, matching the tweets’ temporal scope.Stock percentage change represented relative price movement over a specified period.
- Data Preparation: Daily tweet samples contained approximately 15,000 tokens, standardizing ChatGPT’s textual input while remaining within its token limit.Samples were selected randomly by cumulative token count rather than tweet count.
- Prompting and Prediction: For each date, ChatGPT received one instruction followed by that day’s tweets to predict Google and Microsoft stock trends.The model identified companies and sentiment counts without fine-tuning or few-shot learning.
- Temporal Predictive Modelling: ChatGPT’s prediction for each day was compared with the following day’s stock movement before market opening using a forward-looking temporal model.The evaluation manually matched predicted trends with subsequent stock percentage changes.
- Results: 70% accuracy resulted for Microsoft, with 26 aligned predictions out of 37 days.The predictions matched actual outcomes on 26 occasions.
- Results: Roughly 63.88% accuracy resulted for Google, with 23 accurate forecasts across 36 days.The result was obtained using zero-shot learning without exclusive stock-market fine-tuning.
4. Conclusion and Future Work:
The study finds that ChatGPT can predict Microsoft and Google stock-market trends from tweets and sentiment analysis, outperforming random prediction despite imperfect accuracy. It reports 70% accuracy for Microsoft and 63.88% for Google.
- Conclusion and Future Work:: 70% accuracy for Microsoft and 63.88% for Google demonstrate ChatGPT’s predictive performance using only tweets and sentiment analysis.The predictions were not always accurate, but ChatGPT was not primarily designed for stock-market prediction.
- Conclusion and Future Work:: ChatGPT’s performance markedly exceeded that of a randomly predicting model.