百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
M

multi-agent-investment

> DevOps
开源

具有确定性信号融合的多代理股票研究系统 — 3 个专用代理 (ReAct、FinBERT、Plan-and-Solve + RAG) 生成买入/中性/卖出决策

200 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

具有确定性信号融合的多代理股票研究系统 — 3 个专用代理 (ReAct、FinBERT、Plan-and-Solve + RAG) 生成买入/中性/卖出决策

Multi-Agent Investment Research System

A multi-agent equity research system that produces BUY / NEUTRAL / SELL decisions by fusing three independent analysis agents through a deterministic mathematical Decision Hub. No LLM is involved in the decision itself — only in generating human-readable explanations after the math is done.

Highlights

  • Deterministic decisions — the Decision Hub is a pure mathematical function; same inputs always produce the same output
  • Three distinct reasoning patterns — ReAct, FinBERT Funnel, Plan-and-Solve, each matched to its data modality
  • Sub-3s median latency — three agents execute in parallel with independent timeouts
  • Graceful degradation — produces calibrated decisions even when 1–2 agents fail
  • Hybrid RAG — Reciprocal Rank Fusion over SEC 10-K filings, 0.82 recall@5
  • Domain-specific ML — FinBERT replaces LLM for sentiment (50x cheaper, deterministic, F1=0.94 on financial text)
  • 294 tests across unit, integration, and E2E layers

Architecture

…

The LLM generates reasoning after the decision is finalized and is contractually forbidden from altering the mathematical output. This separation ensures auditability and reproducibility — the decision can be fully explained by inspecting the consistency score, weight allocations, and aggregated score without any LLM interpretation.


Why This Architecture

Problem with typical LLM approaches How this system addresses it
Prompt sensitivity flips BUY to SELL Deterministic math — no prompt involved in the decision
Same input, different output across runs Pure function: identical signals always yield identical decisions
Black-box reasoning Every intermediate value exposed: direction gate, strength spread, regime weights
Expensive sentiment inference FinBERT local inference — 50x cheaper than GPT-5, deterministic
Single point of failure 3 independent agents; 2-agent mode maintains 87% directional agreement

Agents

Technical Agent — ReAct

Implements a Reason + Act loop via OpenAI function calling. The LLM dynamically selects from 6 indicator tools based on intermediate results. The mandatory first step — market_regime — classifies the market as TRENDING, RANGING, or HIGH_VOLATILITY and sets regime-aware thresholds for all subsequent tools.

Typical analysis completes in 2–4 steps, ~1.8s per ticker.

Sentiment Agent — FinBERT Funnel

A zero-LLM pipeline that processes financial news through three layers: relevance filtering with deduplication, FinBERT batch classification (~0.3s for 25 articles on CPU), and weighted aggregation with exponential time decay and source credibility scoring. The funnel narrows ~50 raw articles down to a single signal.

When ADANOS_API_KEY is configured, the sentiment agent can also blend in a small public sentiment prior from Reddit, X, and Polymarket. This does not replace the news pipeline — it only adds deterministic context around social attention, bullish breadth, and cross-source alignment.

Fundamental Agent — Plan-and-Solve + RAG

A 4-step structured pipeline: profile the company, plan analysis tasks, execute via RAG retrieval on SEC 10-K filings + financial data tools, then synthesize with cross-task consistency checking. The RAG pipeline uses hybrid retrieval (dense + BM25) with Reciprocal Rank Fusion, achieving 0.82 recall@5 on structured financial documents.


Decision Hub

The core innovation. A three-stage mathematical pipeline that fuses heterogeneous agent signals into a single actionable decision — no LLM, no heuristics, fully deterministic.

Stage 1 — Consistency Scoring: Measures inter-agent agreement across direction, strength, and confidence dimensions. A superlinear penalty (exponent 1.5) on directional disagreement aggressively punishes conflicting signals — this is the primary risk gate.

Stage 2 — Dynamic Weighting: Agent base weights are adjusted by market regime modifiers (technical analysis gets boosted in trending markets; fundamentals anchor in high-volatility regimes) and each agent's own confidence. Weights are always normalized to sum to 1.0.

Stage 3 — Aggregation: A weighted sum of directional signals produces a continuous score, which is classified into BUY / NEUTRAL / SELL via symmetric thresholds. The consistency score determines the risk mode (NORMAL / CAUTIOUS / RISK), which applies a final confidence dampener.

Graceful Degradation

Active Agents Confidence Impact Behavior
3 / 3 Full Normal analysis
2 / 3 ×0.8 Warning issued
1 / 3 ×0.5 Strong warning
0 / 3 — HTTP 503

Performance

Metric Value
Median end-to-end latency 2.8s
P95 latency 5.2s
FinBERT inference 0.3s / 25 articles (CPU)
Decision Hub computation
Example response
json
{
  "ticker": "AAPL",
  "decision": {
    "direction": "BUY",
    "confidence": 0.72,
    "risk_mode": "NORMAL",
    "consistency_score": 0.85,
    "aggregated_score": 0.416,
    "reasoning": "All three agents signal positive outlook..."
  },
  "agents": [
    {"agent_name": "technical", "direction": "BUY", "strength": "STRONG", "confidence": 0.85},
    {"agent_name": "sentiment", "direction": "BUY", "strength": "MODERATE", "confidence": 0.68},
    {"agent_name": "fundamental", "direction": "BUY", "strength": "MODERATE", "confidence": 0.71}
  ],
  "warnings": []
}

Project Structure

…

Appendix: Previous Version UI

The original system used a chat-style research query interface — users typed free-form questions, a Router Agent extracted tickers, and the system returned a long-form markdown report with embedded charts. This version was refactored into the current 3-agent + Decision Hub architecture to achieve deterministic, auditable decisions.

Click to view pre-refactor screenshots (6 images)

Home — Research Query Interface

Analysis in Progress — Parallel Agent Execution

Results — Simple View (Investor Snapshot)

Results — Detailed View (Full Research Report)

Interactive Charts — Price Trend

Interactive Charts — Peer Valuation Comparison


License

MIT — see LICENSE for details.

Issues· 2 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythonagentagentic-aifinancial-analysisinvestment

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理