How to do it...

In this example, we will perform an analysis similar to Altman's Z-score. In his paper, Altman looked at a company's likelihood of defaulting within two years based on several financial metrics. The following is taken from the Wikipedia page of Altman's Z-score:

Z-score formula

Description

T1 = Working capital / Total assets

This measures liquid assets in relation to the size of the company.

T2 = Retained earnings / Total assets

This measures profitability that reflects the company's age and earning power.

T3 = Earnings before interest and taxes / Total assets

This measures operating efficiency apart from tax and leveraging factors. It recognizes operating earnings as being important to long-term viability. ...

Get scikit-learn Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.