Social Sentiment Analysis Over Time
Last updated: 22 September 2025
Objective:
This prompt measures trends in investor sentiment from social media posts (mainy X and Reddit) on the specified stock.
Explanation:
Tracking social sentiment on stocks offers investors a valuable window into how retail and institutional communities perceive a company in real time, often surfacing narratives, risks, and catalysts well before they are fully reflected in traditional research or price action. This prompt systematically collects and analyzes social media posts mentioning a chosen stock, quantifies sentiment on a standardized 0–20 scale across multiple time periods, extracts recurring themes with examples, and distills the collective conversation into clear bull and bear summaries. By combining sentiment scoring, thematic insights, and visual chart outputs, it helps investors identify shifts in market psychology, detect emerging opportunities or risks, and better understand how online narratives might shape future stock performance.
This prompt is best run on a regular, scheduled basis against watchlist stocks to capture inflection points.
As always, be aware that models can make mistakes. At each step, examine the response and challenge information or conclusions that appear erroneous before proceeding to any subsequent steps. If in doubt use a second model with the same prompt to verify the information and generate challenge questions and answers (CoVe process) to correct interpretations of data.
Link to blog post explanation:
N/A
Preferred Model(s):
GROK (this prompt is specifically tailored to Grok due to its real-time integration with social media posts on X which has a large community of professional investors.
Important Execution Notes:
Specify Ticker, Exchange and Company Name where indicated under “Inputs”
Specify the measurement time period (1 month, week or day or other). This is the rolling span over which posts will be examined and sentiment computed.
Specify the number of successive periods to look back over. Eg the default of 3 with a 1 month measurement period will measure sentiment in each of the past three successive months to examine trends.
Sample Output:
Copy/Paste Prompt Set:
Important note: Subscribers can use this prompt set for their own analysis. However, the prompt is copyrighted by The Inferential Investor, paywalled, and must not be shared without permission.
Role & Mission
You are a market sentiment analyst. Analyze social sentiment around a specified stock and produce:
1. periodized sentiment scores on a 0–20 scale,
2. key themes with examples per period,
3. a comparative narrative, and
4. balanced Bull vs Bear summaries.
Return both a readable report and a strict JSON payload (including chart specs) that downstream tools can render without modification.
________________________________________
0) Inputs (fill before running)
• Stock: TICKER, EXCHANGE, COMPANY NAME: <e.g., TSLA, NASDAQ, TESLA>
• Measurement period: <1 MONTH / WEEK / DAY> (default: 1 month)
• Comparative periods (lookback count): <3> (default: 3)
• Language filter: English (default)
• Platforms: Use all public social sources accessible to Grok (e.g., X/Twitter, Reddit, StockTwits, forums). If access is limited, state which were used.
________________________________________
1) Data Collection & Cleaning Rules
• Inclusion: Posts that explicitly mention the ticker or company name (e.g., “TSLA”, “Tesla”), including cashtags and common variants.
• Deduplication: Remove exact/near-duplicate posts, retweets/reposts without added commentary, spam, and linkfarms.
• Bot/low-quality filters: Down-weight or exclude suspected bots (high posting frequency, low variance text) and engagement bait.
• Disambiguation: If ticker collides with common words or other tickers (e.g., “BABA”, “META” historical), require co-mentions (company name, product, CEO, sector) for inclusion.
• Time windows: Build N successive, non-overlapping periods going backwards from now: P0 = most recent, P1 = prior, …, P(N-1).
• Transparency: Count and report total posts per period and per platform used.
________________________________________
2) Sentiment Scoring Method (0–20 scale)
For each post:
1. Classify positive / neutral / negative with a finance-aware sentiment model.
2. Optionally compute a continuous sentiment s ∈ [-1, +1].
3. Convert to 0–20 with an expectation rule using class probabilities:
o score_post = 20*p_pos + 10*p_neu + 0*p_neg
(If only s is available, map with score_post = 10*(s+1); clip to [0,20].)
4. Weighting (per post): w = ln(1 + followers + 0.5*replies + 0.25*reposts + 0.25*likes); cap extreme weights at the 99th percentile.
5. Period score: weighted mean of post scores; report pos/neu/neg shares by count.
6. Quality control: Winsorize top/bottom 1% of post scores before aggregation.
Interpretation anchors:
0–4: very bearish · 5–8: bearish · 9–11: neutral · 12–15: bullish · 16–20: very bullish.
________________________________________
3) Themes & Examples (per period)
• Extract key recurring themes via clustering/topic modeling + keyword salience.
• Label themes concisely (≤5 words), provide 1–2 short example snippets each (paraphrase if needed).
• Tag theme status vs prior period: “emerging” | “fading” | “stable.”
________________________________________
4) Comparative Insights
• Brief narrative on how sentiment evolved across periods; call out inflection points and plausible drivers (news, catalysts, product events).
• Note changes in theme mix and any divergence between tone and volume.
________________________________________
5) Bull vs Bear Summaries
• Bull Case: 4–7 crisp bullets synthesizing the strongest long arguments raised across posts.
• Bear Case: 4–7 crisp bullets synthesizing the strongest risk arguments.
• Provide an estimated weight for Bull vs Bear based on post counts × average confidence/weight.
________________________________________
6) Output Requirements
A) Human-readable (Markdown)
1. Table: Sentiment by period (P0…P{N-1}) with: posts, pos/neu/neg shares, score (0–20), brief one-liner.
2. Period Sections: Themes + examples.
3. Comparative Narrative.
4. Bull vs Bear Summaries.
Strictness notes
• Keys and types must match the schema above.
• All chart specs live under the top-level "charts" array, each with id, title, type, schema_version, data, and encodings.
• score_0_20 must be numeric and within [0,20].
• Percent shares are decimals in [0,1].
• Period labels must be ordered chronologically in "charts" (oldest → newest).
________________________________________
7) Final Delivery Order
1. Markdown report (readable).
________________________________________
If any platform access is restricted, proceed with available sources, 

