feat: add OpenClaw trading agents multi-agent debate system
All checks were successful
continuous-integration/drone/push Build is passing

- 5 analysis skills: trade-analyze (orchestrator), market-analysis,
  fundamental-analysis, sentiment-analysis, macro-analysis
- 4 debate agent personas (SOUL.md): invest-bull, invest-bear,
  invest-hawk, invest-dove
- 5 agent operating instructions (AGENTS.md) including invest-analyst
- Deploy script for pushing to remote OpenClaw server
- Uses sessions_spawn for non-blocking agent delegation
- invest-analyst collects data via API, spawns debate agents,
  synthesizes final BUY/SELL/HOLD verdict
This commit is contained in:
Yaojia Wang
2026-03-21 17:06:51 +01:00
parent ec005c91a9
commit 9b64dfb74e
15 changed files with 780 additions and 0 deletions

View File

@@ -0,0 +1,68 @@
---
name: sentiment-analysis
description: Sentiment analysis report — news sentiment, insider activity, social media, analyst actions 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.
## Data Collection
Fetch the following endpoints using `exec` tool:
```bash
BASE=https://invest-api.k8s.home
# 1. Composite sentiment score (aggregated from multiple sources)
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"
# 3. Insider trades (SEC Form 4 — buys vs sells)
curl -sk "$BASE/api/v1/stock/{TICKER}/insider-trades"
# 4. SEC insider filings
curl -sk "$BASE/api/v1/stock/{TICKER}/sec-insider"
# 5. Recent upgrades/downgrades
curl -sk "$BASE/api/v1/stock/{TICKER}/upgrades"
```
## Report Structure
```
## {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}
### News Sentiment
- Articles analyzed: {count}
- Bullish: {count} ({%}) | Neutral: {count} ({%}) | Bearish: {count} ({%})
- Key headlines: {top 2-3 relevant headlines with sentiment}
### 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]
### Analyst Actions (last 30 days)
- Upgrades: {count} | Downgrades: {count}
- Notable: {most recent significant upgrade/downgrade with firm name}
### Signal: [BULLISH / BEARISH / NEUTRAL]
### Confidence: {1-10}
### Key Risk: {one-line sentiment risk}
```
## 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)