• Insight
  • Monday 4th March 2024

CDM Code Generator Workshop Proves a Success

At the end of January, the brightest minds in the Capital Markets Fintech industry took part in a unique event that aimed to enhance the Common Domain Model (CDM).

The purpose was to automate the generation of a valid JSON Schema from the CDM, and the output was nothing short of impressive:


100+ test cases defined and successfully executed, proving that the generated JSON Schema was valid and an accurate representation of the CDM;


  • 756 JSON Schema files representing the entire CDM production version successfully generated...;


  • ... In under 5 seconds, meeting the performance expectations of a production compiler;


  • 1 production-grade contribution made to the CDM, whose every release includes a JSON Schema going forward.


  • 11 participants from 7 firms deserving praise for giving everything to achieve these results in a short time.



But first, a quick CDM primer

 

The CDM is a standardized, machine-readable, and machine-executable model that represents financial products and their trade lifecycle events.

 

It allows market participants to achieve consistency in the interpretation and implementation of pre- and post-trade requirements, by creating a digital representation of contracts and events across the lifecycle of financial transactions, while supporting the conversion to and from existing messaging standards.

 

The CDM brings significant benefits to market participants and regulators, including enhanced interoperability and straight-through processing, better regulatory oversight and an environment for innovation in financial markets.

 

To get involved and interact with the CDM Community visit here.


The event

 

The two-day codefest was organised by the International Securities Lending Association (ISLA) in conjunction with REGnosys, Trading Apps and the Fintech Open-Source Foundation (FINOS).

 

Participants also included representatives from ISDA (International Swaps and Derivatives Association), London Reporting House, FIS, Sharegain, Broadridge and LSEG.

 

Teams worked together to define, code, test and document a major enhancement of the CDM’s infrastructure. Having a small group of participants allowed a hands-on approach to the workshop and promoted a collaborative working environment as the teams set about resolving a series of technical challenges.


“I'm often surprised by how much gets done in hackathons, but this one blew it out of the park. I arrived mid-way through the second day to see hundreds of JSON schemas being generated, documents being parsed and tests passing. A real tour-de-force by the Regnosys and ISLA teams. Well done!” said Rob Moffat, FINOS Senior Technical Architect

 


The goal

 

The goal for the group was to automate the translation of the CDM into a valid JSON Schema – a process called a Code Generator.

 

The driver for the workshop was a real-world business case for a JSON Schema representation of the CDM that conforms to the draft 4 specification as defined by json-schema.org, and used by OpenAPI 3.0.3.

 

JSON is one of the most popular formats for exchanging data, and the JSON Schema is the vocabulary that enables JSON data consistency, validity and interoperability at scale.

 

The resultant code and associated documentation would then be contributed back to the CDM github repository for use by the community.

 

 

The tasks

 

The CDM is written in a richly expressive Domain-Specific Language called the Rosetta DSL.

 

The group adopted a test-driven approach that required three important elements:

 

1.)  Source Data

 

The team needed to manufacture and peer-review Rosetta samples to demonstrate the most common constructs used in the CDM.

 

2.)  Target Data

 

The team also required JSON Schema samples that conform to the structures defined in the example Rosetta files. These were used to assert that the JSON Schema generated exactly matched the Rosetta definition.

 

3.)  Prototyping Code Generators

 

The core of the workshop was to code the new code generator, using the source and target data samples for acceptance testing.

 

CDM code generators require the use of Xtend, a flexible and expressive dialect of Java which is itself an extension to the Eclipse IDE (integrated development environment used in computer programming).

 

New test functions were implemented to validate the JSON Schema created by the new Code Generator. These tests were used to confirm that:

 

• The JSON Schema generated conforms to the draft 4 specification

 

• JSON samples validate against the generated JSON Schema

 

To maximise the time and skillsets available, the participants split into two groups – one group worked on the Rosetta, JSON and schema examples, while the other worked on coding the new code generator and test functions.


 

The results

 

In the two days, participants defined over 100 test cases which were all successfully executed. This gave the group confidence that the JSON Schema being generated was valid against the JSON Schema draft 4 specification, as well as being an accurate representation of Rosetta.

 

As a final test, the code generator was run against the entire CDM production version (then 5.4.0). This processed 756 Rosetta files and successfully created 756 valid JSON Schema files in just under 5 seconds.

 

This meant the team successfully created a new code generator that can translate a Rosetta artefact into a JSON Schema that conforms to the required draft 4 specification.

 

This new code generator for the CDM was brought to production readiness and released a few days after the event in CDM version 5.5.0. All sample data, test cases and code have been contributed to the core CDM repository.

 

2024 is already off to a great start for the CDM and there's more in store including another production release later this year and many enterprise-grade implementations to be announced.


Stay tuned!


CDM Integration

We do the data mappings for you…

Just extract transaction data from your booking, reporting or any other systems, we handle the rest.
We build mappings in immersion with your tech team, as a packaged +/- 2-day workshop that includes valuable CDM training – and is fun (yes, really)!

… And deliver you a packaged output…

Forget data mapping spreadsheets and forget hard-coded translation buried deep into your code base.
What you get is a transparent, maintainable CDM translation dictionary, automatically packaged into an API to translate your internal trade messages.

… Which you can start using right away

Start using the API for testing right away. For production deployment, we offer a range of hosting options that adapt to your technology stack.
The application grows with you. Just edit your dictionary to connect more and more systems to CDM.
Contact us

Data Modelling

Take an existing data pipeline of any form…

Just choose among your existing business processes to experiment a model-driven approach in +/- 2 days.​
We can start from any kind of artefact, from XML messages down to Excel or even PDF documents.

… To demonstrate the model-driven approach…

Our team of data engineering experts works in immersion with you and guide the process from start to finish.​
Our promise: some executable data pipeline running based on your model by the end of the workshop.

… Which you can deploy within your organisation

All it takes is a cross-functional team of developers and non-developers, who is open to a fresh (and fun!) approach.​
The buck doesn’t stop there. That team is now empowered to carry that project forward and build model-based pipelines for your organisation.
Contact us

Reporting Audit

First, map your data into CDM...

We have it covered it. All it takes is a +/- 2-day immersion workshop with your tech team to build your mappings.
As a by-product, you get a ready-to-use API to convert all your trade data

… And access your audit results on-line…

Once your trade data have been mapped, our reporting engine compares its output to your reports and analyses any discrepancy.
Analysis is developed within 6 weeks and results published into a web application.

… Through a powerful user interface

Forget static audit reports that end-up on a shelf.
Our reporting engine is available on-demand to reconcile your reporting process end-to-end and down to single trade flow, through a fully interactive interface.
Contact us

Model-Driven Regulation

Bring-on the regulatory text…

Can be anything in your existing corpus, as long as it’s digestible and relatively self-contained.
The target is to deconstruct that text and reconstruct a model of the regulation in +/- 2 days.

… We’ll handle the rest…

Our team of regulatory and engineering experts works in immersion with you and guide the process from start to finish.
Our promise: some executable code running by the end of the workshop, delivered to you and ready for demonstration.

… And you’re ready to develop rules on your own

All it takes is a cross-functional team, ideally all-encompassing from policy to technology, who is open to a fresh (and fun!) approach.
The buck doesn’t stop there. Your team is now empowered to carry that project forward inside your organisation.
Contact us