做什么(One-liner)
Porter 5+1 Forces 启发式实现:从 yfinance 财报 proxy signals 派生 6 力量化分 + 3 competitive advantages,产出 0-100 C 分。BLCV 综合评分 C 维输入。
怎么用
Canvas 拖 blcv_compete_v1,填 symbol(必填)+ 可选 peers list。无 peers 时 peer_comparison 为 null;有 peers 时(<=5)逐个 yfinance fetch 做 gross_margin 对比。
核心公式
Porter 5+1 forces (0-1 scale):
rivalry← margin_stability heuristicthreat_new_entrants← market_cap bucket + growththreat_substitutes← revenue growth decelerationbuyer_power← COGS/Revenue 趋势 slopesupplier_power← COGS/Revenue 水平complementary_power← (high margin + high growth) heuristic
Competitive advantages (3 fixed):
market_position: mega_cap_leader / large_cap / mid_cap / small_cap / unknownconsumer_loyalty: (margin_stab + revenue_stab) / 2switching_cost: high / medium / low (based on stability + loyalty)
Scoring:
porter_score = max(0, 1 - avg_5_threats) + complementary × 0.1
advantage_score = loyalty × 0.4 + switching_weight × 0.3 + market_pos_weight × 0.3
c_score = (porter_score + advantage_score) / 2 × 100假设与适用场景
假设:proxy signals (margin → rivalry, COGS → buyer/supplier power) 合理;market_cap USD 阈值;5 年稳态 margin data。
适用:美股 mega-cap / large-cap,成熟行业,长期持有候选的竞争格局评估。
不适用:严格 Porter 分析、非美、快速迭代行业、真正的 multi-peer comparative。
输入 / 输出契约
{symbol: str, peers: list[str] | None} → {symbol, name, porter_forces{6 keys}, porter_evidence[], competitive_advantages[3], c_score, peer_comparison | null, logic_lineage}。
6 Porter 力 + 3 advantages 固定 schema,golden 锁定。
已知局限
- Proxy-based heuristic 非 canonical Porter(rivalry ← margin_stability 等 mapping 未学术 validated)
- threat_new_entrants / threat_substitutes 的 proxy 较弱(主要靠 market_cap + growth deceleration)
- Market position 阈值 500B/100B/10B USD hardcoded
- Switching cost 3-way discrete(缺 gradient)
- 50/50 porter vs advantage 权重未做 sensitivity
- peer_comparison 启用时无 cache —— 注意 yfinance quota
- 不对比 industry baseline(跨行业 c_score 的 mechanically 可比但 semantically dubious)
参考文献
Porter (1979, 2008) HBR Five Forces 原始 + Brandenburger-Nalebuff (1996) Co-opetition(第 6 力)+ Greenwald-Kahn (2005) Competition Demystified。详见 frontmatter。
Golden Test
tests/golden/fixtures/tier2/blcv_compete/,yfinance-snapshot integration regression (peers=None 路径),1e-6 tolerance。7 tests:
matches_snapshot— 全 output 深比对c_score_in_0_100_range— 范围 contractdeterminism— 5 reruns byte-identicalporter_forces_has_six— 6 forces 固定 keysadvantages_has_three_fixed— 3 advantages 固定 dimspeers_none_skips_peer_comparison— peers=None → peer_comparison nullporter_forces_in_0_1_range— 全 6 力 ∈ [0, 1] numeric contract
Peer-enabled 路径未测试(future work:多 symbol snapshot 基础设施)。
Changelog
- 1.0.0 (2026-04-20) — 首次 Active(Tier 2 batch 3, yfinance snapshot regression)

