The ISDA CDM: much more than just a standard for the derivatives lifecycle
How Daml helps ISDA’s CDM deliver an unparalleled level of precision
The financial world relies on computing standards to meet the almost insatiable demands of today’s global, always-on world for financial products. Without standards, processing the lifecycle of trades would be a very manual, error-prone, and slow process indeed.
The trading and managing of derivatives is one area of finance that has not enjoyed the full benefits of standardization. Responding to regulatory changes, high costs associated with current manual processes, and a demand for greater automation across the industry, ISDA developed the Common Domain Model (CDM)—the first industry solution to tackle this lack of standard conventions. The ISDA CDM for the first time creates a common blueprint for how derivatives trade events and processes are represented—paving the way for greater automation and efficiency at scale.
The problem at hand is that standards must be implemented by all market participants—and if those implementations vary even slightly, the very benefits intended by the standard may not be fully realized. The CDM tackles this problem by introducing data rules that valid CDM instances need to fulfill and some calculation artifacts for, e.g., calculating a day count fraction. This is definitely a step in the right direction as it reduces ambiguities that might occur.
The cost and implementation risk of this new standard can be reduced even further though. To this end, ISDA teamed up with Digital Asset to create a CDM reference model in Daml, the open source smart contract language that Digital Asset created. Complementing the CDM with a reference library of Daml code allows developers to unambiguously construct lifecycle events with a machine executable specification. This degree of precision is unparalleled in financial markets and is expected to accelerate the standardization of processes across the derivatives industry.
In this blog post, we examine both the value and implementation risk associated with standards in general, how the CDM brings much sought-after efficiency and risk control to derivatives trading and lifecycle management, why having a CDM reference implementation reduces implementation risk, and why Daml was chosen for building that reference library.
Standards are necessary—but not always sufficient
Industry standards, such as FpML, have proven extremely helpful in the past with streamlining the communication between financial institutions by specifying an agreed-upon common schema for transmitted data. Having standards that deliver a common data representation is absolutely essential in financial markets, but standards typically do not address how those data structures are actually implemented and interpreted. Each market participant must, on their own, develop applications that understand and operate on the standardized data.
When the meaning of individual fields is typically only explained in a natural language and a common interpretation of all fields is not enforced, it’s quite possible that different implementations of a standard will lead to different results—likely resulting in reconciliation breaks across organizations. Consider, for example, that even in the highly standardized and highly automated equities markets, such implementation variations lead to costly reconciliation breaks daily that must be addressed manually.
To better illustrate the issue, first consider how the CDM brings much-needed clarity to how a valid interest rate swap and corresponding cash transfer event are represented: A CDM interest rate swap (left) together with a CDM cash transfer event (right) that is derived from the swap.
What’s not fully specified is how this event should be derived from the terms of the interest rate swap. For example, holiday calendars are required to roll out schedules and apply date adjustments. Once done, the relevant interest rate observation can be used to calculate the final payment amount by applying the specified day count fraction. This process is not easy on its own, and agreeing on it in the absence of a standard implementation is even more challenging.
The traditional solution to managing the inevitable disputes arising from this lack of standardization in the process of generating valid messages is to manually resend a corrected message. Fortunately, a better way has emerged.
CDM and Daml: a perfect combination for standardizing the market
In September 2018, the Barclays DerivHack was held to get feedback on the then-emerging CDM standard, as well as to explore the application of CDM to emerging technologies such as distributed ledger technology (DLT). Using Daml, the Digital Asset team won the London event because Daml—a language built to describe multi-party workflows and automate transactions between participants—proved particularly useful for describing derivatives contracts in terms of the rights, obligations, and market conditions that govern these contracts.
What came out of that event was the happy convergence of a coincidence of the desire to reduce CDM implementation risk on the one hand, and on the other availability of new technology—Daml—with uniquely differentiated characteristics for precisely specifying the sort of events described by the CDM. Since that event, we have been working closely with ISDA to discuss how to use Daml to standardize the business logic alongside the data representation.
The result of this work is the joint ISDA and Digital Asset announcement that we are collaborating to complement the CDM common data representation with a machine-readable specification, written in Daml, for how to implement the required business logic. We expect that the result of this collaboration—an open source library called the CDM Event Specification Module—will hasten the adoption of CDM and remove implementation risk.
Download the Daml implementation of the ISDA CDM Event Specification Module here.
The CDM Event Specification Module in action
The ISDA CDM specification, coded in Daml, is available now via the ISDA CDM Portal.
The CDM Event Specification Module further enriches the CDM by providing a library of pure functions—i.e. deterministic, side-effect free with no IO—that serve as a precise specification of the required business logic. Expanding the CDM standard with such a machine executable specification unambiguously specifies how events operate, e.g., how an upcoming CDM payment event can be derived from a CDM interest rate swap.
The Event Specification Module is written in Daml, whose pure part is very similar to Haskell—a long-established program language with a clean separation of pure and non-pure code. More importantly, it is a well-defined language—which simplifies the translation to other languages. The specification can, therefore, be automatically translated into executable code in other languages, guaranteeing that the business logic can be shared across various technologies. The module is currently available in Daml and Haskell, but the specification will also be compiled to executable libraries in other languages, like Java or C#.
For the interest rate swap example above, the Event Specification Module, for example, exposes a function that builds derived events—i.e., reset and cash transfer—for a given CDM contract:
The first line defines the function signature: It takes a set of reference data and a spec type—including the CDM contract—as input and returns the list of derived events. The second line binds the input variables used during the function execution. The entire logic of rolling out the schedule by applying date adjustments, applying interest rate observations, and calculating the final amount by applying the day count fraction is hidden behind it. This makes it very easy to use and, more importantly, defines a standard for the required business logic.
In addition to the CDM Event Specification Module, we have also open sourced a reference application written in Daml that illustrates how the library can be used to build a simple app for life-cycling interest rate and credit default swaps. Not surprisingly, it deals mainly with ledger-specific details given that the entire business logic is already provided by the Event Specification Module. This clearly demonstrates the value of standardizing the business logic as it avoids re-implementing and agreeing on complex workflows.
CDM and the Event Specification Module future-proofs your applications
In summary—standards have been extremely helpful in the past with streamlining the communication between financial institutions. The CDM makes a valuable and important contribution to the body of standards by providing a common data schema for events that occur throughout the derivatives lifecycle. But as we’ve seen with past use of standards, simply agreeing on a common data presentation can lead to reconciliation issues due to the inconsistency in the way in which transactions are implemented. The CDM Event Specification Module closes this gap by adding a machine-readable specification of the required business logic to the CDM—providing a library of pure functions that unambiguously define how events operate. Written in Daml, it is possible to translate the specification into runnable code in other languages, making sure that institutions can agree on the business logic even across different technology stacks.
But there is an additional benefit to the use of Daml in the Event Specification Module. There is work going on right now to determine whether or not DLT could add value to derivatives markets. In a DLT network, participants not only share a common data representation but also the business logic that operates on that data via smart contracts—which makes the need for precision all the more imperative should these markets begin a shift to DLT. The good news here is that Daml was designed to enable integration with other platforms, and abstracts away all platform-specific logic—which means that any applications written using the CDM Event Specification Module today, running on current infrastructure, will be portable to any current or future DLT platform that supports Daml!
Using the CDM Event Specification Module, you can gain the benefits of a common data and implementation standard now, with the comfort of knowing that your work is future-proof no matter which direction the industry heads.
Join the community and download the Daml SDK at daml.com
This story was originally published 10 April 2019 on Medium
About the author
Thomas Weber - Daml Modeler, Digital Asset
Thomas Weber is part of the Daml Modeler team in EMEA contributing to the evolution of Daml. Prior to joining DA, he was a Senior Risk Modeler at Credit Suisse where he worked for several years. He was part of the management team responsible for pricing services and worked with equity derivatives and structured products including their pricing and lifecycle management.
Thomas holds a master’s degree in Quantitative Finance from ETH Zurich with specializations in risk management and derivatives pricing.