Implementation:24mlight A Share investment Agent technical analyst agent
| Knowledge Sources | |
|---|---|
| Domains | Finance, Quantitative_Analysis |
| Last Updated | 2026-10-10 14:00 GMT |
Overview
Concrete tool for multi-strategy technical analysis combining trend following, mean reversion, momentum, volatility, and statistical arbitrage signals provided by the A_Share_investment_Agent repository.
Description
The technical_analyst_agent function is one of five parallel analyst agents in the workflow. It computes 15+ technical indicators (MACD, RSI, Bollinger Bands, EMA, ADX, Ichimoku, ATR, Hurst Exponent, OBV) and combines them across 5 strategies (trend following, mean reversion, momentum, volatility, statistical arbitrage) into a weighted ensemble signal.
Each strategy independently produces a bullish/bearish/neutral signal with confidence and reasoning. The final output aggregates all strategy signals with confidence scores and detailed metrics.
Usage
Import when you need to:
- Generate technical trading signals from OHLCV price data
- Run as a parallel node in the LangGraph workflow (after market_data_agent)
This function is decorated with @agent_endpoint("technical_analyst", "技术分析师...").
Code Reference
Source Location
- Repository: A_Share_investment_Agent
- File: src/agents/technicals.py
- Lines: L22-725
Signature
@agent_endpoint("technical_analyst", "技术分析师,提供基于价格走势、指标和技术模式的交易信号")
def technical_analyst_agent(state: AgentState) -> dict:
"""
Sophisticated technical analysis system that combines multiple trading strategies:
1. Trend Following
2. Mean Reversion
3. Momentum
4. Volatility Analysis
5. Statistical Arbitrage Signals
"""
Import
from src.agents.technicals import technical_analyst_agent
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| state | AgentState | Yes | Reads data["prices"] (list of OHLCV dicts from market_data_agent) |
Outputs
| Name | Type | Description |
|---|---|---|
| messages | list | HumanMessage with {signal, confidence, reasoning, strategy_signals} |
| signal | str | "bullish", "bearish", or "neutral" |
| confidence | str | Confidence percentage (e.g., "75%") |
| reasoning | dict | Per-strategy breakdown with metrics |
| strategy_signals | dict | {trend_following, mean_reversion, momentum, volatility, stat_arb} each with signal, confidence, metrics |
Usage Examples
In LangGraph Workflow
from src.agents.technicals import technical_analyst_agent
from src.tools.api import prices_to_df
# Runs as parallel node after market_data_agent
# Receives state with data["prices"] populated
# Returns messages + data with technical_analysis
Key Indicators Computed
# Indicators (all within the agent function):
# MACD, RSI, Bollinger Bands, EMA (12/26/50/200)
# ADX, Ichimoku Cloud, ATR, Hurst Exponent, OBV
# Each strategy uses different indicator combinations