具有确定性信号融合的多代理股票研究系统 — 3 个专用代理 (ReAct、FinBERT、Plan-and-Solve + RAG) 生成买入/中性/卖出决策
具有确定性信号融合的多代理股票研究系统 — 3 个专用代理 (ReAct、FinBERT、Plan-and-Solve + RAG) 生成买入/中性/卖出决策
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.
…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.
| 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 |
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.
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.
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.
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.
| 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 |
| 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 |
{
"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": []
}…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
MIT — see LICENSE for details.
暂无开放 Issues,或尚未同步最近议题。