top of page
ClsoeIT Logo

Credit Risk Stress Testing Framework

We have created a unique solution for recurring stress tests in credit risk Raiffeisen Bank International, which allows us to define our own test scenarios for simulation of portfolio development and calculations of individual Risk Parameters RWA or ECL. Our application was successfully used for EBA stress tests in 2018 and continues to be extensively used for other stress testing needs by internal or required controllers.

What did we solve

A frequent and significant exercise for banks is simulating scenarios of future development projects and their impact on the portfolio, and such stress test scenarios are also often defined by regulators. One example is the stress test required by EBA in 2018.

Similar assignments are often solved by ad hoc solutions using different single-purpose scripts and calculations that are essentially discarded upon completion.

Our attempts to develop an alternative solution have led us to design a tool that enables analysts to focus on what needs to be done without being overwhelmed by the number of details that need to be performed at each step. We have introduced domain-specific language in the form of abstraction, which represents individual portfolios using variables. We can call different functions like RWA (Risk Weighted Assets), ECL (provisions according to IFRS9), or Rating/Stage Migration using transition matrices on these variables, which represent portfolios.

"We were looking for an effective solution for the new EU wide stress test 2018. CloseIT introduced us to a tool which can be used for a variety of internal and external stress test exercises, keeping a high degree of flexibility within the risk management department. From the very first moment of the project, I was surprised by the solution-oriented approach, thanks to which we were able to solve all problems relatively quickly." Christian Steinlechner, Senior Risk Solution Manager at Raiffeisen Bank International and CRM product owner.

Our tool provides a clear way to create even very complicated simulation scenarios that can be easily reproduced or analyzed.

Alternative solution with domain-specific language

To make these tests more effective and automated, we have created a framework made up of several independent modules and a domain specific language that defines individual scenarios.

The first task of a new framework, simply called Credit Risk Management (CRM), was the implementation of the EBA 2018 stress test. All modules had to meet the above criteria and, moreover, required maximal efficiency, because simulations lead to calculations on a much larger number of accounts than in the production of RWA or ECL calculations.

"Most of our future stress tests will be addressed using the CRM tool. The software is fully tailored to our needs, which demands highest flexibility: if needed the user can inject data transformations via a user friendly ETL tool and steer the whole workflow via Orchestration scripts. Above all, the lightweight and scalable application design, enables us to deploy countless application instances, on internal or cloud infrastructure, at the push of a button." Christian Steinlechner, Senior Risk Solution Manager at Raiffeisen Bank International.

IFRS9 Provisions calculation

We created this module for other purposes in the past but made a number of changes to take into account the specifications of the simulations. Specific requirements were solved using runtime switches. We have made additional optimizations to increase the calculation speed so that a full ECL calculation for more than a billion simulated accounts does not take more than a few hours on a regular server.

Risk-Weighted Assets

Risk-Weighted Assets (RWA) is another monitored risk parameter for which we have created a separate module. The module implements a standard RWA (STD and IRB approach) calculation over the data model we established for the entire CRM product. Individual calculation options can be switched using configuration.

Simulation lab

The task of the lab is to simulate portfolio development based on defined forecasting models. The simulation is driven by scenarios and transition matrices for individual parts of the portfolio. Matrices are stored in a user-definable database.

Reporting module

Results are aggregated according to an easily configurable schema, processed, and finally inserted into the MS Excel template provided by EBA.

Central DB

All components use a central database based on MongoDB as single storage. This database is accessible to independent systems and user-defined modules within the CRM.

User-defined modules

In addition to our standard modules, the user is able to create their own transformation procedures and calculations that can be incorporated into simulation scenarios.


To define the scenarios, we have created a simulation language in which the user is able to transparently run individual components and pass on the outputs of previous calculations or other parameters. It is basically a set of functions within the Apache Groovy language, so the user can use all language constructs - variables, cycles, exception handling, etc. With this language, it is possible to define a complete scenario that is then run by the system. Writing scenarios does not require programming experience and can be handled by any user who went through on-boarding, i.e. business analytics.

Visualization of Credit Risk Stress Testing Framework

The result is fantastic

EBA 2018 stress tests are complicated exercises that require several domains of expert cooperation. Our CRM framework has proven to be powerful and flexible enough to be able to implement dynamic requirements without changing its architecture.

The most important outcome for us is that the framework is available for further simulations and stress tests, which means, in the long term, that its development has paid off.

"The result is fantastic. Not to be too far from the truth, for some of our major portfolios, ECL calculation is done faster than I go to the kitchen for my coffee." 

Christian Steinlechner, Senior Risk Solution Manager at Raiffeisen Bank International

Related Posts

See All

MGS integration with antivirus

One of the MGS features is to manage model-related files and documents. Of course, common and other model non-related files can be uploaded also to the public folder, users' private folder, or shared

MGS to Databricks connector

Analytics teams in banks and insurance companies use platforms like Databricks for data science, ML/AI model development, model testing, and more. These same companies also have teams such as Senior R


bottom of page