# Social & Sentiment Guide

Monitor social media and news for market-moving sentiment signals.

---

## Overview

Aggregate sentiment from multiple sources:

- **Reddit** — Subreddits and users
- **Twitter/X** — Key accounts
- **Telegram** — Channels and groups (including private)
- **Discord** — Servers and channels
- **Bluesky** — Users
- **Truth Social** — Users
- **RSS Feeds** — News sources

---

## Understanding Sentiment Scores

### Score Range
All sentiment is normalized to **-1.0 to +1.0**:

| Score | Meaning | Example |
|-------|---------|---------|
| +0.5 to +1.0 | Very Bullish | Strong buy recommendations, excitement |
| +0.1 to +0.5 | Slightly Bullish | Optimistic outlook |
| -0.1 to +0.1 | Neutral | Mixed or factual content |
| -0.1 to -0.5 | Slightly Bearish | Concerns, caution |
| -0.5 to -1.0 | Very Bearish | Fear, panic, strong sell |

### How Sentiment is Calculated
1. **Text Analysis** — Keywords, phrases, context
2. **AI Enhancement** — Claude analyzes nuance and sarcasm
3. **Blended Score** — Combination of methods
4. **Volume Weighting** — Higher engagement = more weight

---

## Public Follows

Monitor public social sources without any setup.

### Reddit
- Track popular subreddits (r/wallstreetbets, r/stocks, r/cryptocurrency)
- Follow specific users
- See trending tickers and sentiment

### Twitter/X
- Follow market influencers
- Track specific hashtags
- Volume and sentiment combined

### Bluesky / Truth Social
- Follow key accounts
- Similar functionality to Twitter

### RSS Feeds
- Add any RSS feed URL
- Great for news sites, blogs, newsletters

### Setting Up Public Follows
1. Go to **Settings > Social Follows**
2. Click **Add Follow**
3. Select platform
4. Enter username, subreddit, or feed URL
5. Save

---

## Private Channel Access

Access private Telegram groups and Discord servers.

### Telegram Private Groups

**Why You Need This**:
Many valuable trading communities are private Telegram groups. With your own bot, you can monitor these.

**Setup Steps**:

1. **Create a Telegram Bot**
   - Open Telegram and search for @BotFather
   - Send `/newbot` command
   - Follow prompts to name your bot
   - Copy the API token (keep it secret!)

2. **Add Bot to Your Group**
   - Open your private group
   - Go to group settings > Add members
   - Add your bot
   - Make the bot an administrator

3. **Get the Channel ID**
   - Add @userinfobot to your group temporarily
   - It will show the group's numeric ID
   - Copy this ID (it's negative for groups)

4. **Connect in Agencio**
   - Go to **Settings > Social Follows**
   - Click **Add Telegram**
   - Select **Private Channel**
   - Enter your bot token
   - Enter the channel ID
   - Save

Your bot token is encrypted and stored securely.

### Discord Private Channels

**Setup Steps**:

1. **Create a Discord Bot**
   - Go to Discord Developer Portal
   - Create a new application
   - Add a bot to the application
   - Copy the bot token

2. **Invite Bot to Server**
   - Generate an invite link with "Read Messages" permission
   - Add bot to your server

3. **Get Channel ID**
   - Enable Developer Mode in Discord settings
   - Right-click the channel > Copy ID

4. **Connect in Agencio**
   - Go to **Settings > Social Follows**
   - Click **Add Discord**
   - Enter bot token and channel ID
   - Save

---

## Entity Extraction

The system automatically identifies:

### Tickers
- Stock symbols ($AAPL, TSLA)
- Crypto symbols (BTC, ETH)
- Forex pairs (EUR/USD)

### Sectors
- Technology, Healthcare, Energy, etc.
- Based on mentioned companies

### Themes
- Macro themes (inflation, rates, recession)
- Events (earnings, FDA approval, merger)
- Sentiment drivers

### Viewing Extracted Entities
- Each post shows extracted tickers
- Click a ticker to see all related mentions
- Filter feeds by specific ticker

---

## Sentiment Dashboard

### Aggregated View
- See overall market sentiment
- Breakdown by source
- Trending tickers

### Per-Ticker Sentiment
- Historical sentiment chart
- Source breakdown
- Volume of mentions

### Human vs Bot Detection
The platform identifies:
- **Human-Driven** — Organic sentiment
- **Bot-Likely** — Automated or coordinated
- **Social Noise** — High volume, low signal

This helps filter genuine sentiment from manipulation.

---

## Using Sentiment in Trading

### Sentiment Signals
Available for AI trading strategies:

| Signal | Description |
|--------|-------------|
| `news_sentiment` | News-based sentiment score |
| `social_sentiment` | Combined social score |
| `reddit_sentiment` | Reddit-specific |
| `human_vs_bot` | Automation detection |

### Example Strategy
"Buy when social sentiment drops below -0.5 (fear) AND RSI below 30 (oversold)"

### Sentiment Alerts
Set alerts for:
- Sentiment crossing threshold
- Mention volume spike
- New ticker trending

---

## Sentiment Categories

Posts are categorized for better filtering:

| Category | Content |
|----------|---------|
| **Crypto** | Bitcoin, altcoins, DeFi |
| **Stocks** | Individual equities |
| **Forex** | Currency markets |
| **AI/Tech** | Technology sector |
| **Politics** | Political events affecting markets |
| **Economy** | Macro economic discussion |
| **News** | General market news |

---

## Best Practices

### Do
- Monitor multiple sources for confirmation
- Consider sentiment alongside technicals
- Watch for sentiment extremes (contrarian signals)
- Pay attention to volume, not just score

### Don't
- Trade solely on sentiment
- Ignore the human vs bot indicator
- Overweight single sources
- Forget sentiment can change quickly

### Contrarian Signals
Extreme sentiment often precedes reversals:
- **Extreme fear** (-0.7 or below) — Potential buying opportunity
- **Extreme greed** (+0.7 or above) — Potential selling opportunity

---

## Managing Your Follows

### Follow Limits by Plan
| Plan | Personal Follows |
|------|------------------|
| Free | 5 |
| Pro | 50 |
| Enterprise | Unlimited |

### Organizing Follows
- **Tag follows** for easy filtering
- **Priority setting** for important sources
- **Mute** temporarily without deleting

### Reviewing Performance
- See which sources provide actionable signals
- Track sentiment accuracy over time
- Remove low-value follows

---

## Privacy & Security

### Your Credentials
- All bot tokens encrypted with AES-256-GCM
- Tokens never displayed after saving
- You can revoke access anytime

### What We Access
- Only channels your bot is added to
- Read-only access (we never post)
- No access to private DMs

### Best Practices
- Use dedicated bots for monitoring
- Don't share bot tokens
- Rotate tokens periodically

---

## Troubleshooting

### Posts Not Appearing
- Verify bot has admin rights
- Check channel ID is correct
- Wait for next polling cycle (default: hourly)

### Sentiment Seems Wrong
- AI interprets context, may differ from your read
- Report obvious errors via feedback
- Consider multiple posts, not just one

### Bot Token Invalid
- Token may have been regenerated
- Create a new bot or regenerate token
- Update credentials in settings

---

## Next Steps

1. **Add a few public follows** — Start with Reddit and Twitter
2. **Review sentiment dashboard** — See what's trending
3. **Set a sentiment alert** — Get notified on extremes
4. **Try private Telegram** — Unlock private group insights

---

*Social sentiment is one input among many. Always combine with other analysis.*
