trading-analysis

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Extract the ticker symbol from $ARGUMENTS (e.g. "NVDA"). If no ticker is provided, ask the user for one before proceeding.
Set TODAY to the current date in YYYY-MM-DD format.
从$ARGUMENTS中提取股票代码(例如“NVDA”)。如果未提供股票代码,请先向用户询问。
将TODAY设置为当前日期,格式为YYYY-MM-DD。

Phase 1 — Parallel Data Analysis

第一阶段——并行数据分析

Spawn these 4 subagents IN PARALLEL using the Agent tool (all at once, do not wait for one before starting the others). Each subagent has Bash access to fetch data.
Subagent 1 — Technical Analyst:
You are a technical analyst for $TICKER as of $TODAY.

Fetch data:
```bash
uv run --project /Users/davidchen/repo/TradingAgents python /Users/davidchen/repo/TradingAgents/scripts/fetch_market_data.py --ticker $TICKER --type technical --date $TODAY
Write a technical analysis report (150-200 words) covering:
  • Trend: price vs EMA10, SMA50, SMA200 — bullish/bearish structure
  • Momentum: RSI level, MACD direction and histogram
  • Volatility: ATR relative to price, Bollinger band position
  • Key levels: nearest support and resistance based on recent closes
End with exactly: TECHNICAL SIGNAL: BULLISH, BEARISH, or NEUTRAL

**Subagent 2 — News & Sentiment Analyst:**
You are a news and sentiment analyst for $TICKER as of $TODAY.
Fetch data:
bash
uv run --project /Users/davidchen/repo/TradingAgents python /Users/davidchen/repo/TradingAgents/scripts/fetch_market_data.py --ticker $TICKER --type news --date $TODAY
Write a sentiment report (150-200 words) covering:
  • Top 3 most impactful headlines and their market implications
  • Overall sentiment: positive, negative, or mixed
  • Any sector tailwinds/headwinds visible in the news
  • Any earnings, guidance, or analyst signals
End with exactly: SENTIMENT SIGNAL: POSITIVE, NEGATIVE, or NEUTRAL

**Subagent 3 — Fundamentals Analyst:**
You are a fundamentals analyst for $TICKER as of $TODAY.
Fetch data:
bash
uv run --project /Users/davidchen/repo/claude-trading-agents python /Users/davidchen/repo/claude-trading-agents/scripts/fetch_market_data.py --ticker $TICKER --type fundamentals --date $TODAY
Write a fundamentals report (200-250 words) covering:
  • Valuation: trailing P/E, forward P/E, PEG ratio (forward PE / earnings growth), P/B vs sector norms
  • Growth: revenue growth, earnings growth trajectory
  • Quality: gross/operating margins, ROE, free cash flow
  • Balance sheet: total debt, total cash, D/E ratio (totalDebt / (totalDebt + stockholders equity)), current ratio
  • Risk metrics: beta, short ratio
  • Quarterly financials: cite 1-2 key line items from quarterly_income_stmt and quarterly_balance_sheet (e.g. quarterly revenue, net income, total assets)
  • Analyst consensus: mean recommendation (1=Strong Buy, 5=Sell), price target vs current price
End with exactly: FUNDAMENTAL SIGNAL: STRONG, FAIR, or WEAK

**Subagent 4 — Macro Analyst:**
You are a macro analyst providing global market context as of $TODAY.
Fetch data:
bash
uv run --project /Users/davidchen/repo/claude-trading-agents python /Users/davidchen/repo/claude-trading-agents/scripts/fetch_market_data.py --ticker MACRO --type macro --date $TODAY
Write a macro context report (100-150 words) covering:
  • Key macro themes visible in S&P 500, Treasury yield, oil, and gold news
  • Any geopolitical, monetary policy, or economic signals that could affect equities
  • Overall macro environment: risk-on, risk-off, or neutral
End with exactly: MACRO SIGNAL: RISK-ON, RISK-OFF, or NEUTRAL

Wait for all 4 subagents to complete. Collect their full reports.

---
使用Agent工具并行启动以下4个子Agent(同时启动,无需等待一个完成再启动另一个)。每个子Agent都可通过Bash获取数据。
子Agent 1——技术分析师:
你是截至$TODAY的$TICKER技术分析师。

获取数据:
```bash
uv run --project /Users/davidchen/repo/TradingAgents python /Users/davidchen/repo/TradingAgents/scripts/fetch_market_data.py --ticker $TICKER --type technical --date $TODAY
撰写一份150-200词的技术分析报告,涵盖:
  • 趋势:价格与EMA10、SMA50、SMA200的对比——看涨/看跌结构
  • 动量:RSI水平、MACD方向及柱状图
  • 波动率:ATR相对价格的水平、布林带位置
  • 关键价位:基于近期收盘价的最近支撑位和阻力位
结尾必须为:TECHNICAL SIGNAL: BULLISH, BEARISH, or NEUTRAL

**子Agent 2——新闻与情绪分析师:**
你是截至$TODAY的$TICKER新闻与情绪分析师。
获取数据:
bash
uv run --project /Users/davidchen/repo/TradingAgents python /Users/davidchen/repo/TradingAgents/scripts/fetch_market_data.py --ticker $TICKER --type news --date $TODAY
撰写一份150-200词的情绪报告,涵盖:
  • 影响最大的3条头条新闻及其对市场的影响
  • 整体情绪:正面、负面或中性
  • 新闻中可见的行业利好/利空因素
  • 任何盈利、业绩指引或分析师信号
结尾必须为:SENTIMENT SIGNAL: POSITIVE, NEGATIVE, or NEUTRAL

**子Agent 3——基本面分析师:**
你是截至$TODAY的$TICKER基本面分析师。
获取数据:
bash
uv run --project /Users/davidchen/repo/claude-trading-agents python /Users/davidchen/repo/claude-trading-agents/scripts/fetch_market_data.py --ticker $TICKER --type fundamentals --date $TODAY
撰写一份200-250词的基本面报告,涵盖:
  • 估值:静态市盈率、动态市盈率、PEG比率(动态市盈率/盈利增长率)、市净率与行业均值对比
  • 增长:营收增长、盈利增长趋势
  • 质量:毛利率/营业利润率、净资产收益率、自由现金流
  • 资产负债表:总负债、总现金、负债权益比(总负债/(总负债+股东权益))、流动比率
  • 风险指标:贝塔系数、卖空比率
  • 季度财务数据:引用季度利润表和季度资产负债表中的1-2个关键项目(如季度营收、净利润、总资产)
  • 分析师共识:平均评级(1=强力买入,5=卖出)、目标价与当前价格对比
结尾必须为:FUNDAMENTAL SIGNAL: STRONG, FAIR, or WEAK

**子Agent 4——宏观分析师:**
你是截至$TODAY提供全球市场背景的宏观分析师。
获取数据:
bash
uv run --project /Users/davidchen/repo/claude-trading-agents python /Users/davidchen/repo/claude-trading-agents/scripts/fetch_market_data.py --ticker MACRO --type macro --date $TODAY
撰写一份100-150词的宏观背景报告,涵盖:
  • 标普500、美国国债收益率、原油和黄金新闻中体现的关键宏观主题
  • 可能影响股市的地缘政治、货币政策或经济信号
  • 整体宏观环境:风险偏好、风险规避或中性
结尾必须为:MACRO SIGNAL: RISK-ON, RISK-OFF, or NEUTRAL

等待所有4个子Agent完成,收集它们的完整报告。

---

Phase 2 — Adversarial Bull/Bear Debate

第二阶段——多空对抗辩论

Run these 2 subagents SEQUENTIALLY: Bull first, then Bear receives Bull's full argument.
Subagent 5 — Bull Analyst:
You are a Bull Analyst advocating for investing in $TICKER. Your task is to build
a strong, evidence-based case emphasizing growth potential, competitive advantages,
and positive market indicators.

Key points to focus on:
- Growth Potential: Highlight market opportunities, revenue projections, and scalability.
- Competitive Advantages: Emphasize unique products, strong branding, or dominant market positioning.
- Positive Indicators: Use financial health, industry trends, and recent positive news as evidence.
- Engagement: Present your argument conversationally. Be direct and confident.

Resources available:

TECHNICAL REPORT:
[insert full technical report from Phase 1]

NEWS REPORT:
[insert full news report from Phase 1]

MACRO REPORT:
[insert full macro report from Phase 1]

FUNDAMENTALS REPORT:
[insert full fundamentals report from Phase 1]

Write 150-200 words. Use specific data points from the reports above.

End with exactly: BULL CONVICTION: HIGH, MEDIUM, or LOW
Wait for Subagent 5 to complete. Collect the full bull report.
Subagent 6 — Bear Analyst:
You are a Bear Analyst making the case against investing in $TICKER. Your goal is
to present a well-reasoned argument emphasizing risks, challenges, and negative
indicators — and to directly rebut the Bull Analyst's specific claims.

Key points to focus on:
- Risks and Challenges: Market saturation, financial instability, or macroeconomic threats.
- Competitive Weaknesses: Weaker positioning, declining innovation, or threats from competitors.
- Negative Indicators: Use financial data, market trends, or adverse news.
- Macro Risks: Use the macro report to identify broader market headwinds.
- Bull Counterpoints: Critically analyze each of the bull's specific claims below with data
  and sound reasoning, exposing weaknesses or over-optimistic assumptions.
- Engagement: Respond conversationally and directly to what the Bull said — don't just list facts.

Resources available:

TECHNICAL REPORT:
[insert full technical report from Phase 1]

NEWS REPORT:
[insert full news report from Phase 1]

MACRO REPORT:
[insert full macro report from Phase 1]

FUNDAMENTALS REPORT:
[insert full fundamentals report from Phase 1]

BULL ANALYST'S ARGUMENT (respond to this directly):
[insert full bull report from Subagent 4]

Write 150-200 words. Rebut the bull's specific arguments using data from the reports.

End with exactly: BEAR CONVICTION: HIGH, MEDIUM, or LOW
Wait for Subagent 6 to complete. Collect the full bear report.
Subagent 7 — Risk Analyst:
You are a conservative Risk Analyst. Your job is NOT to repeat what the Bull or Bear
said — it is to stress-test the trade from a risk management perspective and surface
factors that neither side adequately addressed.

Focus on:
- Downside scenarios: what would have to go wrong for a meaningful loss to occur?
- Balance sheet risk: leverage (D/E ratio), liquidity (current ratio), debt obligations
- Volatility and beta: what does high beta imply for position sizing and drawdown risk?
- Concentration and crowding risk: is the analyst consensus too one-sided?
- Macro tail risks: which macro signals from the macro report pose the biggest threat?
- Any risk the Bull and Bear both glossed over

Resources available:

FUNDAMENTALS REPORT:
[insert full fundamentals report from Phase 1]

MACRO REPORT:
[insert full macro report from Phase 1]

BULL ARGUMENT:
[insert full bull report]

BEAR ARGUMENT:
[insert full bear report]

Write 150-200 words. Be specific — cite numbers (beta, D/E, short ratio, yield levels).
Do not simply side with the bear. Raise risks that neither analyst addressed.

End with exactly: RISK LEVEL: HIGH, MEDIUM, or LOW
Wait for Subagent 7 to complete. Collect the full risk report.

依次运行以下2个子Agent:先运行多头分析师,然后空头分析师接收多头的完整论点。
子Agent 5——多头分析师:
你是一名倡导投资$TICKER的多头分析师。你的任务是构建一个基于证据的有力论点,强调增长潜力、竞争优势和积极的市场指标。

重点关注:
- 增长潜力:突出市场机会、营收预测和可扩展性。
- 竞争优势:强调独特产品、强大品牌或主导市场地位。
- 积极指标:以财务健康状况、行业趋势和近期正面新闻为证据。
- 表达方式:以对话形式呈现论点,直接且自信。

可用资源:

技术报告:
[插入第一阶段的完整技术报告]

新闻报告:
[插入第一阶段的完整新闻报告]

宏观报告:
[插入第一阶段的完整宏观报告]

基本面报告:
[插入第一阶段的完整基本面报告]

撰写150-200词,使用上述报告中的具体数据点。

结尾必须为:BULL CONVICTION: HIGH, MEDIUM, or LOW
等待子Agent 5完成,收集完整的多头报告。
子Agent 6——空头分析师:
你是一名反对投资$TICKER的空头分析师。你的目标是呈现一个理由充分的论点,强调风险、挑战和负面指标——并直接反驳多头分析师的具体主张。

重点关注:
- 风险与挑战:市场饱和、财务不稳定或宏观经济威胁。
- 竞争劣势:市场地位较弱、创新能力下降或来自竞争对手的威胁。
- 负面指标:使用财务数据、市场趋势或不利新闻。
- 宏观风险:利用宏观报告识别更广泛的市场利空因素。
- 多头反驳点:用数据和合理推理批判性分析多头的每个具体主张,揭露其弱点或过于乐观的假设。
- 表达方式:以对话形式直接回应多头的观点——不要只是罗列事实。

可用资源:

技术报告:
[插入第一阶段的完整技术报告]

新闻报告:
[插入第一阶段的完整新闻报告]

宏观报告:
[插入第一阶段的完整宏观报告]

基本面报告:
[插入第一阶段的完整基本面报告]

多头分析师的论点(直接回应):
[插入子Agent 4的完整多头报告]

撰写150-200词,利用报告中的数据反驳多头的具体论点。

结尾必须为:BEAR CONVICTION: HIGH, MEDIUM, or LOW
等待子Agent 6完成,收集完整的空头报告。
子Agent 7——风险分析师:
你是一名保守型风险分析师。你的工作不是重复多头或空头的观点——而是从风险管理角度压力测试该交易,并找出双方均未充分提及的因素。

重点关注:
- 下行场景:出现重大损失需要哪些情况发生?
- 资产负债表风险:杠杆率(负债权益比)、流动性(流动比率)、债务义务
- 波动率与贝塔系数:高贝塔系数对仓位规模和回撤风险意味着什么?
- 集中度与拥挤风险:分析师共识是否过于一边倒?
- 宏观尾部风险:宏观报告中的哪些宏观信号构成最大威胁?
- 多头和空头都忽略的任何风险

可用资源:

基本面报告:
[插入第一阶段的完整基本面报告]

宏观报告:
[插入第一阶段的完整宏观报告]

多头论点:
[插入完整的多头报告]

空头论点:
[插入完整的空头报告]

撰写150-200词,要具体——引用数字(贝塔系数、负债权益比、卖空比率、收益率水平)。
不要简单站在空头一边,提出两位分析师都未提及的风险。

结尾必须为:RISK LEVEL: HIGH, MEDIUM, or LOW
等待子Agent 7完成,收集完整的风险报告。

Phase 3 — Research Manager

第三阶段——研究经理

You are now the Research Manager and debate facilitator. Your role is to critically evaluate the bull/bear debate and deliver a clear, actionable investment plan for the trader.
Rating Scale (use exactly one):
  • Buy: Strong conviction in the bull thesis; recommend taking or growing the position
  • Overweight: Constructive view; recommend gradually increasing exposure
  • Hold: Balanced view; recommend maintaining the current position
  • Underweight: Cautious view; recommend trimming exposure
  • Sell: Strong conviction in the bear thesis; recommend exiting or avoiding the position
Commit to a clear stance whenever the debate's strongest arguments warrant one; reserve Hold for situations where the evidence on both sides is genuinely balanced.
Debate to evaluate:
BULL ANALYST: [insert full bull report]
BEAR ANALYST: [insert full bear report]
RISK ANALYST: [insert full risk report from Subagent 7]
Output your investment plan in this format:
RECOMMENDATION: [Buy / Overweight / Hold / Underweight / Sell]

RATIONALE: [2-3 sentences — who won the debate and why, citing specific evidence]

STRATEGIC ACTIONS: [2-3 sentences — what the trader should specifically do: entry approach, sizing, conditions to watch]

你现在是研究经理兼辩论主持人。你的角色是批判性评估多空辩论,并为交易员提供清晰、可执行的投资计划。
评级标准(必须选择其一):
  • 买入:强烈认同多头论点;建议建仓或加仓
  • 增持:建设性观点;建议逐步增加仓位
  • 持有:观点平衡;建议维持当前仓位
  • 减持:谨慎观点;建议减仓
  • 卖出:强烈认同空头论点;建议平仓或避免建仓
当辩论的最强论点支持明确立场时,要坚定选择;只有当双方证据真正平衡时,才选择持有。
待评估的辩论内容:
多头分析师: [插入完整的多头报告]
空头分析师: [插入完整的空头报告]
风险分析师: [插入子Agent 7的完整风险报告]
按以下格式输出你的投资计划:
RECOMMENDATION: [Buy / Overweight / Hold / Underweight / Sell]

RATIONALE: [2-3句话——谁赢得了辩论及原因,引用具体证据]

STRATEGIC ACTIONS: [2-3句话——交易员应具体采取的行动:入场方式、仓位规模、需关注的条件]

Phase 4 — Trader

第四阶段——交易员

You are a Trader converting the Research Manager's plan into a concrete transaction proposal. Anchor your reasoning in the analyst reports and the investment plan. Be specific on price levels.
INVESTMENT PLAN FROM RESEARCH MANAGER: [insert Research Manager output from Phase 3]
TECHNICAL REPORT (for price levels): [insert full technical report from Phase 1]
Output your transaction proposal in this format:
ACTION: [Buy / Hold / Sell]

REASONING: [2-3 sentences anchored in the reports — why this action, why now]

ENTRY: $[specific price level, or range, based on technical support/resistance]
STOP: $[specific price level — where the thesis is invalidated]
SIZE: [e.g. "3-5% of portfolio, add in 2 tranches" or "maintain current position"]

你是一名将研究经理的计划转化为具体交易方案的交易员。你的推理要基于分析师报告和投资计划,价格水平要具体。
研究经理的投资计划: [插入第三阶段的研究经理输出]
技术报告(用于确定价格水平): [插入第一阶段的完整技术报告]
按以下格式输出你的交易方案:
ACTION: [Buy / Hold / Sell]

REASONING: [2-3句话,基于报告——为何采取此行动,为何是现在]

ENTRY: $[具体价格水平或区间,基于技术支撑/阻力位]
STOP: $[具体价格水平——论点失效的价位]
SIZE: [例如“投资组合的3-5%,分2批建仓”或“维持当前仓位”]

Phase 5 — Portfolio Manager Decision

第五阶段——投资组合经理决策

You are now the Portfolio Manager. Synthesize all inputs and deliver the final decision.
RESEARCH MANAGER'S PLAN: [insert Phase 3 output]
TRADER'S PROPOSAL: [insert Phase 4 output]
BULL ARGUMENT: [insert bull report]
BEAR ARGUMENT: [insert bear report]
RISK ANALYST: [insert full risk report]
Output the final decision in this EXACT format:
TICKER: [ticker]
DATE: [today]
SIGNAL: [BUY / SELL / HOLD]
RATING: [Overweight / Equal Weight / Underweight]
ENTRY: $[price from Trader]
STOP: $[price from Trader]
SIZE: [sizing from Trader]

BULL: [one sentence — the single strongest bull argument]
BEAR: [one sentence — the single strongest bear argument]
VERDICT: [2-3 sentences — why the bull or bear case won and what specifically to do]
Display the full PM decision to the user.
你现在是投资组合经理。综合所有输入,给出最终决策。
研究经理的计划: [插入第三阶段的输出]
交易员的方案: [插入第四阶段的输出]
多头论点: [插入多头报告]
空头论点: [插入空头报告]
风险分析师: [插入完整的风险报告]
按以下精确格式输出最终决策:
TICKER: [股票代码]
DATE: [今日日期]
SIGNAL: [BUY / SELL / HOLD]
RATING: [Overweight / Equal Weight / Underweight]
ENTRY: $[交易员给出的价格]
STOP: $[交易员给出的价格]
SIZE: [交易员给出的仓位规模]

BULL: [一句话——最有力的多头论点]
BEAR: [一句话——最有力的空头论点]
VERDICT: [2-3句话——为何多头或空头论点获胜,具体应采取什么行动]
向用户展示完整的投资组合经理决策。