algo-risk-altman-z

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Altman Z-Score

Altman Z-Score

Overview

概述

Altman Z-Score is a linear discriminant model predicting bankruptcy probability from five financial ratios. Z = 1.2X₁ + 1.4X₂ + 3.3X₃ + 0.6X₄ + 1.0X₅. Zones: Z > 2.99 (safe), 1.81-2.99 (grey), Z < 1.81 (distress). Originally for public manufacturing firms; variants exist for private and non-manufacturing.
Altman Z-Score是一种线性判别模型,通过五个财务比率预测企业破产概率。公式为:Z = 1.2X₁ + 1.4X₂ + 3.3X₃ + 0.6X₄ + 1.0X₅。区间划分:Z > 2.99(安全区间)、1.81-2.99(灰色区间)、Z < 1.81(困境区间)。该模型最初针对上市制造企业设计;针对非上市企业和非制造企业有相应的变体模型。

When to Use

使用场景

Trigger conditions:
  • Screening companies for bankruptcy risk
  • Quick credit assessment using publicly available financials
  • Monitoring portfolio companies for financial distress signals
When NOT to use:
  • For financial institutions (banks, insurers) — different capital structures
  • When detailed credit scoring is needed (use logistic regression credit models)
触发条件:
  • 筛选存在破产风险的企业
  • 利用公开财务数据快速评估信用状况
  • 监测投资组合企业的财务困境信号
不适用场景:
  • 金融机构(银行、保险公司)——资本结构差异较大
  • 需要详细信用评分的场景(请使用逻辑回归信用模型)

Algorithm

算法流程

IRON LAW: Z-Score Was Calibrated for PUBLIC MANUFACTURING Firms
Applying the original formula to private firms, service companies, or
emerging markets WITHOUT using the appropriate variant produces
misleading results. Use Z'-Score for private firms, Z''-Score for
non-manufacturing and emerging markets.
核心原则:原始Z-Score模型仅适用于上市制造企业
若未使用对应变体模型,直接将原始公式应用于非上市企业、服务类企业或新兴市场企业,会产生误导性结果。非上市企业请使用Z'-Score,非制造企业及新兴市场企业请使用Z''-Score。

Phase 1: Input Validation

阶段1:输入验证

Extract from financial statements: working capital, retained earnings, EBIT, market cap (or book equity for private), total assets, total liabilities, sales. Gate: All five inputs available, from same reporting period.
从财务报表中提取:营运资金、留存收益、息税前利润(EBIT)、市值(非上市企业使用账面净资产)、总资产、总负债、销售额。 准入要求: 五个输入数据齐全,且来自同一报告期。

Phase 1.5: Variant Selection (MANDATORY)

阶段1.5:选择模型变体(必填)

Before touching any formula, pick the right variant — this is the single most common mistake when applying Altman Z.
Firm descriptionVariantScript flag
Public manufacturing firmOriginal Z
--variant original
Private manufacturing firm (no market cap)Z'
--variant private
Non-manufacturing — SaaS, services, retail, tech, finance-lightZ''
--variant non_manufacturing
Emerging-market firm of any kindZ''
--variant non_manufacturing
If the user description contains any of these tags: "SaaS", "cloud", "software", "services", "retail", "e-commerce", "platform", "tech", "emerging market", "BRICS", "non-manufacturing" → use Z''. Do not default to the original Z just because that's the "classic" formula.
Full formulas and zone thresholds for each variant live in
references/z-score-variants.md
. Coefficients, X₄ definition (market cap vs book equity), and the X₅ treatment all differ between variants — they are not small tweaks to the original.
在使用任何公式前,务必选择正确的模型变体——这是应用Altman Z-Score时最常见的错误。
企业类型模型变体脚本参数
上市制造企业原始Z模型
--variant original
非上市制造企业(无市值数据)Z'模型
--variant private
非制造企业——SaaS、服务、零售、科技、轻金融Z''模型
--variant non_manufacturing
任何类型的新兴市场企业Z''模型
--variant non_manufacturing
若用户描述包含以下关键词:"SaaS"、"云"、"软件"、"服务"、"零售"、"电商"、"平台"、"科技"、"新兴市场"、"BRICS"、"非制造" → 使用Z''模型。不要因为原始模型是“经典”版本就默认使用它。
各变体模型的完整公式和区间阈值请查阅
references/z-score-variants.md
。不同变体的系数、X₄的定义(市值vs账面净资产)以及X₅的处理方式均存在差异——并非对原始模型的微小调整。

Phase 2: Core Algorithm

阶段2:核心算法

  1. X₁ = Working Capital / Total Assets (liquidity)
  2. X₂ = Retained Earnings / Total Assets (cumulative profitability)
  3. X₃ = EBIT / Total Assets (operating efficiency)
  4. X₄ = Market Value of Equity / Total Liabilities (leverage)
  5. X₅ = Sales / Total Assets (asset turnover)
  6. Z = 1.2X₁ + 1.4X₂ + 3.3X₃ + 0.6X₄ + 1.0X₅
  1. X₁ = 营运资金 / 总资产(流动性指标)
  2. X₂ = 留存收益 / 总资产(累计盈利能力指标)
  3. X₃ = EBIT / 总资产(运营效率指标)
  4. X₄ = 股权市值 / 总负债(杠杆率指标)
  5. X₅ = 销售额 / 总资产(资产周转率指标)
  6. Z = 1.2X₁ + 1.4X₂ + 3.3X₃ + 0.6X₄ + 1.0X₅

Phase 3: Verification

阶段3:结果验证

Check: all ratios in plausible ranges. Compare Z-score against industry peers and historical trend. Gate: Z-score computed, zone classification assigned.
检查:所有比率处于合理范围。将Z值与行业同行及历史趋势进行对比。 准入要求: Z值计算完成,已完成区间分类。

Phase 4: Output

阶段4:输出结果

Return Z-score with component breakdown and zone classification.
返回Z值及其构成明细,以及区间分类结果。

Output Format

输出格式

json
{
  "z_score": 2.45,
  "zone": "grey",
  "components": {"X1": 0.12, "X2": 0.25, "X3": 0.08, "X4": 1.5, "X5": 0.9},
  "metadata": {"model": "original", "company": "...", "period": "2024-Q4"}
}
json
{
  "z_score": 2.45,
  "zone": "grey",
  "components": {"X1": 0.12, "X2": 0.25, "X3": 0.08, "X4": 1.5, "X5": 0.9},
  "metadata": {"model": "original", "company": "...", "period": "2024-Q4"}
}

Examples

示例

Sample I/O

输入输出示例

Input: WC=200M, RE=500M, EBIT=150M, MktCap=2B, TL=1B, TA=3B, Sales=2.5B Expected: X1=0.067, X2=0.167, X3=0.05, X4=2.0, X5=0.833. Z=1.2(0.067)+1.4(0.167)+3.3(0.05)+0.6(2.0)+1.0(0.833)=2.53 → Grey zone.
输入:营运资金=2亿,留存收益=5亿,EBIT=1.5亿,市值=20亿,总负债=10亿,总资产=30亿,销售额=25亿 预期结果:X₁=0.067,X₂=0.167,X₃=0.05,X₄=2.0,X₅=0.833。Z=1.2(0.067)+1.4(0.167)+3.3(0.05)+0.6(2.0)+1.0(0.833)=2.53 → 灰色区间。

Edge Cases

边缘案例

InputExpectedWhy
Negative retained earningsLow X₂, likely distressAccumulated losses are a strong distress signal
Startup with no revenueX₅ near zeroZ-score not designed for pre-revenue companies
Asset-light tech firmMisleading X₅High revenue/low assets inflates turnover
输入情况预期结果原因
留存收益为负X₂值低,大概率处于困境区间累计亏损是强烈的困境信号
无收入的初创企业X₅值接近0Z值模型不适用于未实现盈利的企业
轻资产科技企业X₅值存在误导性高收入/低资产会夸大资产周转率

Gotchas

注意事项

  • Model age: Calibrated in 1968 on 1946-1965 data. Business models, accounting standards, and capital structures have changed. Use as one signal, not sole determinant.
  • Accounting manipulation: Z-score uses reported financials. Creative accounting (off-balance-sheet debt, revenue recognition games) can mask distress.
  • Industry differences: Capital-intensive industries naturally have lower asset turnover (X₅). Compare within industry, not across.
  • Trend matters more than level: A company moving from Z=3.5 to Z=2.1 over two years is concerning even though 2.1 is still in the grey zone.
  • Private firm variant (Z'): replaces X₄ with Book Equity / Total Liabilities and re-weights:
    Z' = 0.717X₁ + 0.847X₂ + 3.107X₃ + 0.420X₄ + 0.998X₅
    . Zone thresholds shift to 2.9 / 1.23.
  • Non-manufacturing variant (Z''): drops X₅ entirely and re-estimates the rest:
    Z'' = 6.56X₁ + 3.26X₂ + 6.72X₃ + 1.05X₄
    . Zone thresholds shift to 2.6 / 1.1. Using original Z on a SaaS / services firm inflates the score via X₅ and can mis-zone a distressed firm as safe.
  • 模型时效性:模型于1968年基于1946-1965年的数据校准。商业模式、会计准则和资本结构均已发生变化。请将其作为参考信号之一,而非唯一决策依据。
  • 会计操纵风险:Z值基于公开财务报表数据。创造性会计操作(表外债务、收入确认游戏)可能掩盖财务困境。
  • 行业差异:资本密集型行业的资产周转率(X₅)自然较低。应在行业内进行对比,而非跨行业对比。
  • 趋势比绝对值更重要:某企业在两年内从Z=3.5降至Z=2.1,即便2.1仍处于灰色区间,也值得警惕。
  • 非上市企业变体(Z'模型):将X₄替换为“账面净资产/总负债”并调整权重:
    Z' = 0.717X₁ + 0.847X₂ + 3.107X₃ + 0.420X₄ + 0.998X₅
    。区间阈值调整为2.9/1.23。
  • 非制造企业变体(Z''模型)完全剔除X₅并重新估算其余指标:
    Z'' = 6.56X₁ + 3.26X₂ + 6.72X₃ + 1.05X₄
    。区间阈值调整为2.6/1.1。若将原始Z模型应用于SaaS/服务类企业,X₅会夸大得分,可能将困境企业误判为安全。

Scripts

脚本工具

ScriptDescriptionUsage
scripts/altman_z.py
Compute Altman Z-Score and classify zone
python scripts/altman_z.py --help
Run
python scripts/altman_z.py --verify
to execute built-in sanity tests.
脚本描述使用方式
scripts/altman_z.py
计算Altman Z-Score并进行区间分类
python scripts/altman_z.py --help
运行
python scripts/altman_z.py --verify
可执行内置的 sanity 测试。

References

参考资料

  • references/z-score-variants.md
    — Z / Z' / Z'' full formulas, zone thresholds, variant-selection rules, and a worked tech-firm example.
  • references/z-score-variants.md
    — Z/Z'/Z''模型的完整公式、区间阈值、变体选择规则,以及科技企业的计算示例。