Machine Learning-Based Credit Rating Early Warning

Overview Challenge and Offer

As an important type of risk, credit risks are quantified using sophisticated rating procedures. Due to the time-consuming preparation and lack of up-to-date balance sheet data, ratings are only delayed. Banks have therefore already introduced market data-based early-warning systems for current credit risk signals, but these can not provide any indications in the event of missing market data.
On the other hand, corporate news and press articles often provide important information about problems and imbalances .
RiskDataScience has developed algorithms for the automatic detection and classification of news texts with regard to bankruptcy relevance (News-Based Early Warning).
This allows banks to extract valuable additional information about imminent insolvencies from news sources. An early recognition of credit risks is thus also possible for non-listed companies without direct market data.

Credit Risk Measurement


Credit risk is the risk of credit events such as default, late payment, credit downgrade or currency freeze.
Another distinction relates to the classification into issuer (for bonds), counterparty (for derivative transactions) and the – in the following considered – credit default risk of borrowers.
Credit risks are often the biggest bank risk and, in addition to market and operational risks, must be backed by equity under Basel II / III.

A frequently used indicator for quantifying credit risks is the expected loss of a loan. This results in the simplest case as a product

  • PD: Probability of Default
  • LGD: Loss Given Default
  • EaD: Exposure at Default

External and internal credit ratings mainly measure the PD (and LGD, for example) and are determined using complex procedures.

Determination and Early Detection

The methods for determining PD require well-founded statistical analyzes based on

  • quantitative balance sheet ratios such as debt ratio, equity ratio and EBIT
  • qualitative analyst key figures such as quality of management, future prospects and market position
  • general market data such as interest rates, inflation and exchange rates.

The rating models must be regularly validated against actual credit events and adjusted if necessary.
Credit ratings are therefore usually delayed – often only annually.
To address this issue, market-data-based early-warning systems have been introduced that provide signals based on significant changes in stock prices, credit spreads or other market-related correlated data. In general, however, only systematic or risks of listed companies can be identified.

Information from News Texts


The reasons for bankruptcies are often company-specific (idiosyncratic) and can not be derived from general market developments. examples for this are

  • Fraud cases by management
  • Bankruptcy of an important customer or supplier
  • Appearance of a new competitor

Negative events such as plant closures, short-time work, investigations and indictments are sometimes several months ahead of the actual bankruptcy.

In the case of non-listed companies, however, no market-data-based early warning is possible. On the other hand, news also provides up-to-date and often insolvency-relevant information in these cases.
News articles, blogs, social media and in particular local newspapers inform online and offline about problems of companies.
The efficient use of online texts makes it possible to extend the early warning to non-listed companies.

Efficient News Analysis

Methods for the efficient analysis of texts are a prerequisite for identifying the relevant news and, based on this, anticipating possible bankruptcies. For this are necessary

  • a timely identification of hundreds of data sources (newspapers, RSS feeds, etc.) taking into account the legal aspects
  • an automatic reading of the relevant messages about all customers based on given mandatory and exclusion criteria
  • a timely classification of the relevant texts on the basis of possible insolvency risks
  • an immediate analysis and visualization of the risk identification results

Already implemented machine learning algorithms serve as a basis for this seemingly impossible task.

Knowledge use through machine learning procedures

Automated Reading

As a first step, all relevant news sources (e.g., newspaper articles from specialized providers) must be identified on the basis of a sufficiently large sample of companies to be examined and irrelevant sources must be excluded wherever possible.

The messages are to be filtered according to relevance. In order to avoid confusion due to the name or erroneous parts of the text (for example regarding equities), word filters and possibly complex text analyzes are necessary.


For the classification of the extracted message texts different text mining methods from the field of data science / machine learning are considered. Supervised learning is done as follows

  • first, the words that are irrelevant for the classification are determined manually (“stop words”)
  • the algorithms are then “trained” with known data records to associate texts with categories
  • new texts can then be assigned to known categories with specific confidences

Methodically, the following steps are to be carried out

  • from the filtered texts, significant word stems / word stem combinations (“n-grams“) are determined
  • the texts are mapped as points in a high-dimensional space (with the n-grams as dimensions)
  • machine learning procedures identify laws for separating points into categories. For this purpose, dedicated algorithms such as naive Bayes, W-Logistic or Support Vector Machine are available

The analyzes require programs based on appropriate analysis tools, e.g. R or Python

Sample Case

For about 50 insolvent companies and 50 non-insolvent reference companies, (German) message snippets were collected for a multi-month time horizon (3M-3W) before the respective bankruptcy.
The illustrated tag clouds provide an exemplary overview of the content of the texts.
With a RapidMiner prototype, the message texts were classified for possible bankruptcies and the results were examined with in and out-of-sample tests.

Tagcloud news for companies gone bankrupt
Tagcloud news for companies not gone bankrupt

Already on the basis of the tagclouds a clear difference between the news about insolvent and not bankrupt companies can be seen.

The RapidMiner solution was trained with a training sample (70% of the texts) and applied to a test sample (30% of the texts).
Both for the training sample (in-sample) and for the test sample resulted in accuracy rates (accuracy) of about 80%. The Area Under the Curve (AUC) was also 90% in the in-sample case.
Based on the RapidMiner licenses and the actual insolvencies, a PD calibration could also be performed.

Even with the relatively small training sample, a significant early detection of insolvencies could be achieved. Further improvements are to be expected with an extension of the training data.

Cost-Effective Implementation

Starting Position

Since there has not yet been a single market for Internet news deliveries, prices are often inconsistent. Different requirements for the cleaning routines and different technical approaches lead to large price ranges.
On the other hand, high-quality analysis tools such as R or RapidMiner (Version 5.3) are currently available. even available for free.
In addition, about half of all online newspapers offer their headlines in the form of standardized RSS feeds.

Cost Drivers

The implementation and ongoing costs of message-based early warning systems may be limited in part to the following reasons, in particular: increase significantly:

  • An evaluation of news texts requires royalties to collecting societies (e.g. VG Wort in Germany) or a direct purchase
  • A automatied reading is technically complicated
  • Maintaining advanced NLP (Natural Language Processing) algorithms to identify relevant text is costly

It is therefore necessary to examine to what extent the points mentioned are actually necessary, at least for a basic implementation.

Cost-Efficient Basic Solution

The already developed cost-efficient RiskDataScience basis solution is based on the following assumptions.

  • information contained in headings and short snippets is sufficient for bankruptcy warnings
  • there are enough free RSS feeds that provide a sufficiently good overview of the situation (medium-sized) companies
  • the relevance of the news snippets can be determined by simple text searches

Hundreds of news sources can be searched and bankruptcy signals can be identified to potentially thousands of companies within minutes.

Copyright Issues

When implementing message-based early-warning systems, it is imperative to comply with the legal requirements that arise, in particular, from copyright law (e.g. UrhG in Germany).

This places narrow limits on the duplication and processing of news texts.
In particular, in the case of databases and further publications problems may occur in some jurisdictions.

On the other hand, there are many exceptions, especially with regard to temporary acts of reproduction, newspaper articles and radio commentary.

Although the processing of message snippets should be generally safe, due to the high complexity of the relevant laws legal advice is recommended.

Offer levels for using machine learning techniques for credit risk detection

RiskDataScience enables banks to use and develop the described procedures efficiently and institution-specifically. According to the respective requirements, the following three expansion stages are proposed.

Stage 1: Methodology

  • briefing in text classification methodology
  • transfer and installation of the existing solution for tag cloud generation
  • handover and installation of the existing solution – or, depending on customer requirements, support of the on-site implementation
  • transfer and documentation of the visualization and evaluation techniques
    Bank is able to independently use and develop methodology

Stage 2: Customizing

  • stage 1 and additionally
  • adjustment and possibly creation of reference groups according to portfolios of the respective bank
  • performing analyzes and method optimization based on the portfolios and customer history of the bank
  • adaptation of RSS sources
  • development of a process description for an efficient use
  • communication and documentation of results to all stakeholders
    Customer has customized procedures and processes for analyzing message texts

Stage 3: IT Solution

  • stage 1, stage 2 and additionally
  • specification of all requirements for an automated, possibly web-based IT solutions
  • suggestion and contacting potential providers
  • support in provider and tool selection
  • assistance in planning the implementation
  • professional and coordinative support of the implementation project
  • technical support after implementation of the IT solution
    Bank has an automated IT solution for message-based early detection of insolvency signals.

Depending on customer requirements, a flexible design is possible. We are happy to explain our approach as part of a preliminary workshop.


Dr. Dimitrios Geromichalos
Founder / CEO
RiskDataScience UG (haftungsbeschränkt)
Theresienhöhe 28, 80339 München
Phone: +4989244407277, Fax: +4989244407001
Twitter: @riskdatascience