crypto-regime-analyzer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Crypto Regime Analyzer Skill

Crypto Regime Analyzer 技能

Purpose

用途

Quantify the crypto market regime using a data-driven 6-component scoring system (0-100). This is the crypto analog of
market-breadth-analyzer
+
exposure-coach
: it answers "what posture does the crypto market currently support?" before any coin-level analysis happens.
Score direction: 100 = Maximum risk-on health (broad participation, healthy trend, sane leverage), 0 = Critical risk-off.
No API key required — uses CoinGecko's free public API and Binance's public futures endpoint.
采用数据驱动的6维度评分体系(0-100分)量化加密货币市场状态。这是加密货币领域对标
market-breadth-analyzer
+
exposure-coach
的工具:在进行任何币种层面的分析之前,它可以回答“当前加密货币市场适合何种仓位策略?”的问题。
评分说明: 100分=风险偏好型市场健康度拉满(广泛参与、趋势健康、杠杆合理),0分=极端风险规避型市场。
无需API密钥 —— 使用CoinGecko的免费公开API和Binance的公开期货端点。

When to Use This Skill

适用场景

  • User asks "Is crypto risk-on or risk-off right now?" or "How healthy is the crypto market?"
  • User asks "Is it alt season?" or about BTC dominance direction
  • User asks whether funding rates are overheated
  • User wants an exposure posture for a crypto sleeve before screening individual coins
  • User wants a daily crypto regime check alongside the equity
    market-regime-daily
    workflow
  • 用户询问“当前加密货币市场是风险偏好还是风险规避状态?”或“加密货币市场健康度如何?”
  • 用户询问“是否处于山寨币季节?”或BTC主导地位的变化方向
  • 用户询问资金费率是否过热
  • 用户在筛选单个币种之前,希望为加密货币资产配置获取仓位建议
  • 用户希望将每日加密货币状态检查与股票
    market-regime-daily
    工作流结合使用

What This Skill Does NOT Do

不支持的功能

  • No coin picks, no buy/sell signals, no price targets
  • No execution or portfolio changes — regime description only
  • Human decision gates remain central, consistent with the project vision
  • 不提供币种推荐、买卖信号或价格目标
  • 不执行交易或调整投资组合——仅描述市场状态
  • 人工决策仍是核心,与项目愿景一致

Prerequisites

前置条件

  • Python 3.9+ with
    requests
    (live mode only; offline mode is stdlib-only)
  • Internet access to
    api.coingecko.com
    and
    fapi.binance.com
    (live mode)
  • No API keys required
  • Python 3.9+ 环境,需安装
    requests
    库(仅在线模式需要;离线模式仅依赖标准库)
  • 网络访问权限 可连接
    api.coingecko.com
    fapi.binance.com
    (在线模式)
  • 无需API密钥

Component Model

维度模型

#ComponentWeightQuestion it answers
1BTC Trend Structure25%Is the reserve asset's primary trend intact? (price vs 50/200DMA stack, 200DMA slope)
2Alt Breadth Participation20%How broadly are alts participating? (% of top-N above 200DMA, 50DMA confirmation)
3BTC Dominance Regime15%Where is capital rotating? (dominance direction interpreted jointly with BTC trend)
4Perpetual Funding Regime15%How crowded is leverage? (avg funding across majors; contrarian at extremes)
5Drawdown & Volatility Position15%Where are we in the cycle? (drawdown from 1y high, realized vol percentile)
6Momentum Thrust / Washout10%Short-horizon confirmation (% of universe positive over 30d)
Missing components have their weight proportionally redistributed (same convention as
market-breadth-analyzer
). Full scoring logic:
references/crypto_regime_methodology.md
.
#维度权重解决的问题
1BTC趋势结构25%储备资产的主要趋势是否完好?(价格与50/200DMA均线对比、200DMA均线斜率)
2山寨币广度参与度20%山寨币的参与广度如何?(前N大币种中价格高于200DMA的占比、50DMA确认情况)
3BTC主导地位状态15%资金流向何方?(结合BTC趋势解读主导地位变化方向)
4永续合约资金费率状态15%杠杆持仓拥挤程度如何?(主流币种平均资金费率;极端值为反向指标)
5回撤与波动位置15%我们处于周期的哪个阶段?(距1年高点的回撤幅度、已实现波动率百分位)
6动量推力/洗盘10%短期趋势确认(30天内全市场币种上涨占比)
缺失维度的权重会按比例重新分配(与
market-breadth-analyzer
遵循相同规则)。完整评分逻辑见:
references/crypto_regime_methodology.md

Regime Zones

状态区间

ScoreZonePosture
80-100RISK_ONBroad risk-on conditions observed; review risk limits before decisions
40-79NEUTRALMixed conditions observed; no strong regime conclusion
0-39RISK_OFFDefensive market conditions observed; review existing risk controls
These are heuristic descriptive bands, not validated allocation rules. See
references/VALIDATION.md
for the current evidence boundary and the artifacts required before making quantitative performance claims.

评分区间仓位建议
80-100RISK_ON观察到广泛的风险偏好型市场条件;决策前需审查风险限额
40-79NEUTRAL观察到混合市场条件;无法得出明确的市场状态结论
0-39RISK_OFF观察到防御型市场条件;需审查现有风险控制措施
这些是启发式描述区间,并非经过验证的配置规则。有关当前证据边界以及提出量化性能声明所需的文档,请参阅
references/VALIDATION.md

Execution Workflow

执行流程

Phase 1: Run the Analysis Script

阶段1:运行分析脚本

Live mode (fetches CoinGecko + Binance; first run of the day takes ~2-4 minutes at the default
--top-n 20
due to free-tier rate-limit throttling; same-day re-runs hit the cache and are instant):
bash
mkdir -p reports/<routine-or-date>
python3 skills/crypto-regime-analyzer/scripts/crypto_regime_analyzer.py \
  --output-dir reports/<routine-or-date>
Offline mode (no network; snapshot schema in the methodology reference):
bash
python3 skills/crypto-regime-analyzer/scripts/crypto_regime_analyzer.py \
  --input-json snapshot.json \
  --output-dir reports/<routine-or-date>
Options:
--top-n <int>
universe size (default 20),
--cache-dir <path>
fetch cache location (default
.crypto_regime_cache
),
--quiet
.
在线模式(获取CoinGecko + Binance数据;默认
--top-n 20
参数下,每日首次运行需约2-4分钟,因免费版速率限制;当日重新运行会命中缓存,瞬间完成):
bash
mkdir -p reports/<routine-or-date>
python3 skills/crypto-regime-analyzer/scripts/crypto_regime_analyzer.py \
  --output-dir reports/<routine-or-date>
离线模式(无需网络;快照 schema 见方法论参考文档):
bash
python3 skills/crypto-regime-analyzer/scripts/crypto_regime_analyzer.py \
  --input-json snapshot.json \
  --output-dir reports/<routine-or-date>
可选参数:
--top-n <int>
市场币种范围(默认20),
--cache-dir <path>
缓存存储路径(默认
.crypto_regime_cache
),
--quiet
静默模式。

Phase 2: Interpret the Output

阶段2:解读输出结果

The script writes
crypto_regime.json
(machine-readable, for chaining into other skills) and
crypto_regime.md
(one-page report), and prints a one-line summary:
CRYPTO REGIME: NEUTRAL (score 68.4/100) — Mixed conditions observed; no strong regime conclusion
When presenting results, lead with the zone and posture, then explain the 1-2 components most responsible for the score using their
signal
strings. Flag any components reporting
data_available: false
and what that means for confidence.
脚本会生成
crypto_regime.json
(机器可读格式,可用于与其他技能联动)和
crypto_regime.md
(单页报告),并打印一行摘要:
CRYPTO REGIME: NEUTRAL (score 68.4/100) — Mixed conditions observed; no strong regime conclusion
展示结果时,先说明区间和仓位建议,再解释对评分影响最大的1-2个维度的
signal
内容。标记任何显示
data_available: false
的维度,并说明其对结果可信度的影响。

Phase 3 (optional): Feed Downstream

阶段3(可选):下游联动

The JSON composite can slot into an
exposure-coach
-style posture summary as one descriptive crypto-market input. It must not independently authorize, block, size, or execute a trade.
JSON格式的综合结果可作为描述性加密货币市场输入,纳入
exposure-coach
风格的仓位摘要中。它不得独立授权、阻止、调整或执行交易。

Output

输出内容

The script writes two artifacts to
--output-dir
and prints a one-line summary for workflow chaining:
  • crypto_regime.json
    — full machine-readable analysis:
    metadata
    , per-component results (
    score
    ,
    signal
    ,
    data_available
    , component-specific fields), and the
    composite
    block (
    score
    ,
    zone
    ,
    guidance
    ,
    effective_weights
    ).
  • crypto_regime.md
    — one-page report: composite score with zone bar, posture line, per-component table (weight / score / signal), and confidence notes.
  • Console:
    CRYPTO REGIME: <ZONE> (score <N>/100) — <posture>
    plus warnings for any skipped components.
脚本会向
--output-dir
写入两个文件,并打印一行摘要用于工作流联动:
  • crypto_regime.json
    —— 完整的机器可读分析结果:包含
    metadata
    、各维度结果(
    score
    signal
    data_available
    、维度特定字段),以及
    composite
    模块(
    score
    zone
    guidance
    effective_weights
    )。
  • crypto_regime.md
    —— 单页报告:包含带区间进度条的综合评分、仓位建议、各维度表格(权重/评分/信号),以及可信度说明。
  • 控制台输出:
    CRYPTO REGIME: <ZONE> (score <N>/100) — <posture>
    以及任何跳过维度的警告信息。

Resources

资源

  • references/VALIDATION.md
    — validation status, evidence boundary, and reproduction requirements.
  • references/crypto_regime_methodology.md
    — full scoring rationale, every threshold table, the offline snapshot JSON schema, and the live data-source endpoint list.
  • scripts/crypto_regime_analyzer.py
    — CLI orchestrator (entry point).
  • scripts/data_client.py
    — CoinGecko/Binance fetchers, per-day cache, dominance history accumulator, offline loader.
  • scripts/calculators/
    — one module per component; pure functions, fully unit-tested.
  • scripts/scorer.py
    — weighted composite with proportional weight redistribution.
  • scripts/tests/
    — tests covering every component, the scorer, sparse-data fail-closed behavior, and end-to-end bull/bear/degraded snapshots.
  • references/VALIDATION.md
    —— 验证状态、证据边界和复现要求。
  • references/crypto_regime_methodology.md
    —— 完整评分依据、所有阈值表、离线快照JSON schema,以及在线数据源端点列表。
  • scripts/crypto_regime_analyzer.py
    —— CLI协调器(入口文件)。
  • scripts/data_client.py
    —— CoinGecko/Binance数据获取器、每日缓存、主导地位历史累加器、离线加载器。
  • scripts/calculators/
    —— 每个维度对应一个模块;纯函数,已完成单元测试。
  • scripts/scorer.py
    —— 带权重比例重分配的加权综合评分器。
  • scripts/tests/
    —— 涵盖所有维度、评分器、稀疏数据故障关闭行为,以及牛/熊/降级快照端到端测试的测试用例。

Known Limitations

已知限制

  • Dominance history accumulates locally. CoinGecko's free tier only exposes current dominance, so the client stores one observation per run-day in the cache dir. The dominance component reports
    data_available: false
    until 31 daily observations exist (weight is redistributed until then). Seed it faster via
    --input-json
    .
  • Funding is best-effort. If Binance's endpoint is unreachable (geo-restrictions, outage), the component is skipped gracefully.
  • Universe is top-N by market cap with stablecoins and wrapped/staked assets excluded; it is not a fixed index, so composition drifts with the market.
  • Thresholds are heuristic and documented in the methodology reference; they are conservative defaults, not backtested optima.
  • 主导地位历史数据本地累加。CoinGecko免费版仅提供当前主导地位数据,因此客户端会在缓存目录中存储每日运行的一次观测数据。主导地位维度在积累31条每日观测数据之前会显示
    data_available: false
    (在此期间权重会被重新分配)。可通过
    --input-json
    参数快速填充数据。
  • 资金费率数据尽最大努力获取。若Binance端点无法访问(地域限制、服务中断),该维度会被优雅跳过。
  • 币种范围为市值前N大币种,排除稳定币和包装/质押资产;这并非固定指数,因此组成会随市场变化而漂移。
  • 阈值为启发式设定,已记录在方法论参考文档中;它们是保守默认值,并非经过回测的最优值。

Disclaimer

免责声明

Educational and process-improvement use only. This skill describes market conditions; it does not provide financial advice, signals, or buy/sell instructions. All decisions remain the user's responsibility.
仅用于教育和流程改进。本技能仅描述市场状况;不提供财务建议、交易信号或买卖指令。所有决策由用户自行负责。