exposure-coach

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Exposure Coach

Exposure Coach

Overview

概述

Exposure Coach synthesizes outputs from market-breadth-analyzer, uptrend-analyzer, macro-regime-detector, market-top-detector, ftd-detector, theme-detector, sector-analyst, and institutional-flow-tracker into a unified control-plane decision. The skill answers the solo trader's core question: "How much capital should I commit to equities right now?" before any individual stock analysis begins.
Exposure Coach 整合 market-breadth-analyzer、uptrend-analyzer、macro-regime-detector、market-top-detector、ftd-detector、theme-detector、sector-analyst 和 institutional-flow-tracker 的输出结果,形成统一的决策控制平面。该工具旨在解答独立交易者的核心问题:"当前我应该将多少资金投入股市?"——这一步应在进行个股分析前完成。

When to Use

适用场景

  • Before initiating any new stock positions to determine appropriate capital commitment
  • At the start of each trading week to calibrate portfolio exposure
  • When multiple market signals conflict and a unified posture is needed
  • After significant macro or market events to reassess exposure ceiling
  • When transitioning between market regimes (broadening, concentration, contraction)
  • 在建立任何新股票仓位前,确定合适的资金投入比例
  • 每个交易周开始时,校准投资组合的敞口水平
  • 当多个市场信号存在冲突,需要统一的市场态势判断时
  • 重大宏观或市场事件发生后,重新评估敞口上限
  • 市场状态切换时(如从集中化转为扩散化、收缩等)

Prerequisites

前置要求

  • Python 3.9+
  • FMP API key (set
    FMP_API_KEY
    environment variable) for institutional-flow-tracker data
  • Input JSON files from upstream skills (see Workflow Step 1)
  • Standard library +
    argparse
    ,
    json
    ,
    datetime
  • Python 3.9及以上版本
  • FMP API密钥(需设置
    FMP_API_KEY
    环境变量),用于获取institutional-flow-tracker的数据
  • 上游工具生成的输入JSON文件(见工作流步骤1)
  • 标准库 +
    argparse
    json
    datetime
    模块

Workflow

工作流

Step 1: Gather Upstream Skill Outputs

步骤1:收集上游工具输出

Collect the most recent JSON outputs from integrated skills. Each file provides a specific signal dimension:
SkillOutput File PatternSignal Provided
market-breadth-analyzer
breadth_*.json
Advance/decline ratios, new highs/lows
uptrend-analyzer
uptrend_*.json
Uptrend participation percentage
macro-regime-detector
regime_*.json
Current regime (Concentration, Broadening, etc.)
market-top-detector
top_risk_*.json
Distribution day count, top probability score
ftd-detector
ftd_*.json
Failure-to-deliver anomalies
theme-detector
theme_*.json
Active investment themes and rotation
sector-analyst
sector_*.json
Sector performance rankings
institutional-flow-tracker
institutional_*.json
Net institutional buying/selling
收集各整合工具最新的JSON输出文件,每个文件提供特定维度的信号:
工具输出文件格式提供的信号
market-breadth-analyzer
breadth_*.json
涨跌家数比、创新高/新低个股数量
uptrend-analyzer
uptrend_*.json
上涨趋势参与度百分比
macro-regime-detector
regime_*.json
当前市场状态(集中化、扩散化等)
market-top-detector
top_risk_*.json
派发日数量、顶部概率评分
ftd-detector
ftd_*.json
未交付(Failure-to-Deliver)异常情况
theme-detector
theme_*.json
活跃投资主题及风格切换
sector-analyst
sector_*.json
行业表现排名
institutional-flow-tracker
institutional_*.json
机构资金净买入/卖出情况

Step 2: Run Exposure Scoring Engine

步骤2:运行敞口评分引擎

Execute the exposure scoring script with paths to upstream outputs:
bash
python3 skills/exposure-coach/scripts/calculate_exposure.py \
  --breadth reports/breadth_latest.json \
  --uptrend reports/uptrend_latest.json \
  --regime reports/regime_latest.json \
  --top-risk reports/top_risk_latest.json \
  --ftd reports/ftd_latest.json \
  --theme reports/theme_latest.json \
  --sector reports/sector_latest.json \
  --institutional reports/institutional_latest.json \
  --output-dir reports/
The script accepts partial inputs; missing files reduce confidence but do not block execution.
执行敞口评分脚本,并传入上游输出文件的路径:
bash
python3 skills/exposure-coach/scripts/calculate_exposure.py \
  --breadth reports/breadth_latest.json \
  --uptrend reports/uptrend_latest.json \
  --regime reports/regime_latest.json \
  --top-risk reports/top_risk_latest.json \
  --ftd reports/ftd_latest.json \
  --theme reports/theme_latest.json \
  --sector reports/sector_latest.json \
  --institutional reports/institutional_latest.json \
  --output-dir reports/
脚本支持部分输入;若缺少文件,会降低结果置信度,但不会终止执行。

Step 3: Interpret the Market Posture Summary

步骤3:解读市场态势总结

Review the generated posture report containing:
  1. Exposure Ceiling -- Maximum recommended equity allocation (0-100%)
  2. Bias Direction -- Growth vs Value tilt based on regime and flow
  3. Participation Assessment -- Broad (healthy) vs Narrow (fragile) market
  4. Action Recommendation -- NEW_ENTRY_ALLOWED, REDUCE_ONLY, or CASH_PRIORITY
  5. Confidence Level -- HIGH, MEDIUM, or LOW based on input completeness
查看生成的态势报告,内容包括:
  1. 敞口上限 —— 建议的最高股票配置比例(0-100%)
  2. 风格偏好 —— 基于市场状态和资金流向的成长与价值风格倾向
  3. 参与度评估 —— 广度(健康)或窄度(脆弱)市场
  4. 行动建议 —— NEW_ENTRY_ALLOWED、REDUCE_ONLY 或 CASH_PRIORITY
  5. 置信度等级 —— HIGH、MEDIUM 或 LOW,基于输入文件的完整性

Step 4: Apply Exposure Guidance

步骤4:应用敞口指导建议

Map the posture recommendation to portfolio actions:
RecommendationAction
NEW_ENTRY_ALLOWEDProceed with stock-level analysis and new positions
REDUCE_ONLYNo new entries; trim existing positions on strength
CASH_PRIORITYRaise cash aggressively; avoid all new commitments
将态势建议映射到投资组合操作:
建议操作
NEW_ENTRY_ALLOWED继续进行个股分析并建立新仓位
REDUCE_ONLY不新增仓位;在行情走强时减持现有仓位
CASH_PRIORITY大幅增加现金持有;避免所有新的资金投入

Output Format

输出格式

JSON Report

JSON报告

json
{
  "schema_version": "1.0",
  "generated_at": "2026-03-16T07:00:00Z",
  "exposure_ceiling_pct": 70,
  "bias": "GROWTH",
  "participation": "BROAD",
  "recommendation": "NEW_ENTRY_ALLOWED",
  "confidence": "HIGH",
  "component_scores": {
    "breadth_score": 65,
    "uptrend_score": 72,
    "regime_score": 80,
    "top_risk_score": 25,
    "ftd_score": 10,
    "theme_score": 68,
    "sector_score": 70,
    "institutional_score": 75
  },
  "inputs_provided": ["breadth", "uptrend", "regime", "top_risk"],
  "inputs_missing": ["ftd", "theme", "sector", "institutional"],
  "rationale": "Broad participation with low top risk supports elevated exposure."
}
json
{
  "schema_version": "1.0",
  "generated_at": "2026-03-16T07:00:00Z",
  "exposure_ceiling_pct": 70,
  "bias": "GROWTH",
  "participation": "BROAD",
  "recommendation": "NEW_ENTRY_ALLOWED",
  "confidence": "HIGH",
  "component_scores": {
    "breadth_score": 65,
    "uptrend_score": 72,
    "regime_score": 80,
    "top_risk_score": 25,
    "ftd_score": 10,
    "theme_score": 68,
    "sector_score": 70,
    "institutional_score": 75
  },
  "inputs_provided": ["breadth", "uptrend", "regime", "top_risk"],
  "inputs_missing": ["ftd", "theme", "sector", "institutional"],
  "rationale": "Broad participation with low top risk supports elevated exposure."
}

Markdown Report

Markdown报告

The markdown report provides a one-page summary suitable for quick review:
markdown
undefined
Markdown报告为一页式总结,便于快速查看:
markdown
undefined

Market Posture Summary

Market Posture Summary

Date: 2026-03-16 | Confidence: HIGH
Date: 2026-03-16 | Confidence: HIGH

Exposure Ceiling: 70%

Exposure Ceiling: 70%

DimensionScoreStatus
Breadth65Healthy
Uptrend Participation72%Broad
RegimeBroadeningFavorable
Top Risk25Low
DimensionScoreStatus
Breadth65Healthy
Uptrend Participation72%Broad
RegimeBroadeningFavorable
Top Risk25Low

Recommendation: NEW_ENTRY_ALLOWED

Recommendation: NEW_ENTRY_ALLOWED

Bias: Growth > Value Participation: Broad (healthy internals)
Bias: Growth > Value Participation: Broad (healthy internals)

Rationale

Rationale

Broad participation with low distribution day count supports elevated equity exposure. New positions allowed within the 70% ceiling.

Reports are saved to `reports/` with filenames `exposure_posture_YYYY-MM-DD_HHMMSS.{json,md}`.
Broad participation with low distribution day count supports elevated equity exposure. New positions allowed within the 70% ceiling.

报告将保存至`reports/`目录,文件名为`exposure_posture_YYYY-MM-DD_HHMMSS.{json,md}`。

Resources

资源

  • scripts/calculate_exposure.py
    -- Main orchestrator that scores and synthesizes inputs
  • references/exposure_framework.md
    -- Scoring rules and threshold definitions
  • references/regime_exposure_map.md
    -- Regime-to-exposure ceiling mappings
  • scripts/calculate_exposure.py
    —— 主协调脚本,负责对输入进行评分与整合
  • references/exposure_framework.md
    —— 评分规则与阈值定义
  • references/regime_exposure_map.md
    —— 市场状态与敞口上限的对应关系

Key Principles

核心原则

  1. Safety First -- Default to lower exposure when inputs are incomplete or conflicting
  2. Regime Alignment -- Let macro regime set the baseline; breadth adjusts within bounds
  3. Actionable Output -- Always produce a clear recommendation, not just data aggregation
  1. 安全优先 —— 当输入不完整或存在冲突时,默认采用较低敞口建议
  2. 状态匹配 —— 以宏观市场状态为基准,通过市场广度在基准范围内调整敞口
  3. 输出可执行 —— 始终给出明确的建议,而非仅进行数据汇总