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,78 @@
---
name: fundamental-analysis
description: Fundamental analysis report — valuation, growth, analyst consensus, financial health via openbb-invest-api
user-invocable: true
metadata: { "openclaw": { "emoji": "📋", "requires": { "bins": ["curl"] } } }
---
# Fundamental Analysis
Generate a structured fundamental analysis report for a given stock ticker.
## Data Collection
Fetch the following endpoints using `exec` tool:
```bash
BASE=https://invest-api.k8s.home
# 1. Key metrics (PE, PB, ROE, EPS, beta, dividend yield)
curl -sk "$BASE/api/v1/stock/{TICKER}/metrics"
# 2. Financial statements (income, balance sheet, cash flow)
curl -sk "$BASE/api/v1/stock/{TICKER}/financials"
# 3. Analyst price targets (consensus, high, low)
curl -sk "$BASE/api/v1/stock/{TICKER}/upgrades"
# 4. Analyst recommendations (buy/hold/sell counts)
curl -sk "$BASE/api/v1/stock/{TICKER}/recommendations"
# 5. Risk metrics (Sharpe, volatility, max drawdown)
curl -sk "$BASE/api/v1/stock/{TICKER}/performance?days=365"
```
## Report Structure
```
## {TICKER} Fundamental Analysis — {date}
### Valuation
- P/E: {value} vs sector average — [cheap / fair / expensive]
- P/B: {value}
- PEG: {value if available}
- Current price vs analyst consensus target: {price} vs {target} ({upside/downside}%)
### Growth & Profitability
- Revenue YoY growth: {%}
- EPS YoY growth: {%}
- ROE: {%} — [strong >15% / moderate / weak <5%]
- Net margin: {%}
### Financial Health
- Debt-to-Equity: {ratio}
- Current Ratio: {ratio}
- Free Cash Flow trend: [positive/negative/declining]
### Analyst Consensus
- Ratings: {buy} buy / {hold} hold / {sell} sell
- Recent upgrades/downgrades: {summary}
- Price target range: ${low} — ${high} (consensus ${target})
### Risk Profile
- Beta: {value} — [low <0.8 / market ~1.0 / high >1.2]
- Sharpe ratio (1Y): {value}
- Max drawdown (1Y): {%}
- Dividend yield: {%} (if applicable)
### Signal: [BULLISH / BEARISH / NEUTRAL]
### Confidence: {1-10}
### Key Risk: {one-line risk factor}
```
## Rules
- Use ONLY data from the API responses — never fabricate financial figures
- If an endpoint returns an error, note "Data unavailable" for that section
- Keep the report under 400 words
- Compare metrics to reasonable benchmarks (S&P 500 average PE ~22, ROE ~15%)