crypto-regime-analyzer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCrypto 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 + : it answers "what posture does the crypto market currently support?" before any coin-level analysis happens.
market-breadth-analyzerexposure-coachScore 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-analyzerexposure-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 workflow
market-regime-daily
- 用户询问“当前加密货币市场是风险偏好还是风险规避状态?”或“加密货币市场健康度如何?”
- 用户询问“是否处于山寨币季节?”或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 (live mode only; offline mode is stdlib-only)
requests - Internet access to and
api.coingecko.com(live mode)fapi.binance.com - No API keys required
- Python 3.9+ 环境,需安装库(仅在线模式需要;离线模式仅依赖标准库)
requests - 网络访问权限 可连接和
api.coingecko.com(在线模式)fapi.binance.com - 无需API密钥
Component Model
维度模型
| # | Component | Weight | Question it answers |
|---|---|---|---|
| 1 | BTC Trend Structure | 25% | Is the reserve asset's primary trend intact? (price vs 50/200DMA stack, 200DMA slope) |
| 2 | Alt Breadth Participation | 20% | How broadly are alts participating? (% of top-N above 200DMA, 50DMA confirmation) |
| 3 | BTC Dominance Regime | 15% | Where is capital rotating? (dominance direction interpreted jointly with BTC trend) |
| 4 | Perpetual Funding Regime | 15% | How crowded is leverage? (avg funding across majors; contrarian at extremes) |
| 5 | Drawdown & Volatility Position | 15% | Where are we in the cycle? (drawdown from 1y high, realized vol percentile) |
| 6 | Momentum Thrust / Washout | 10% | Short-horizon confirmation (% of universe positive over 30d) |
Missing components have their weight proportionally redistributed (same convention as ). Full scoring logic: .
market-breadth-analyzerreferences/crypto_regime_methodology.md| # | 维度 | 权重 | 解决的问题 |
|---|---|---|---|
| 1 | BTC趋势结构 | 25% | 储备资产的主要趋势是否完好?(价格与50/200DMA均线对比、200DMA均线斜率) |
| 2 | 山寨币广度参与度 | 20% | 山寨币的参与广度如何?(前N大币种中价格高于200DMA的占比、50DMA确认情况) |
| 3 | BTC主导地位状态 | 15% | 资金流向何方?(结合BTC趋势解读主导地位变化方向) |
| 4 | 永续合约资金费率状态 | 15% | 杠杆持仓拥挤程度如何?(主流币种平均资金费率;极端值为反向指标) |
| 5 | 回撤与波动位置 | 15% | 我们处于周期的哪个阶段?(距1年高点的回撤幅度、已实现波动率百分位) |
| 6 | 动量推力/洗盘 | 10% | 短期趋势确认(30天内全市场币种上涨占比) |
缺失维度的权重会按比例重新分配(与遵循相同规则)。完整评分逻辑见:。
market-breadth-analyzerreferences/crypto_regime_methodology.mdRegime Zones
状态区间
| Score | Zone | Posture |
|---|---|---|
| 80-100 | RISK_ON | Broad risk-on conditions observed; review risk limits before decisions |
| 40-79 | NEUTRAL | Mixed conditions observed; no strong regime conclusion |
| 0-39 | RISK_OFF | Defensive market conditions observed; review existing risk controls |
These are heuristic descriptive bands, not validated allocation rules. See
for the current evidence boundary and the artifacts
required before making quantitative performance claims.
references/VALIDATION.md| 评分 | 区间 | 仓位建议 |
|---|---|---|
| 80-100 | RISK_ON | 观察到广泛的风险偏好型市场条件;决策前需审查风险限额 |
| 40-79 | NEUTRAL | 观察到混合市场条件;无法得出明确的市场状态结论 |
| 0-39 | RISK_OFF | 观察到防御型市场条件;需审查现有风险控制措施 |
这些是启发式描述区间,并非经过验证的配置规则。有关当前证据边界以及提出量化性能声明所需的文档,请参阅。
references/VALIDATION.mdExecution 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 due to free-tier rate-limit throttling; same-day re-runs hit the cache and are instant):
--top-n 20bash
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: universe size (default 20), fetch cache location (default ), .
--top-n <int>--cache-dir <path>.crypto_regime_cache--quiet在线模式(获取CoinGecko + Binance数据;默认参数下,每日首次运行需约2-4分钟,因免费版速率限制;当日重新运行会命中缓存,瞬间完成):
--top-n 20bash
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>可选参数: 市场币种范围(默认20), 缓存存储路径(默认), 静默模式。
--top-n <int>--cache-dir <path>.crypto_regime_cache--quietPhase 2: Interpret the Output
阶段2:解读输出结果
The script writes (machine-readable, for chaining into other skills) and (one-page report), and prints a one-line summary:
crypto_regime.jsoncrypto_regime.mdCRYPTO REGIME: NEUTRAL (score 68.4/100) — Mixed conditions observed; no strong regime conclusionWhen presenting results, lead with the zone and posture, then explain the 1-2 components most responsible for the score using their strings. Flag any components reporting and what that means for confidence.
signaldata_available: false脚本会生成(机器可读格式,可用于与其他技能联动)和(单页报告),并打印一行摘要:
crypto_regime.jsoncrypto_regime.mdCRYPTO REGIME: NEUTRAL (score 68.4/100) — Mixed conditions observed; no strong regime conclusion展示结果时,先说明区间和仓位建议,再解释对评分影响最大的1-2个维度的内容。标记任何显示的维度,并说明其对结果可信度的影响。
signaldata_available: falsePhase 3 (optional): Feed Downstream
阶段3(可选):下游联动
The JSON composite can slot into an -style posture summary as
one descriptive crypto-market input. It must not independently authorize,
block, size, or execute a trade.
exposure-coachJSON格式的综合结果可作为描述性加密货币市场输入,纳入风格的仓位摘要中。它不得独立授权、阻止、调整或执行交易。
exposure-coachOutput
输出内容
The script writes two artifacts to and prints a one-line summary for workflow chaining:
--output-dir- — full machine-readable analysis:
crypto_regime.json, per-component results (metadata,score,signal, component-specific fields), and thedata_availableblock (composite,score,zone,guidance).effective_weights - — one-page report: composite score with zone bar, posture line, per-component table (weight / score / signal), and confidence notes.
crypto_regime.md - Console: plus warnings for any skipped components.
CRYPTO REGIME: <ZONE> (score <N>/100) — <posture>
脚本会向写入两个文件,并打印一行摘要用于工作流联动:
--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
资源
- — validation status, evidence boundary, and reproduction requirements.
references/VALIDATION.md - — full scoring rationale, every threshold table, the offline snapshot JSON schema, and the live data-source endpoint list.
references/crypto_regime_methodology.md - — CLI orchestrator (entry point).
scripts/crypto_regime_analyzer.py - — CoinGecko/Binance fetchers, per-day cache, dominance history accumulator, offline loader.
scripts/data_client.py - — one module per component; pure functions, fully unit-tested.
scripts/calculators/ - — weighted composite with proportional weight redistribution.
scripts/scorer.py - — tests covering every component, the scorer, sparse-data fail-closed behavior, and end-to-end bull/bear/degraded snapshots.
scripts/tests/
- —— 验证状态、证据边界和复现要求。
references/VALIDATION.md - —— 完整评分依据、所有阈值表、离线快照JSON schema,以及在线数据源端点列表。
references/crypto_regime_methodology.md - —— CLI协调器(入口文件)。
scripts/crypto_regime_analyzer.py - —— CoinGecko/Binance数据获取器、每日缓存、主导地位历史累加器、离线加载器。
scripts/data_client.py - —— 每个维度对应一个模块;纯函数,已完成单元测试。
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 until 31 daily observations exist (weight is redistributed until then). Seed it faster via
data_available: false.--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.
仅用于教育和流程改进。本技能仅描述市场状况;不提供财务建议、交易信号或买卖指令。所有决策由用户自行负责。