做什么(One-liner)
从 w 历史序列计算速度 / 加速度 / 趋势持续 / xyz 背离,综合打分 → 4 级风险(low/medium/high/critical)+ 断裂预估步数 + 中文警告文案。Canvas 直渲染 warning_message。
怎么用
reflexivity_4d_ode (w轨迹) → reflexivity_detector_v1 → bear_agent / risk_management
→ risk_level="high"
→ warning_message="w 加速发散..."
→ estimated_steps_to_fracture=5核心公式
见 frontmatter formula。核心要点:
- 二阶差分: velocity = diff(w)/dt, acceleration = diff(velocity)/dt
- 趋势持续: 从末端往回数 velocity 同号步数
- 评分: 速度 / 加速度 / 持续 / |w| 四项累加
- 断裂判定: score≥8 OR |w|>5 → critical + fracture_detected
- 早期预警: medium/high AND 未断裂 → early_warning
假设与适用场景
假设:w 序列由 reflexivity_4d_ode / run_multi_step 生成 + 阈值为 Pangura 内部校准常量。
适用:宏观体制转折期 w 塌缩预警 + Canvas 跨资产 fragility 信号源。
不适用:intraday trading、hedging 头寸决定、非 reflexivity 序列。
已知局限
详见 frontmatter limitations。关键 6 点:阈值硬编码 / 中文 warning 硬编码 / xyz_divergence 只看末端 / dt 单一 / est_steps 粗估 / 短数据兜底 low。
参考文献
- Soros (1987) Alchemy of Finance — 反身性哲学
- Pangura Research Note 2026-03(pending)— 阈值校准来源
Golden Test
tests/golden/fixtures/tier4/reflexivity_detector/,numpy_manual(独立 numpy 重写的 rule scoring),1e-12 tolerance。10 tests:
6 Scenarios
- low_risk_flat / medium_risk_rising / high_risk_accelerating / critical_past_threshold
- with_xyz_background(测 xyz_divergence)
- too_short(n<3 兜底)
4 Contract tests
- result_structure(top-level + signal 键集合)
- mutually_exclusive_flags(fracture_detected XOR early_warning)
- determinism(5 次重跑字节一致)
- from_trajectory_equivalence(管道 API 与直调等价)
Changelog
- 1.0.0 (2026-04-21) — 首次 Active(Tier 4 batch 2.1)

