4 ms·
Real-time Reddit sentiment tracker for stock trading
- shawnmfarnum 9mo agoI built a real-time sentiment tracker for WallStreetBets and trading subreddits because I wanted to start trading, but got frustrated manually scanning hundreds of comments to figure out what retail traders were actually bullish on. Built this over my Christmas break as a solo developer. Tech stack: Next.js 16, Supabase PostgreSQL, adaptive rate limiting for Reddit's API, OpenAI for sentiment analysis (users provide their own keys), Vercel for hosting. Challenging parts: • Reddit's rate limits (100 requests/min) required building a deduplication system and adaptive backoff • Detecting sarcasm in WSB posts ("this stock is going to the moon " could mean anything) • Real-time updates without killing the database (30-second refresh with caching) • 9-layer sentiment scoring system (volume, options flow, cross-subreddit divergence, etc.) Free tier available. Premium tiers add historical data, AI predictions, and portfolio alerts. Open to technical feedback!
- philipwhiuk 9mo ago> Detecting sarcasm in WSB posts ("this stock is going to the moon " could mean anything) So how does it do this?
- shawnmfarnum 9mo agoGreat question! It's honestly still imperfect, but here's what helps: 1. Context signals: Emoji ratio (too many often = sarcasm), account age, previous comment sentiment in the thread 2. Corroboration: If someone says "to the moon" but options flow shows puts, or there's no volume spike, it gets weighted down 3. Cross-subreddit divergence: If WSB is bullish but r/stocks is bearish on the same ticker, it's often a meme pump 4. Keyword patterns: "bagholding", "loss porn", "wife's boyfriend" = usually ironic/sarcastic context 5. OpenAI sentiment with ticker-specific context: passing the post + surrounding comments helps vs. analyzing in isolation The bigger challenge is that WSB uses sarcasm TO BE sarcastic but also ironically serious sometimes. So I don't try to be 100% accurate - instead, I show confidence scores and let users decide. Would love feedback on better approaches if you've worked on this problem!