Skip to content

做什么(One-liner)

震中资产 + 初始冲击 → 沿跨资产图 (7 节点 / 10 边) 多步传导 + damping + recovery → 每节点时间序列 + 峰值 + 中文因果解释。两种入口:NVIDIA 预置 / 任意 symbol(yfinance 或静态 fallback)。

怎么用

Canvas 预置场景

  contagion_sim_v1 (scenario='nvidia_earnings_paradox', shock=100, steps=20)
  → peak_impacts {nvda, semi, cloud, energy, finance, treasury, crypto}
  → logic_lineage 中文因果链

Symbol-driven(上游接 price_factor):

  price_factor (AMD) → contagion_sim_v1 (shock=150)
  → 自动 yfinance 算 AMD vs SOXX/XLK/XLE/XLF/TLT/BTC 相关性构图
  → 失败时 static fallback → SECTOR_EDGE_WEIGHTS['semiconductor']

核心公式

见 frontmatter formula。关键 4 步:

  1. 初始 shock: impacts[震中] = shock_magnitude
  2. Propagation: impact>1 节点 → outgoing × weight × damping → pending (带 delay)
  3. Arrivals: 当前步应 fire 的 pending → target = max(cur, cur + amount × 0.5)
  4. Recovery: 所有节点 × (1 − recovery)

假设与适用场景

假设:图拓扑预置 / SECTOR_EDGE_WEIGHTS 限 US + propagation stylized + pinned Python float。

适用:跨资产 stress test、NVIDIA demo、任意 symbol 震中 scenario。

不适用:实盘、intraday、非 US 市场、精确幅度预测。

已知局限

详见 frontmatter limitations。关键 7 点:拓扑硬编码 / yfinance 非确定 / SECTOR 限 US / stylized amount×0.5 / recovery 5% / damping 0.85 / rounding locked。

参考文献

  • Elliott-Golub-Jackson (2014) AER — 金融网络传染
  • Gai-Kapadia (2010) Proc Royal Society A — threshold contagion model
  • Pangura Research Note 2026-03(pending)— NVIDIA 7 节点编排

Golden Test

tests/golden/fixtures/tier4/contagion_sim/captured_snapshot(3 入口),1e-10 tolerance。12 tests

6 Scenarios

  • nvidia_default_shock / nvidia_small_shock / nvidia_large_shock
  • symbol_fallback_nvda / symbol_fallback_amd
  • simulate_contagion_direct

6 Contract tests

  • result_structure_nvidia(7 nodes + 10 edges + 键集合)
  • nvidia_graph_deterministic(两次 build 字节一致)
  • symbol_fallback_labels_data_source(_data_source='static_fallback')
  • determinism(5 次重跑字节一致)
  • recovery_monotonic_decay(隔离节点单调衰减)
  • peak_impacts_match_timeseries(peak = max(timeseries) 契约)

Changelog

  • 1.0.0 (2026-04-21) — 首次 Active(Tier 4 batch 3.1)

Verifiable intelligence for the decisions that demand scrutiny.