/tradecraft:trading-agents-llmfrom tradecraft
Builds multi-agent LLM trading systems with specialized agents (Fundamentals, Sentiment, News, Technical analysts, Researchers, Trader, Risk Manager) that collaborate to analyze markets and make trading decisions.
Ships in tradecraft. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
USE FOR:
Open-source multi-agent LLM framework that simulates a trading firm:
Repos:
┌─────────────────── ANALYST TEAM ───────────────────┐
│ Fundamentals Analyst → Financial metrics & value │
│ Sentiment Analyst → Social media & mood │
│ News Analyst → Macro news & events │
│ Technical Analyst → MACD, RSI, patterns │
└─────────────────────────────────────────────────────┘
↓ Reports fed into ↓
┌─────────────── RESEARCHER TEAM ────────────────────┐
│ Bullish Researcher ↔ Bearish Researcher (debate) │
│ Critical assessment of analyst findings │
└─────────────────────────────────────────────────────┘
↓ Debate synthesis ↓
┌─────────────── TRADER AGENT ───────────────────────┐
│ Synthesizes all reports → trading decision │
│ Determines timing and position magnitude │
└─────────────────────────────────────────────────────┘
↓ Proposal submitted ↓
┌─────────── RISK MANAGEMENT TEAM ───────────────────┐
│ Portfolio Manager → approves / rejects trades │
│ Risk evaluator → volatility + liquidity check │
└─────────────────────────────────────────────────────┘
git clone https://github.com/TauricResearch/TradingAgents.git
cd TradingAgents
conda create -n tradingagents python=3.13
conda activate tradingagents
pip install -r requirements.txt
Required API Keys:
export OPENAI_API_KEY="sk-..." # or any supported provider
export ANTHROPIC_API_KEY="sk-ant-..." # for Claude
export ALPHA_VANTAGE_API_KEY="..." # market data
python -m cli.main
# Select: ticker, date, LLM provider, research depth
from tradingagents.graph.trading_graph import TradingAgentsGraph
from tradingagents.default_config import DEFAULT_CONFIG
config = DEFAULT_CONFIG.copy()
config["llm_provider"] = "anthropic" # Use Claude
config["deep_think_llm"] = "claude-opus-4-6" # Complex reasoning
config["quick_think_llm"] = "claude-haiku-4-5-20251001" # Fast tasks
config["max_debate_rounds"] = 3 # Researcher debate depth
config["online_tools"] = True # Live market data
ta = TradingAgentsGraph(debug=True, config=config)
state, decision = ta.propagate("NVDA", "2026-01-15")
print(decision) # BUY / SELL / HOLD + rationale
| Provider | llm_provider | Models |
|---|---|---|
| Anthropic | "anthropic" | claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5 |
| OpenAI | "openai" | gpt-4o, gpt-4o-mini, o1 |
"google" | gemini-2.0-flash, gemini-1.5-pro | |
| xAI | "xai" | grok-2 |
| OpenRouter | "openrouter" | Any model via router |
| Ollama | "ollama" | Local models (llama3, mistral, etc.) |
| DeepSeek | "deepseek" | deepseek-chat (CN fork) |
| Alibaba | "alibaba" | qwen models (CN fork) |
| Market | Data Source |
|---|---|
| A-shares (China) | Tushare, AkShare, BaoStock |
| HK Stocks | AkShare |
| US Equities | Alpha Vantage |
git clone https://github.com/hsliuping/TradingAgents-CN.git
cd TradingAgents-CN
docker-compose up -d # Easiest path (MongoDB + Redis included)
# or
pip install -r requirements.txt
1. Input: ticker + date
2. Analysts run in parallel → 4 reports
3. Researcher debate (N rounds) → bull/bear synthesis
4. Trader synthesizes → trade proposal (BUY/SELL/HOLD + size)
5. Risk manager evaluates volatility + liquidity
6. Portfolio manager: APPROVE or REJECT
7. Output: final decision + reasoning chain
Use Claude as the reasoning backbone:
config = {
"llm_provider": "anthropic",
"deep_think_llm": "claude-opus-4-6", # Analyst/Researcher deep work
"quick_think_llm": "claude-sonnet-4-6", # Fast classification tasks
"max_debate_rounds": 2,
"online_tools": True,
}
Claude's strength in structured reasoning makes it ideal for:
# Pattern: Analyst role definition
analyst_prompt = """
You are a Fundamental Analyst. Evaluate the company's:
- Revenue growth, margins, P/E, debt ratios
- Competitive moat and sector dynamics
Return: structured report with BUY/NEUTRAL/SELL signal + confidence
"""
# Pattern: Debate orchestration (LangGraph)
from langgraph.graph import StateGraph
graph = StateGraph(TradingState)
graph.add_node("fundamentals_analyst", run_fundamentals)
graph.add_node("sentiment_analyst", run_sentiment)
graph.add_node("researcher_debate", run_debate)
graph.add_node("trader_decision", run_trader)
graph.add_node("risk_check", run_risk_manager)
graph.add_edge("fundamentals_analyst", "researcher_debate")
# ...
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
multi-agent, llm-trading, langgraph, stock-analysis, agent-orchestration
npx claudepluginhub mahmoud20138/tradecraft --plugin tradecraft169 skills in this plugin
/agent-developmentThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins./agentic-storageAgentic storage architecture — persistent memory for AI agents using MCP, immutable versioning, sandboxing, and intent validation. Covers the stateless problem in LLM agents, RAG limitations (read-only), MCP protocol (JSON-RPC, resources, tools), storage safety layers, and agent file system design. Source: IBM Technology (Martin Keen), March 2026. Use this skill for "agentic storage", "agent memory", "persistent agent state", "MCP storage", "agent file system", "agent hard drive", "stateless agent problem", "agent work product", "immutable versioning", "agent sandboxing", "intent validation", "agent safety layers", "agent context window limits", "storage for AI agents", "agent persistence", "autonomous agent storage", "agent audit trail". Works with mcp-integration, trading-brain, agents, trade-psychology-coach.
Other plugins' skills for the same job