财务分析师面临"广告费分摊基不统一、亏损名单随口径换人"——单位经济拆解同时输出三种分摊基并把跨度6.4692大于整件毛利3.3这件事写进结论,错杀产品线的¥24万级损失与按未观测LTV错投的¥20~40万可在决策前拦下,年化综合ROI ¥25~60万
单位经济拆解 — 分摊基一变,亏损名单就换人
Skill-Unit-Economics-Decomposition
¥25~60 万
待企业数据验证 · 缺失:样本、基线、时间窗、币种、计算方法、证据来源
1. 解决的问题
财务分析师面临"广告费分摊基不统一、亏损名单随口径换人"——单位经济拆解同时输出三种分摊基并把跨度6.4692大于整件毛利3.3这件事写进结论,错杀产品线的¥24万级损失与按未观测LTV错投的¥20~40万可在决策前拦下,年化综合ROI ¥25~60万
2. 核心算法逻辑
三段账:干净贡献、退货附加、分摊后贡献
clean_unit = price − cogs − fulfillment_fee − first_mile − service_cost
return_extra = return_rate × (price − cogs × resale_rate + handling
+ first_mile × freight_mult + service_cost × cs_mult)
pre_ad = clean_unit − return_extra
contribution = pre_ad − ad_allocation ← 广告费必须写清是哪一种基暖奶器实测:clean 19.7、退货附加 2.2665、pre_ad 17.4335; 三种基分别摊到 13.0072 / 8.2192 / 12.0000,扣完是 4.4263 / 9.2143 / 5.4335——这张卡同号, 所以可以给结论;低价高量件(不退货贡献 3.3、退货附加 0.3843、扣前 2.9157) 三种基扣完是 +1.1657 / −5.3035 / −1.2533, 不同号,只能给口径清单。它的口径跨度 6.4692 比整件货的全部毛利 3.3 还大—— 口径没定时,选基的人就是在决定谁亏损。
退货:期望值,且可售回的货本要冲回
resale_rate 是退货件中能二次销售的比例。把它从 0.55 记成 0,单件贡献从 17.4335 掉到 17.054(少 0.3795 = 0.06×11.5×0.55);反过来把 0 记成 0.08,只多 0.0552。 同一个参数,误记方向不同,量级差近 7 倍——低退货率品类最容易整段省掉这一段。
履约费是阶梯,不是斜率
| 计费重 | 档位 | 单件费 |
|---|---|---|
| 15.5 oz | Small | 3.50 |
| 16.5 oz | Large | 5.40 |
0.5 美元的包材改良让实重越过 16 oz 分界,单件费跳 1.90——不是按比例涨。 且计费重取实重与体积重的大者:实重 8 oz 的轻便大件,体积重 31.08 oz → 直接落 Large。 费率表缺失或尺寸缺失一律 UNKNOWN_RATE_TABLE / UNKNOWN_DIMENSIONS 拒判, 不许把履约费当 0(那会让所有 SKU 都盈利)。
CAC/LTV:窗口不足就不给比值
observed_days < repurchase_median_days → INSUFFICIENT_WINDOW(ratio 为空)
LTV 用「贡献 × 期望复购单数」,不用收入;两种口径同时输出,差多少一目了然210 天观测 / 135 天复购中位 → 贡献口径 0.2647、收入口径 0.1183(差一倍以上); 60 天观测同样数据 → 不给数。最要命的是反例:低价件贡献口径 1.2472(CAC 已经超过可回收贡献) 时,收入口径只有 0.2909——同一个决策,一个口径说"继续投",另一个说"投不起了"。单件贡献已非正时,复购倍数再高也不改变回本不了,此时直接 CAC_ABOVE_LTV 而不是去算一个负数比值。
⚠️ ③ 的价格、费率表、广告池与复购参数都是测试夹具;真实运行需接平台结算明细与订单级广告归因。
3. 业务应用场景
痛点:暖垫/替换滤芯这类 12.5 美元配件订单量大,年度广告池按订单数摊到它头上是 8.2192/单, 贡献直接变 −5.3035;而广告实际只归因到 9100 美元(1.75/单)。 按订单数口径做决策的团队会砍掉这条线,而它其实是引流与连带购买的主力。
做法:输出 `SENSITIVE_BASIS` 而不是单一数字,同时列出三种基; 把"分摊基"作为口径项登记(属 C-040 治理范围),由经营会一次性定死:考核用直接归因, 预算规划用销售额分摊,两者混用视为口径违规。
量化产出: - 该配件线在两种口径下的结论差 6.47 美元/单,按 5200 单/年 = ¥24 万级 的错杀金额; - 亏损名单从"看谁订单多"变成"看谁的归因贡献为负",复核人时从每月 ~16 小时降到 4 小时; - 因口径不清导致的"砍了又加回来"往返减少(每次往返约 2 周决策延迟)。
4. 输入数据要求
未提取到输入条目;请核对原始 Skill 卡片与代码。
5. 输出结果
未提取到输出条目;请核对原始 Skill 卡片与代码。
6. 业务价值与 ROI
- ROI 预估:
- 错杀/错留一条产品线级别的判断纠偏,单次影响 ¥10~30 万/年(③ 的 6.47 美元/单 × 5200 单);
- 阻止按未观测 LTV 加投,避免 ¥20~40 万 级错投;
- 履约费跳档被看见(15.5→16.5 oz 跳 1.90),包装改良的评估从"省料"变成"是否跨档",
- 年化综合 ROI:¥25~60 万(含错杀纠偏与错投避免,不含系统改造)
- 实施难度:⭐⭐⭐☆☆(公式简单,难在把分摊基定成制度并让所有人用同一个)
7. 代码模板
代码块数量:3
"""单位经济拆解:每单贡献毛利的口径敏感性、阶梯费与拒判。
三个真实失误来源:
1) 广告费分摊基(按销售额 / 按订单数 / 直接归因)会改变「谁在亏钱」的名单;
2) 退货成本是期望值,可二次销售的那部分要冲回货本,不能重复扣;
3) 平台履约费按尺寸档阶梯收取,跨档是跳变不是斜率,且按体积重与实重取大。
缺参数一律拒判,不用 0 填充。
"""
FBA_TABLE = [
{"tier": "Small", "max_weight_oz": 16.0, "fee": 3.50},
{"tier": "Large", "max_weight_oz": 48.0, "fee": 5.40},
{"tier": "Extra", "max_weight_oz": 84.0, "fee": 6.85},
]
DIM_INFLATOR = 139.0 # 体积重(lb) = l*w*h / 139;与实重取大者为计费重
def billable_weight_oz(weight_oz, dims):
"""缺尺寸就返回 None:不知道体积重就不能确定档位。"""
if dims is None or weight_oz is None:
return None
l, w, h = dims
vol_oz = (l * w * h / DIM_INFLATOR) * 16.0
return round(max(weight_oz, vol_oz), 2)
def fba_fee(weight_oz, dims, table):
"""返回 (fee, tier_or_reason, billable)。算不出来时 fee 为 None,调用方必须拒判。"""
if not table:
return None, "UNKNOWN_RATE_TABLE", None
bw = billable_weight_oz(weight_oz, dims)
if bw is None:
return None, "UNKNOWN_DIMENSIONS", None
for row in table:
if bw <= row["max_weight_oz"]:
return row["fee"], row["tier"], bw
return None, "OUT_OF_TABLE", None
def allocate_ads(target_id, ads):
"""三种分摊基;缺数据给 None,不给 0。"""
pool = ads.get("pool")
rows = ads.get("skus") or []
out = {"revenue_share": None, "order_share": None, "direct_attributed": None}
if pool is None or not rows:
return out
tot_rev = sum(r["orders"] * r["price"] for r in rows)
tot_ord = sum(r["orders"] for r in rows)
for r in rows:
if r["id"] != target_id:
continue
if tot_rev:
out["revenue_share"] = round(pool * (r["orders"] * r["price"] / tot_rev)
/ r["orders"], 4)
if tot_ord:
out["order_share"] = round(pool * (r["orders"] / tot_ord) / r["orders"], 4)
if r.get("direct_ad_spend") is not None:
out["direct_attributed"] = round(r["direct_ad_spend"] / r["orders"], 4)
return out
def contribution(sku, ads, table=FBA_TABLE):
"""单件贡献毛利(广告费按三种基分别给)。返回含口径、拒判原因、跨基敏感性。"""
for k in ("price", "cogs", "first_mile", "return_rate", "service_cost"):
if sku.get(k) is None:
return {"status": "UNKNOWN_SPEC", "missing": k, "contribution_per_unit": None}
fee, tier, bw = fba_fee(sku.get("weight_oz"), sku.get("dims"), table)
if fee is None:
return {"status": tier, "contribution_per_unit": None,
"note": "履约费无法定价:不得按 0 计入成本"}
p, c, f, s_cost = sku["price"], sku["cogs"], sku["first_mile"], sku["service_cost"]
r = sku["return_rate"]
resale = sku.get("resale_rate", 0.0)
handling = sku.get("return_handling", 0.0)
freight_mult = sku.get("return_freight_mult", 0.0)
cs_mult = sku.get("return_cs_mult", 0.0)
clean = p - c - fee - f - s_cost # 不退货时的单件贡献
# 退货附加损失 = 退款 + 处理费 + 回程运费 + 额外客服 − 可售回货本
overhead = r * (p - c * resale + handling + f * freight_mult + s_cost * cs_mult)
pre_ad = round(clean - overhead, 4)
allocs = allocate_ads(sku["id"], ads)
vals = {b: round(pre_ad - a, 4) for b, a in allocs.items() if a is not None}
out = {"tier": tier, "billable_weight_oz": bw, "fulfillment_fee": fee,
"contribution_clean_unit": round(clean, 4),
"return_overhead": round(overhead, 4),
"contribution_before_ads": pre_ad,
"ad_allocation": allocs, "contribution_per_unit_by_basis": vals}
if not vals:
return {"status": "UNKNOWN_SPEC", "missing": "ad_allocation",
"note": "没有任何可用分摊基:不得默认广告费为 0",
"contribution_per_unit": None}
if len({v > 0 for v in vals.values()}) > 1:
out["status"] = "SENSITIVE_BASIS"
out["note"] = "不同分摊基下正负号相反:单点结论不成立,须先定口径再谈盈亏"
else:
out["status"] = "OK" if min(vals.values()) > 0 else "NEGATIVE_CONTRIBUTION"
out["worst_basis"], out["best_basis"] = min(vals.values()), max(vals.values())
return out
def ltv_gate(unit_contribution, cohort):
"""CAC/LTV 判定:窗口须覆盖复购观测期,且 LTV 用贡献口径不用收入口径。"""
if cohort is None or cohort.get("observed_days") is None:
return {"status": "INSUFFICIENT_WINDOW", "ratio": None,
"note": "没有复购观测:不得用假设复购率补 LTV"}
if cohort["observed_days"] < cohort.get("repurchase_median_days", 0):
return {"status": "INSUFFICIENT_WINDOW", "ratio": None,
"note": "观测 %sd 短于复购中位 %sd:后续贡献未观测,比值虚好"
% (cohort["observed_days"], cohort["repurchase_median_days"])}
cac, price, n = cohort.get("cac"), cohort.get("price"), cohort.get("expected_orders")
if cac is None or cac <= 0 or not n or unit_contribution is None:
return {"status": "UNKNOWN_SPEC", "ratio": None}
ltv_contrib = round(unit_contribution * n, 4)
ltv_revenue = round(price * n, 4)
if ltv_contrib <= 0:
return {"status": "CAC_ABOVE_LTV", "ratio": None,
"note": "单件贡献已非正:复购再多也不改变回本不了的结论"}
ratio_c = round(cac / ltv_contrib, 4)
ratio_r = round(cac / ltv_revenue, 4)
return {"status": "OK" if ratio_c < 1 else "CAC_ABOVE_LTV",
"ratio_cac_over_ltv_contribution": ratio_c,
"ratio_if_ltv_used_revenue": ratio_r,
"ltv_contribution": ltv_contrib, "ltv_revenue": ltv_revenue}
def run_demo():
ads = {"pool": 60000.0, "skus": [
{"id": "EP-01", "orders": 1800, "price": 39.0, "direct_ad_spend": 21600.0},
{"id": "EP-02", "orders": 5200, "price": 12.5, "direct_ad_spend": 9100.0},
{"id": "EP-03", "orders": 300, "price": 149.0, "direct_ad_spend": 6000.0}]}
warmer = {"id": "EP-01", "price": 39.0, "cogs": 11.5, "first_mile": 3.2,
"weight_oz": 15.5, "dims": (6.0, 4.0, 3.0), "return_rate": 0.06,
"resale_rate": 0.55, "return_handling": 2.4, "return_freight_mult": 0.5,
"return_cs_mult": 1.0, "service_cost": 1.1}
pad = {"id": "EP-02", "price": 12.5, "cogs": 4.2, "first_mile": 1.1,
"weight_oz": 5.0, "dims": (3.0, 2.0, 1.0), "return_rate": 0.03,
"resale_rate": 0.40, "return_handling": 1.2, "return_freight_mult": 0.5,
"return_cs_mult": 0.6, "service_cost": 0.4}
rw = contribution(warmer, ads)
assert rw["status"] == "OK" and rw["tier"] == "Small", rw
# 手算核对:39−11.5−3.5−3.2−1.1=19.7,退货附加 0.06*(39−6.325+2.4+1.6+1.1)=2.2665
assert rw["contribution_clean_unit"] == 19.7 and rw["return_overhead"] == 2.2665
assert rw["contribution_before_ads"] == 17.4335, rw
rp = contribution(pad, ads)
assert rp["status"] == "SENSITIVE_BASIS", rp
by = rp["contribution_per_unit_by_basis"]
# 同一份成本表:直接归因口径赚 1.17,按销售额分摊口径亏 1.25 —— 结论取决于口径
assert by["direct_attributed"] > 0 > by["revenue_share"] > by["order_share"], by
# 阶梯跳变:计费重从 15.5oz 到 16.5oz,售价不动,单件费从 3.50 跳到 5.40
assert fba_fee(15.5, (6.0, 4.0, 3.0), FBA_TABLE)[:2] == (3.50, "Small")
assert fba_fee(16.5, (6.0, 4.0, 3.0), FBA_TABLE)[:2] == (5.40, "Large")
# 轻而大的商品按体积重定档:实重 8oz,体积重 31.08oz → 落 Large
fee, tier, bw = fba_fee(8.0, (9.0, 6.0, 5.0), FBA_TABLE)
assert (tier, bw, fee) == ("Large", 31.08, 5.40), (tier, bw, fee)
# 可二次销售比例只影响退货附加:0.55→0 让单件贡献少 0.06*11.5*0.55
n1 = contribution(dict(warmer, resale_rate=0.0), ads)["contribution_before_ads"]
assert round(rw["contribution_before_ads"] - n1, 4) == round(0.06 * 11.5 * 0.55, 4)
# 缺表 / 缺尺寸 / 缺售价:三种拒判都不给出金额
assert contribution(warmer, ads, table=[])["status"] == "UNKNOWN_RATE_TABLE"
assert contribution(dict(warmer, dims=None), ads)["status"] == "UNKNOWN_DIMENSIONS"
assert contribution(dict(warmer, price=None), ads)["status"] == "UNKNOWN_SPEC"
zero = ltv_gate(-1.25, {"observed_days": 210, "repurchase_median_days": 120,
"expected_orders": 3.0, "price": 12.5, "cac": 8.0})
assert zero["status"] == "CAC_ABOVE_LTV" and zero["ratio"] is None
# 观测窗口刚好等于复购中位间隔:边界上仍给数,短一天就拒判
edge = ltv_gate(2.9157, {"observed_days": 120, "repurchase_median_days": 120,
"expected_orders": 2.2, "price": 12.5, "cac": 8.0})
assert edge["status"] == "CAC_ABOVE_LTV" and edge["ratio_cac_over_ltv_contribution"] == 1.2472
short1 = ltv_gate(2.9157, {"observed_days": 119, "repurchase_median_days": 120,
"expected_orders": 2.2, "price": 12.5, "cac": 8.0})
assert short1["status"] == "INSUFFICIENT_WINDOW"
assert contribution(warmer, ads,
table=[{"tier": "Small", "max_weight_oz": 4.0,
"fee": 2.0}])["status"] == "OUT_OF_TABLE"
# LTV:观测 60 天、复购中位 135 天 → 不给比值,不给"健康"
short = ltv_gate(17.4335, {"observed_days": 60, "repurchase_median_days": 135,
"expected_orders": 2.6, "price": 39.0, "cac": 12.0})
assert short["status"] == "INSUFFICIENT_WINDOW" and short["ratio"] is None
ok = ltv_gate(rw["contribution_before_ads"], {"observed_days": 210,
"repurchase_median_days": 135,
"expected_orders": 2.6,
"price": 39.0, "cac": 12.0})
assert ok["status"] == "OK" and ok["ratio_cac_over_ltv_contribution"] == 0.2647
# 收入口径 0.1183 把贡献口径 0.2647 美化了一半以上
assert ok["ratio_if_ltv_used_revenue"] == 0.1183
bad = ltv_gate(rp["contribution_before_ads"], {"observed_days": 210,
"repurchase_median_days": 120,
"expected_orders": 2.2,
"price": 12.5, "cac": 8.0})
assert bad["status"] == "CAC_ABOVE_LTV", bad
# 关键反差:收入口径 0.2909 看着回本充裕,贡献口径 1.2472 已收不回获客成本
assert bad["ratio_if_ltv_used_revenue"] < 1 < bad["ratio_cac_over_ltv_contribution"]
assert bad["ratio_cac_over_ltv_contribution"] == 1.2472
assert bad["ratio_if_ltv_used_revenue"] == 0.2909
zero = ltv_gate(-1.25, {"observed_days": 210, "repurchase_median_days": 120,
"expected_orders": 3.0, "price": 12.5, "cac": 8.0})
assert zero["status"] == "CAC_ABOVE_LTV" and zero["ratio"] is None
assert all(v is None for v in allocate_ads("EP-01", {"skus": []}).values())
print("[✓] Skill-Unit-Economics-Decomposition 测试通过")
if __name__ == "__main__":
run_demo()8. 论文来源
论文链接用于核验方法来源,不自动证明本页商业结果。
未自动抽取;请查看原始 Skill 卡片。