Altman Z-Score
Install and import#
npm install fintech-algorithmsimport { altmanZScore } from "fintech-algorithms/fundamental-analysis-and-valuation/quality-and-distress/altman-z-score";Signature#
altmanZScore(data)Computes the original 1968 five-factor Altman Z-Score for a public manufacturer, weighting working capital, retained earnings, EBIT and sales against total assets and market equity against total liabilities, and places the result in the distress, grey or safe zone.
Parameters#
| Name | Type | Notes |
|---|---|---|
data | { total_assets: number; total_liabilities: number; working_capital: number; retained_earnings: number; ebit: number; market_value_equity: number; sales: number } | One point-in-time accounting record. The function reads total_assets and total_liabilities as the two denominators, and working_capital, retained_earnings, ebit, market_value_equity and sales as the five numerators. |
Returns#
{ state: string; method: string; ratios: { working_capital_to_assets: number; retained_earnings_to_assets: number; ebit_to_assets: number; market_equity_to_liabilities: number; sales_to_assets: number }; contributions: { working_capital: number; retained_earnings: number; ebit: number; market_equity: number; sales: number }; z_score: number; zone: string; threshold_policy: string }
ratios holds the five raw ratios and contributions the same ratios after the 1.2, 1.4, 3.3, 0.6 and 1.0 coefficients. z_score is their sum. zone is distress-zone below 1.81, safe-zone above 2.99 and grey-zone between; threshold_policy restates those cutoffs, method is altman-1968-public-manufacturer and state is calculated.
Errors#
- When data is not a plain object — throws TypeError
- When any field read is missing or not a finite number — throws TypeError
- When total_assets or total_liabilities is zero or negative — throws RangeError
- When market_value_equity is negative — throws RangeError
Complexity: time O(1),
space O(1).
Worked example#
executed Captured by running this function on the input its own test provides. Real output of real code — but not asserted against a published figure.
Input#
{
"working_capital": 200,
"retained_earnings": 300,
"ebit": 160,
"market_value_equity": 700,
"total_liabilities": 500,
"sales": 1200,
"total_assets": 1000
}Call#
altmanZScore(data)Returns#
object with 7 fields: state, method, ratios, contributions, z_score, zone, threshold_policy
{
"state": "calculated",
"method": "altman-1968-public-manufacturer",
"ratios": {
"working_capital_to_assets": 0.2,
"retained_earnings_to_assets": 0.3,
"ebit_to_assets": 0.16,
"market_equity_to_liabilities": 1.4,
"sales_to_assets": 1.2
},
"contributions": {
"working_capital": 0.24,
"retained_earnings": 0.42,
"ebit": 0.528,
"market_equity": 0.84,
"sales": 1.2
},
"z_score": 3.2279999999999998,
"zone": "safe-zone",
"threshold_policy": "distress<1.81; grey=1.81..2.99; safe>2.99"
}Other exports#
This module also exports
calculate, piotroskiFScore, beneishMScore, sloanAccrualMeasure, ohlsonOScore, zmijewskiXScore, springateSScore, tafflerZScore, fulmerHScore, groverGScore, dechowFScoreForMisstatementRisk, dechowDichevAccrualQuality, modifiedJonesDiscretionaryAccrualModel. Every module additionally exports run as an alias of its
primary function, and a meta object carrying its catalog id, domain, family,
shape and article URL.
Diagrams#
How it works#
This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.
References#
- Financial Ratios, Discriminant Analysis and the Prediction of Corporate Bankruptcy — Edward I. Altman
- Beginners' Guide to Financial Statements — U.S. Securities and Exchange Commission
- Conceptual Framework for Financial Reporting — International Accounting Standards Board
- Evidence boundary