refactor: comprehensive skill rewrite with professional analyst perspective
All checks were successful
continuous-integration/drone/push Build is passing

Coverage: 19% → 67% of API endpoints (88/131)

market-analysis: 5 → 15 endpoints (all 14 technical indicators + historical)
- Added: ADX, Stochastic, Keltner, Donchian, Aroon, CCI, Fib, A/D, Cones, VWAP
- Added confluence/divergence analysis guidance

fundamental-analysis: 5 → 12 endpoints
- Added: summary (all-in-one), CAPM, Sortino, Omega, estimates,
  share-statistics, institutional, dividends, calendar/earnings
- Added institutional ownership and earnings catalyst flagging

sentiment-analysis: 5 → 16 endpoints
- Added: reddit-sentiment, social-sentiment, shorts/ftd, darkpool/otc,
  share-statistics, institutional, congress/trades
- Restructured as smart money vs retail noise hierarchy

macro-analysis: 6 → 23 endpoints
- Added: treasury-rates, effr, sofr, spreads, hqm, tips-yields,
  pce, gdp, unemployment, money-measures, cli, sloos,
  nonfarm-payrolls, empire-state, central-bank-holdings,
  fomc-documents, sp500-multiples
- Added business cycle positioning framework

trade-analyze: updated data collection to use /summary endpoint

AGENTS.md (all 4 debate agents): updated for sessions_spawn protocol
SOUL.md (all 4): removed unavailable memory_search, REPLY_SKIP refs
deploy.sh: fixed nvm loading for SSH
This commit is contained in:
Yaojia Wang
2026-03-21 19:11:33 +01:00
parent 5be9385c9f
commit 880f830741
5 changed files with 393 additions and 165 deletions

View File

@@ -1,35 +1,59 @@
---
name: sentiment-analysis
description: Sentiment analysis report — news sentiment, insider activity, social media, analyst actions via openbb-invest-api
description: Professional sentiment analysis — multi-source sentiment scoring, insider flow, smart money tracking, social signals via openbb-invest-api
user-invocable: true
metadata: { "openclaw": { "emoji": "🎭", "requires": { "bins": ["curl"] } } }
---
# Sentiment Analysis
Generate a structured sentiment analysis report for a given stock ticker.
Generate a professional-grade sentiment report. Think like a sentiment quant — track smart money, not retail noise.
## Data Collection
Fetch the following endpoints using `exec` tool:
```bash
BASE=https://invest-api.k8s.home
# 1. Composite sentiment score (aggregated from multiple sources)
# Composite sentiment score (aggregated multi-source)
curl -sk "$BASE/api/v1/stock/{TICKER}/sentiment"
# 2. Per-article news sentiment scores (bullish/bearish)
curl -sk "$BASE/api/v1/stock/{TICKER}/news-sentiment?limit=20"
# Per-article news sentiment (Alpha Vantage)
curl -sk "$BASE/api/v1/stock/{TICKER}/news-sentiment?limit=30"
# 3. Insider trades (SEC Form 4 — buys vs sells)
# Insider trades (SEC Form 4 — CEO/CFO buys and sells)
curl -sk "$BASE/api/v1/stock/{TICKER}/insider-trades"
# 4. SEC insider filings
# SEC insider filings (detailed Form 4)
curl -sk "$BASE/api/v1/stock/{TICKER}/sec-insider"
# 5. Recent upgrades/downgrades
# Recent upgrades/downgrades
curl -sk "$BASE/api/v1/stock/{TICKER}/upgrades"
# Analyst recommendations count
curl -sk "$BASE/api/v1/stock/{TICKER}/recommendations"
# Reddit sentiment and mentions
curl -sk "$BASE/api/v1/stock/{TICKER}/reddit-sentiment"
# Social sentiment (Finnhub — Reddit + Twitter)
curl -sk "$BASE/api/v1/stock/{TICKER}/social-sentiment"
# Institutional holders (13F — smart money positions)
curl -sk "$BASE/api/v1/stock/{TICKER}/institutional"
# Short selling pressure
curl -sk "$BASE/api/v1/stock/{TICKER}/shorts/volume"
curl -sk "$BASE/api/v1/stock/{TICKER}/shorts/interest"
curl -sk "$BASE/api/v1/stock/{TICKER}/shorts/ftd"
# Dark pool activity (institutional block trades)
curl -sk "$BASE/api/v1/darkpool/{TICKER}/otc"
# Share statistics (float, short % of float)
curl -sk "$BASE/api/v1/stock/{TICKER}/share-statistics"
# Congress trades (political insider trading)
curl -sk "$BASE/api/v1/regulators/congress/trades"
```
## Report Structure
@@ -37,32 +61,58 @@ curl -sk "$BASE/api/v1/stock/{TICKER}/upgrades"
```
## {TICKER} Sentiment Analysis — {date}
### Overall Sentiment Score
- Composite: {score} (-1.0 to +1.0) — [strongly bearish / bearish / neutral / bullish / strongly bullish]
- Source breakdown: news {score}, analyst {score}, social {score}
### Composite Sentiment
- Score: {value} (-1.0 to +1.0) — [strongly bearish / bearish / neutral / bullish / strongly bullish]
- Breakdown: news {score}, analysts {score}, upgrades {score}, social {score}
### News Sentiment
### News Flow
- Articles analyzed: {count}
- Bullish: {count} ({%}) | Neutral: {count} ({%}) | Bearish: {count} ({%})
- Key headlines: {top 2-3 relevant headlines with sentiment}
- Sentiment distribution: {bullish}% bullish / {neutral}% neutral / {bearish}% bearish
- Dominant themes: {top 2-3 topics}
- Notable headlines: {1-2 most impactful}
### Insider Activity (last 90 days)
- Net insider transactions: {net buy/sell}
- Notable trades: {largest insider buy or sell with name and title}
- Signal: [insiders buying = bullish / insiders selling = bearish / mixed]
### Smart Money Signals
#### Insider Activity (last 90 days)
- Net insider transactions: {count buys} buys / {count sells} sells = {net}
- Notable: {largest trade with name, title, amount}
- Signal: [strong buy signal / selling for diversification / red flag]
#### Institutional Flow
- Major holders: {top 3 names if available}
- Recent 13F activity: [net accumulation / net distribution / stable]
#### Congress Trades
- Any recent trades in {TICKER}: [yes — details / none found]
### Short Selling Intelligence
- Short volume: {%} of daily volume — [normal <25% / elevated 25-40% / extreme >40%]
- Short interest: {shares} ({days_to_cover} days to cover)
- Short % of float: {%} — [low <5% / moderate / crowded >15%]
- Fails-to-deliver: {trend} — [rising = naked shorting concern / stable / declining]
- Dark pool volume: {%} of total — [normal / elevated institutional activity]
- Squeeze potential: [low / moderate / high] based on short interest + days to cover + catalyst
### Analyst Actions (last 30 days)
- Upgrades: {count} | Downgrades: {count}
- Notable: {most recent significant upgrade/downgrade with firm name}
- Most significant: {firm, action, price target}
- Consensus shift: [improving / deteriorating / stable]
### Social & Retail
- Reddit mentions rank: #{rank} in WSB/stocks
- Reddit sentiment: {bullish/bearish/mixed}
- Social media buzz: [trending up / stable / fading]
- ⚠️ Note: Social sentiment is a contrarian indicator at extremes
### Signal: [BULLISH / BEARISH / NEUTRAL]
### Confidence: {1-10}
### Key Risk: {one-line sentiment risk}
### Key Insight: {the single most actionable sentiment finding}
```
## Rules
- Use ONLY data from the API responses — never fabricate sentiment scores
- If an endpoint returns an error, note "Data unavailable" for that section
- Keep the report under 400 words
- Insider buying is a stronger signal than insider selling (insiders sell for many reasons, but buy for one)
- **Smart money > retail noise**: Weight insider buys and institutional flow higher than Reddit
- Insider buying is a strong signal (insiders buy for one reason: they expect the price to go up)
- Insider selling is a weak signal (insiders sell for many reasons: taxes, diversification, estate planning)
- High short interest alone is not bearish — combine with catalyst for squeeze assessment
- Congress trades within 30 days of legislation = potential MNPI concern
- Keep under 500 words