Back to Blog

CRIF generation using CDM

At TradeHeader we started doing research on SIMM (Standard Initial Margin Model) developed by the International Swaps and Derivatives Association, Inc. (ISDA) and how we could automate its processing and calculations. To understand what SIMM is about we have to take a leap in time and place ourselves in the stage after the financial crisis of 2008. Given the level of uncertainty, world leaders agreed that OTC derivatives needed more transparency and better tools to mitigate risk. This led to new regulations appearing in the market forcing all participants to exchange collaterals. 

ISDA created the SIMM methodology to harmonize the calculation of guarantees and help market participants to comply with regulations. Specifically, to comply with the BCBS-IOSCO (Basel Committee on Banking Supervision and the International Organization of Securities Commissions) margin framework for non-cleared derivatives.

ISDA developed the Common Risk Interchange Format (CRIF) and the Common Domain Model (CDM), now part of FINOS, which together create a powerful solution to standardize and automate the exchange of risk data.

The Common Domain Model is a machine-readable and machine-executable data model for derivatives products, processes and calculations, the main objective is to standardize how derivatives are traded and managed through their lifecycle.

The Common Risk Interchange Format is the standard template to hold and report risk data, it enables the exchange of risk data between firms and facilitates the initial margin reconciliations.

The SIMM methodology applies sensitivity-based calculations across four product groups: Interest rates and FX, Credit, Equity and Commodities. Applying the CDM will help to automate the creation of CRIF files and ensure their validity, as well as enable automation of risk data reporting to regulators.

To facilitate the understanding of the project, we are going to consider that in essence, SIMM is a collection of formulas that require certain, well-specified inputs. These inputs have to be given in a concrete format: the CRIF. It allows to display of which risk types a certain trade is subject to:

Product Class Risk Type Qualifier Bucket Label 1 Label 2 Amount Amount Currency Amount USD

According to ISDA specifications:

Product Class

A string identifier describing which product class the trade (or portfolio of trades) belongs to. Allowed values are “RatesFX” (meaning Rates or FX), “Credit”, “Equity”, or “Commodity”.

Risk Type

A string describing the type of risk factor, such as interest-rate risk, qualifying credit risk, etc. Examples include Risk_IRCurve (interest-rate delta), Risk_FX (FX risk), and so on.


String description of the particular risk factor, such as currency (Interest Rate), issuer (qualifying credit), etc.


Numerical bucket number of the qualifier (where applicable). This corresponds to the buckets described in SIMM Methodology for credit, equity and commodity risk factors.

Label 1

Tenor label describing the vertex of the risk factor, such as “3m”, “5y”, etc.

Label 2

Second tenor label, used if the risk factor is a matrix, or to identify sensitivities from qualifying credit securitizations.


Amount of the risk, in units of a given currency. Should be a number.

Amount Currency

Currency of the “Amount” field. Should be a standard three-letter ISO currency code.

Amount USD

Amount of the risk, expressed in USD.

Now imagine this trade: 5Y USD Interest rate swap, we receive fixed on USD 10 million and pay Libor3m also on USD 10 million. This trade is subject to only one type of risk, namely Risk_IRCurve. In this case, the risk amount has been determined to be -4,881 USD per 1bp increase in the 5y par swap rate.

For Risk_IRCurve this is how ISDA has defined the elements of the CRIF:

Risk Type Qualifier Bucket Label 1 Label 2 Amount
Risk_IRCurve Currency of curve in standard ISO Code Integer which can be: 1 (Regular), 2 (Low volatility) or 3 (High volatility) Tenor: “2w”, “1m”, “3m”, “6m”, “1y”, “2y”, “3y”, “5y”, “10y”, “15y”, “20y” or “30y” Sub Curve name  

Below is portrayed how a sample CRIF entry would look for the trade introduced:

Product Class Risk Type Qualifier Bucket Label 1 Label 2 Amount Amount Currency Amount USD
RatesFX Risk_IRCurve USD 1 5y Libor3m -4.881 USD -4.881

Going back to our project, it is divided into two parts. The objective of the first part is to provide a tool that, given any non-cleared derivative trade in FpML (Financial products Markup Language) format, ingests it in CDM, and extracts all the information of the trade needed to fill the CRIF. FpML is the industry standard for OTC derivatives messaging and it is widely used in the industry by firms internally and externally to confirm and report derivatives transactions.

The second part of the project aims to create a CRIF table in CDM and define functions to compute SIMM calculations. In addition, one important goal is to identify any issues or limitations that CDM may have in order to tackle them in upcoming phases.

We are developing our implementation using the Rosetta platform, created by REGnosys. Rosetta allows us to visualize the whole process in real-time, from FpML ingestion to CRIF generation. We can immediately see the impact on CRIF when we change the implementation of a function.

The first step to build a CRIF file is to classify the transaction to extract the relevant information needed. The information needed varies by product. We are able to do this product classification by using the CDM qualifying functions. These are a set of standard functions that classify a trade by asset class and product type according to industry conventions and market practice.

One important issue we found is that the CDM qualifying functions, for some products, currently don’t qualify the product at the right level for CRIF purposes. This may be solved by redesigning the functions to make them more composable. We plan to work on this in the upcoming months.

We are currently working on the second part of the project, without losing focus on the first one, since we want to enrich our tool to the maximum. The necessary code lines in order to create the CRIF table have been written. We are already working on the functions to fill the content of the table, starting with the attributes: Product Class, Risk Type and Bucket.


This project is allowing us to learn in greater depth financial derivative products by analyzing each of the elements that define them up and at the same time from a technical point of view it gives us the possibility to enrich our knowledge about the implementation of models in a functional language.

From the TradeHeader side we want to continue with the challenge and overcome each of the limitations to obtain a standard tool that allows the calculation of the initial margin in an automated way. We hope to have updates on the project soon!

To be informed of more content like this, subscribe to our blog!