Algo Risk Altman Z logo

Algo Risk Altman Z

Organization
asgard-ai-platform
algo-risk-altman-z

Calculate Altman Z-Score to predict corporate bankruptcy probability from financial ratios. Use this skill when the user needs to assess a company's financial distress risk, screen for bankruptcy-prone firms, or evaluate credit worthiness — even if they say 'bankruptcy prediction', 'financial distress score', or 'Z-score analysis'.

Overview

Publisherasgard-ai-platform
Repositoryskills
Skill namealgo-risk-altman-z
Stars
236
Forks
29
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by asgard-ai-platform on GitHub. Read the source before you install it.

Installation

Install the Algo Risk Altman Z AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/asgard-ai-platform/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/algo-risk-altman-z .claude/skills/algo-risk-altman-z
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Algo Risk Altman Z in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Algo Risk Altman Z on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Algo Risk Altman Z is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

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.

Phase 1: Input Validation

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.

Phase 1.5: Variant Selection (MANDATORY)

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.

Phase 2: Core Algorithm

  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₅

Phase 3: Verification

Check: all ratios in plausible ranges. Compare Z-score against industry peers and historical trend. Gate: Z-score computed, zone classification assigned.

Phase 4: Output

Return Z-score with component breakdown and zone classification.

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"}
}

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.

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

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.

Scripts

ScriptDescriptionUsage
scripts/altman_z.pyCompute Altman Z-Score and classify zonepython scripts/altman_z.py --help

Run python scripts/altman_z.py --verify to execute built-in sanity tests.

References

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Algo Risk Altman Z AI skill do?

Calculate Altman Z-Score to predict corporate bankruptcy probability from financial ratios. Use this skill when the user needs to assess a company's financial distress risk, screen for bankruptcy-prone firms, or evaluate credit worthiness — even if they say 'bankruptcy prediction', 'financial distress score', or 'Z-score analysis'.

Why use Algo Risk Altman Z on TypingMind?

Because you install it once and use it with any model. Algo Risk Altman Z is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Algo Risk Altman Z in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/asgard-ai-platform/skills/tree/main/algo-risk-altman-z. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Algo Risk Altman Z?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Algo Risk Altman Z?

As many as you like. As long as a model supports skills, you can use Algo Risk Altman Z with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Algo Risk Altman Z AI skill free?

Yes. It is published on GitHub by asgard-ai-platform under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇