Skip to content
Back to skills

Collection

ASecurity

Analyzes market sentiment from multiple sources (news, social media, market indicators) for trading signals

  • 24 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 8, 2026
content-marketingpythonbashapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add mattnigh/skills_collection --skill collection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Collection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Collection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mattnigh-collection-0adb4e75/badge)](https://www.skillsdirectory.com/skills/mattnigh-collection-0adb4e75)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
skill_id: sentiment_analyzer
name: Sentiment Analyzer
version: 1.0.0
description: Analyzes market sentiment from multiple sources (news, social media, market indicators) for trading signals
author: Trading System CTO
tags: [sentiment, nlp, social-media, news-analysis, trading-signals]
tools:
  - analyze_news_sentiment
  - analyze_social_sentiment
  - get_composite_sentiment
  - detect_sentiment_anomalies
dependencies:
  - src/utils/news_sentiment.py
  - src/utils/sentiment_loader.py
  - src/utils/reddit_sentiment.py
  - src/rag/sentiment_store.py
integrations:
  - src/utils/news_sentiment.py::NewsSentimentAggregator
  - src/utils/sentiment_loader.py::load_latest_sentiment
---

# Sentiment Analyzer Skill

Multi-source sentiment analysis providing comprehensive market sentiment insights for trading decisions.

## Overview

This skill provides:
- News article sentiment scoring from multiple financial sources
- Social media sentiment aggregation (Twitter, Reddit, StockTwits)
- Market microstructure sentiment (order flow, volatility indicators)
- Composite sentiment scores with confidence intervals
- Trend detection and anomaly flagging
- Real-time sentiment monitoring

## Sentiment Scoring Methodology

### Score Range: -1.0 to +1.0
- **0.7 to 1.0**: Very Positive (Strong Buy Signal)
- **0.3 to 0.7**: Positive (Buy Signal)
- **-0.3 to 0.3**: Neutral (Hold)
- **-0.7 to -0.3**: Negative (Sell Signal)
- **-1.0 to -0.7**: Very Negative (Strong Sell Signal)

### Confidence Levels
- **High (>0.8)**: Strong agreement across sources
- **Medium (0.6-0.8)**: Moderate agreement
- **Low (<0.6)**: Mixed signals, use caution

## Tools

### 1. analyze_news_sentiment

Performs sentiment analysis on financial news articles.

**Parameters:**
- `symbols` (required): List of ticker symbols (e.g., ["AAPL", "MSFT"])
- `time_window_hours` (optional): Analysis window in hours (default: 24)
- `sources` (optional): Specific news sources to include (default: all available)

**Returns:**
```json
{
  "success": true,
  "sentiment": {
    "AAPL": {
      "overall_score": 0.72,
      "label": "positive",
      "confidence": 0.85,
      "article_count": 15,
      "breakdown": {
        "positive": 11,
        "neutral": 3,
        "negative": 1
      },
      "sources": {
        "yahoo": 0.75,
        "alphavantage": 0.68,
        "grok_twitter": 0.80
      },
      "trends": {
        "direction": "improving",
        "momentum": 0.12
      },
      "key_topics": [
        {"topic": "earnings", "sentiment": 0.85, "mentions": 8},
        {"topic": "product_launch", "sentiment": 0.70, "mentions": 5}
      ]
    }
  },
  "timestamp": "2025-11-25T10:00:00Z"
}
```

**Usage:**
```bash
python scripts/sentiment_analyzer.py analyze_news_sentiment --symbols AAPL MSFT --time-window-hours 24
```

### 2. analyze_social_sentiment

Aggregates sentiment from social media platforms.

**Parameters:**
- `symbols` (required): List of ticker symbols
- `platforms` (optional): Platforms to analyze (["twitter", "reddit", "stocktwits"], default: all)
- `time_window_hours` (optional): Analysis window (default: 6)
- `min_mentions` (optional): Minimum mention threshold (default: 10)

**Returns:**
```json
{
  "success": true,
  "sentiment": {
    "AAPL": {
      "overall_score": 0.65,
      "label": "positive",
      "confidence": 0.72,
      "total_mentions": 3420,
      "platforms": {
        "twitter": {
          "score": 0.68,
          "mentions": 1850,
          "trending": true
        },
        "reddit": {
          "score": 0.62,
          "mentions": 950,
          "trending": false
        },
        "stocktwits": {
          "score": 0.64,
          "mentions": 620,
          "trending": false
        }
      },
      "influencer_sentiment": 0.75,
      "retail_sentiment": 0.63,
      "volume_trend": "increasing",
      "anomalies": []
    }
  },
  "timestamp": "2025-11-25T10:00:00Z"
}
```

### 3. get_composite_sentiment

Generates weighted composite sentiment from all sources.

**Parameters:**
- `symbols` (required): List of ticker symbols
- `weights` (optional): Custom source weights object (default: balanced weights)
- `include_market_sentiment` (optional): Include technical indicators (default: true)

**Returns:**
```json
{
  "success": true,
  "composite_sentiment": {
    "AAPL": {
      "score": 0.68,
      "label": "positive",
      "confidence": 0.80,
      "components": {
        "news_sentiment": {
          "score": 0.72,
          "weight": 0.40,
          "contribution": 0.288
        },
        "social_sentiment": {
          "score": 0.65,
          "weight": 0.30,
          "contribution": 0.195
        },
        "market_sentiment": {
          "score": 0.70,
          "weight": 0.30,
          "contribution": 0.210
        }
      },
      "signal_strength": "strong",
      "recommendation": "buy",
      "risk_factors": [
        "High social media volatility",
        "Mixed sector sentiment"
      ]
    }
  },
  "timestamp": "2025-11-25T10:00:00Z"
}
```

### 4. detect_sentiment_anomalies

Identifies unusual sentiment patterns or rapid changes.

**Parameters:**
- `symbols` (required): List of ticker symbols
- `lookback_hours` (optional): Historical comparison window (default: 72)
- `sensitivity` (optional): "low", "medium", "high" (default: "medium")

**Returns:**
```json
{
  "success": true,
  "anomalies": [
    {
      "symbol": "AAPL",
      "type": "rapid_shift",
      "severity": "high",
      "description": "Sentiment shifted from 0.35 to 0.85 in 2 hours",
      "current_sentiment": 0.85,
      "previous_sentiment": 0.35,
      "trigger": "Breaking news: Positive earnings surprise",
      "recommendation": "Wait for stabilization before trading",
      "timestamp": "2025-11-25T09:30:00Z"
    }
  ]
}
```

## Data Sources

### News Sources (Priority Order)
1. Yahoo Finance News
2. Alpha Vantage News Sentiment
3. Grok Twitter (Real-time)
4. StockTwits
5. Reddit (r/wallstreetbets, r/stocks, r/investing)

### Social Media Platforms
1. Twitter/X (via Grok API)
2. Reddit (r/wallstreetbets, r/stocks, r/investing)
3. StockTwits

### Market Indicators
1. Put/Call Ratio
2. VIX (Fear Index)
3. Advance/Decline Line
4. On-Balance Volume (OBV)

## Integration with Trading System

This skill integrates with:
- `src/utils/news_sentiment.py` - NewsSentimentAggregator
- `src/utils/sentiment_loader.py` - Historical sentiment loading
- `src/rag/sentiment_store.py` - RAG-based sentiment storage
- `src/utils/reddit_sentiment.py` - Reddit sentiment analysis

## Rate Limiting & Caching

- News API: 100 requests/hour
- Social APIs: Variable by platform
- Results cached for 15 minutes
- Real-time updates for breaking news

## Usage Example

```python
from claude_skills import load_skill

sentiment_skill = load_skill("sentiment_analyzer")

# Get comprehensive sentiment before trade decision
composite = sentiment_skill.get_composite_sentiment(
    symbols=["AAPL"],
    include_market_sentiment=True
)

# Check for anomalies that might affect timing
anomalies = sentiment_skill.detect_sentiment_anomalies(
    symbols=["AAPL"],
    lookback_hours=24,
    sensitivity="high"
)

if composite["composite_sentiment"]["AAPL"]["score"] > 0.6 and not anomalies:
    print("Strong positive sentiment - consider buy")
```

## CLI Usage

```bash
# Analyze news sentiment
python scripts/sentiment_analyzer.py analyze_news_sentiment --symbols AAPL MSFT

# Get composite sentiment
python scripts/sentiment_analyzer.py get_composite_sentiment --symbols AAPL

# Detect anomalies
python scripts/sentiment_analyzer.py detect_sentiment_anomalies --symbols AAPL --sensitivity high
```

## Safety & Best Practices

- Always verify sentiment with multiple sources
- Consider confidence levels when making trading decisions
- Watch for sentiment anomalies that may indicate manipulation
- Combine sentiment with technical analysis for best results
- Cache results to avoid rate limiting

Files in this skill

  • 0Chan-smc__claude-code-workflow-lab__claude__skills__frontend-dev-guidelines__SKILL.md15.1 KB
  • 17hz__nextjs-template__claude__skills__example-skill__SKILL.md316 B
  • 1ambda__dataops-platform__claude__skills__context-synthesis__SKILL.md3.5 KB
  • 1natsu172__dotfiles__claude__skills__git-analysis__SKILL.md5.4 KB
  • 1natsu172__dotfiles__claude__skills__github-pr-best-practices__SKILL.md7.7 KB
  • 23Maestro__prospect-pipeline__claude__skills__npid-fastapi-skill.md26.1 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-javascript__SKILL.md15.7 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-python__SKILL.md17.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-expression-syntax__SKILL.md9.4 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-mcp-tools-expert__SKILL.md12.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-node-configuration__SKILL.md16.6 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-workflow-patterns__SKILL.md11.2 KB
  • 3x-Projetos__claude-memory-framework__claude__skills__scientist__SKILL.md14.8 KB
  • 5MinFutures__futures-arena__claude__skills__migration-tracker__SKILL.md16.2 KB
  • 5MinFutures__futures-arena__claude__skills__planning-guidelines__SKILL.md11.8 KB
  • 92Bilal26__TaskPilotAI__claude__skills__assessment-builder__SKILL.md17.5 KB
  • 92Bilal26__TaskPilotAI__claude__skills__book-scaffolding__SKILL.md19.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__code-validation-sandbox__SKILL.md6.2 KB
  • 92Bilal26__TaskPilotAI__claude__skills__exercise-designer__SKILL.md18.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__learning-objectives__SKILL.md24.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…