Implementation:24mlight A Share investment Agent researcher bull agent
| Knowledge Sources | |
|---|---|
| Domains | AI_Agents, Finance |
| Last Updated | 2026-10-10 14:00 GMT |
Overview
Concrete tool for constructing bullish investment theses from analyst signals with counter-narrative generation for non-supportive data, provided by the A_Share_investment_Agent repository.
Description
The researcher_bull_agent function reads signals from four analyst agents (technical, fundamental, sentiment, valuation) via _load_agent_signals(state, agent_name). For each bullish signal, it extracts supporting details from the reasoning dict. For non-bullish signals, it generates an optimistic counter-narrative (e.g., "oversold creates buying opportunity") and assigns a baseline confidence of 0.3. The overall confidence is the average of all four signal confidences.
Usage
Import when you need to:
- Build a bullish thesis from multiple analyst signals
- Run as a fan-in node in the LangGraph workflow (after 4 parallel analysts)
Decorated with @agent_endpoint("researcher_bull", "多方研究员...").
Code Reference
Source Location
- Repository: A_Share_investment_Agent
- File: src/agents/researcher_bull.py
- Lines: L12-152 (helper L12-30, agent L34-152)
Signature
def _load_agent_signals(state: AgentState, agent_name: str) -> dict:
"""Fetch agent output if available, otherwise return neutral placeholder."""
@agent_endpoint("researcher_bull", "多方研究员,从看多角度分析市场数据并提出投资论点")
def researcher_bull_agent(state: AgentState) -> dict:
"""Analyzes signals from a bullish perspective and generates optimistic investment thesis."""
Import
from src.agents.researcher_bull import researcher_bull_agent
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| state | AgentState | Yes | Reads messages from technical_analyst_agent, fundamentals_agent, sentiment_agent, valuation_agent |
Outputs
| Name | Type | Description |
|---|---|---|
| messages | list | HumanMessage with {perspective: "bullish", confidence: float (0-1), thesis_points: list[str], reasoning: str} |
Usage Examples
from src.agents.researcher_bull import researcher_bull_agent
# Runs as fan-in node after [technical, fundamentals, sentiment, valuation] agents
# Uses _load_agent_signals(state, "technical_analyst_agent") to fetch each signal
# For bullish signals: extracts supporting details from reasoning dict
# For non-bullish: generates counter-narrative with 0.3 baseline confidence
# Final confidence = average of 4 signal confidences