The Altman Z-Score is an indicator used to determine a company’s likelihood of declaring **bankruptcy**. A total of five ratios are necessary for the calculation. Lucky for us, they are all readily available for public companies.

## The Formula

Let:

A = Working Capital / Total Assets

B = Retained Earnings / Total Assets

C = Earnings Before Interest / Total Assets

D = Market Value of Equity / Total Liabilities

E = Sales / Total Assets

Then the Altman Z Score can be calculated by:

**Z = 1.2A + 1.4B + 3.3C + 0.6D + 1.0E**

**The relative probability of default is determined by the Z value.** Specifically,

Z ≥ 3 → Safe

1.81 ≤ Z < 3 → Warning

Z < 1.81 → Danger

Note that these cutoffs are from the original Altman Z Score. Different intervals have been derived for emerging markets. More information is available on Wikipedia.

## Algorithm

This algorithm is heavily based on code from Aaron Gilman. It has been updated to work with new versions of QuantConnect.

It works through *universe selection*. Universe selection allows us to filter equities based on predefined search criteria. In this case, it selects equities that have **1)** all the necessary data available for calculating the ratios and **2)** a Z Score greater than 1.81. Next, the results are **sorted by EBITDA** and capital is **equally divided** among the top 100 equities. The portfolio is re-balanced on the first trading day each month.

## Historic Accuracy

In Altman’s initial publication, the Altman Z Score was 72% accurate in predicting bankruptcy within two years. False negatives, however, were extremely low at just 6%. This initial accuracy has not only been proven, but actually found to be a conservative estimate. Over the years, Altman’s model was found to be **80-90% accurate** — but with a higher **false negative rate of around 15%**.

Today, Altman’s Z Score is widely accepted. Originally designed for manufacturing companies with over $1 million in assets, it’s now used in a variety of countries and industries, though sometimes with slight modifications.

## Caveats

As with most balance sheet models, the Alman Z Score should **not be applied to financial companies**. The balance sheets of Wallstreet companies are notoriously opaque and off-balance sheet items are numerous — making accurate calculations nearly impossible.