gaaiyun

TradingAgents OpenClaw Skill — Development skill for Claude Code

Development community

Multi-agent trading framework integrated with OpenClaw - 9 professional agents collaborate for trading decisions.

How to install TradingAgents OpenClaw Skill

This entry records only its repository, not the path inside it, so there is no exact command to give. Open gaaiyun/TradingAgents-OpenClaw-Skill and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What TradingAgents OpenClaw Skill does

Multi-agent trading framework integrated with OpenClaw - 9 professional agents collaborate for trading decisions.

Alternatives in Development

  • Om Dump — Freeform capture mode 4.6k ★
  • Vibe Research — Vibe-Research: Your Personal Trading Research Agent · A股/美股/港股 的个人投研 Agent:每日复盘、资讯雷达、个股数据、板块中心、我的持仓、研究记录、回测 2.5k ★
  • Haft — Engineering decisions engine that know when they're stale 1.4k ★

README

TradingAgents OpenClaw Skill

一个**三引擎**的股票分析 Skill:装了就能跑,没 LLM key 也能用,CI 友好。

把 [TauricResearch/TradingAgents](https://github.com/TauricResearch/TradingAgents)(多 LLM agent 辩论交易决策框架)包装成统一接口。v2 加了两件**别处没有**的事:

  1. 本地技术信号引擎signals.py)—— 不调 LLM、不需要 API key、就靠 yfinance + numpy 给可解释的交易信号。
  2. 三档 engine(auto / llm / signals / mock)—— 装了 TradingAgents 用 LLM,没装自动降级到 signals,CI 用 mock。

快速开始

pip install -r requirements.txt

1) 不需要 API key 的"立刻能跑"

from __init__ import TradingAgentsSkill

skill = TradingAgentsSkill(engine="signals")   # 强制用本地信号引擎
result = skill.analyze_stock("NVDA")
print(result["action"], result["confidence"])
print(result["reasoning"])

或者 CLI:

python __init__.py NVDA --engine signals

2) 需要 LLM 时启用 TradingAgents

pip install tradingagents
export OPENAI_API_KEY=sk-...
python __init__.py NVDA --engine llm

**注**:`tradingagents` 在 PyPI 上的版本 / 包名以官方仓库为准。如果是 dev 版本本地 clone 的,也可以:

export TRADING_AGENTS_HOME=/path/to/TradingAgents-Official

Skill 会自动加到 sys.path。

3) CI / 演示用 mock

result = TradingAgentsSkill(engine="mock").analyze_stock("AAPL")
# 返回 stub decision,不联网、不调 LLM

输出统一 schema

不管哪个 engine,都返回相同结构:

{
  "ticker": "NVDA",
  "date": "2024-05-10",
  "action": "BUY" | "SELL" | "HOLD" | "ERROR",
  "confidence": 0.78,
  "reasoning": "...",
  "risk_level": "LOW" | "MEDIUM" | "HIGH",
  "target_price": 1234.5,
  "stop_loss": 1100.0,
  "engine": "llm" | "signals-v2" | "mock",
  "analysis_details": { ... }
}

UI / 上层调用方一套代码就能消费三种 engine。

signals.py 在做什么

指标 用法
RSI(14) Wilder 超买/超卖
MACD(12,26,9) 金叉/死叉
Bollinger(20, 2σ) 短期超买/超卖
MA stack(20/50/200) 多头/空头排列
OBV 5d slope 资金净流入/出
ATR(14) 动态止损(默认 2×ATR)

每个指标都附带 `bullish / bearish / neutral` 判断和文字 rationale,加权投票得最终 action + 置信度。结果可以直接喂给 LLM 做"上下文摘要"——所以即使你之后接上 TradingAgents,这套数据也不会浪费。

文件清单

.
├─ __init__.py            # TradingAg