Skip to main content

Implement DRR

Reporting firms can implement DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. using three approaches that can be combined: Build, Benchmark, Buy.

Build

A firm uses the open-acess DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. model to develop its own internal implementation. This involves these implementation steps:

Execution enviroment

The firm develops or deploys a run-time execution engine capable of executing the DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. reporting rules. This engine runs the DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. logic against the firm’s trade data within the firm’s own infrastructure.

Software integration

The DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. code artefacts are integrated into the firm’s software development lifecycle, allowing them to be versioned, tested, and deployed alongside the firm’s internal systems.

Data translation

The firm implements the necessary data transformation logic to translate its internal data formats into the CDMCDM Common Domain Model. A standardised, machine-readable and machine-executable blueprint for how financial products are traded and managed across the transaction lifecycle. It is represented as a domain model and distributed in open source. objects required as input to the DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. process.

Testing and validation

The firm uses the DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. Test Packs for quality assurance. Input data is processed through the firm’s implementation and the resulting output is compared with the expected outputs provided in the test pack to verify that the implementation behaves correctly.

The Build approach providesIDE Integrated Development Environment. A software application that brings together all the essential tools a developer needs to write, test and debug code in one unified workspace. firms with maximum control over deployment and integration, while leveraging the shared DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. model and regulatory logic maintained by the community.

Benchmark

A firm uses the testing capabilities that are freely available under the Community Edition of the RosettaRosetta REGnosys’s proprietary platform used as an execution engine for DRR. platform to validate its own DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. reporting implementation.

This allows firms to compare the outputs of their internal implementation with the outputs generated by the reference DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. model.

Buy

A firm buys a reporting solution from a third-party vendor where the vendor itself may have followed the Build approach to develop their commercial product.

The following sections expand on the Build approach. They detail the Ingest, Enrich, Report and Project steps of the DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. process and how reporting firms can use them to develop their implementation.

The DRR Pipeline

The DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. pipeline steps Ingest, Enrich, Report and Project are necessary for reporting firms to develop their implementation using any of the methods above.

1. Ingest

Why?

To transform a firm’s internal message format into a CDMCDM Common Domain Model. A standardised, machine-readable and machine-executable blueprint for how financial products are traded and managed across the transaction lifecycle. It is represented as a domain model and distributed in open source. object, which is the required input for the DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. process.

How?

Option A - FpMLFpML Financial Products Markup Language Ingestion

DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. includes built-in capabilities to ingest an FpMLFpML Financial Products Markup Language record-keeping message using functional mappings. These mappings are available in the drr.ingest.fpml.recordkeeping namespace. They provide the standard fucntions to translate an FpMLFpML Financial Products Markup Language record-keeping structure into a DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. object - ReportableEvent.

Option B - Manual Ingestion

Alternatively, a firm can manually define it's internal message structure into equivalent Rune data typesdata type A structured model object that defines: what information exists; how that information is organised; what constraints or validations apply. It’s the basic building block used to model reporting concepts such as events, trades, parties, reports and enriched information.. These data typesdata type A structured model object that defines: what information exists; how that information is organised; what constraints or validations apply. It’s the basic building block used to model reporting concepts such as events, trades, parties, reports and enriched information. can then be used in mapping functions to transform a firm's internal data representation into the corresponding CDMCDM Common Domain Model. A standardised, machine-readable and machine-executable blueprint for how financial products are traded and managed across the transaction lifecycle. It is represented as a domain model and distributed in open source. objects required for DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. processing.

The below ingest function converts the FpMLFpML Financial Products Markup Language message into a CDMCDM Common Domain Model. A standardised, machine-readable and machine-executable blueprint for how financial products are traded and managed across the transaction lifecycle. It is represented as a domain model and distributed in open source. workflow representation.

func Ingest_FpmlConfirmationToWorkflowStep:
[ingest XML]
inputs:
fpmlDocument fpml.Document (0..1)
output:
workflowStep WorkflowStep (0..1)

set workflowStep:
fpmlDocument switch
fpml.ClearingConfirmed then MapClearingConfirmedToWorkflowStep,
fpml.ExecutionAdvice then MapExecutionAdviceToWorkflowStep,
fpml.ExecutionAdviceRetracted then MapExecutionAdviceRetractedToWorkflowStep,
fpml.ExecutionNotification then MapExecutionNotificationToWorkflowStep,
fpml.RequestClearing then MapRequestClearingToWorkflowStep,
fpml.TradeChangeAdvice then MapTradeChangeAdviceToWorkflowStep,
default empty

2. Enrich

Why?

To enrich a CDMCDM Common Domain Model. A standardised, machine-readable and machine-executable blueprint for how financial products are traded and managed across the transaction lifecycle. It is represented as a domain model and distributed in open source. object with additional information required for regulatory reporting. This can be obtained from internal or external reference data. This step is necessary because transaction data orginating from front-office systems do not usually include the static data required for reporting.

How?

Enrichment functions extract relevant attributes from the input object and call external APIAPI Application Programming Interface –bridges that let different software systems talk to each other.(s) based on those attributes to retrieve additional information from external sources.

  • The DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. Java code containing the enrichment and APIAPI Application Programming Interface –bridges that let different software systems talk to each other. call functions can be added as a code dependency (e.g. using MavenMaven A build automation and project‑management tool used primarily for Java projects. and Gradle) or downloaded from the RosettaRosetta REGnosys’s proprietary platform used as an execution engine for DRR. application.
  • The enrichment and external APIAPI Application Programming Interface –bridges that let different software systems talk to each other. functions are distributed in the DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. Java code as interfaces, which implementors are meant to develop according to their own business requirements and implementation choices.
  • The RosettaRosetta REGnosys’s proprietary platform used as an execution engine for DRR. platform providesIDE Integrated Development Environment. A software application that brings together all the essential tools a developer needs to write, test and debug code in one unified workspace. some built-in implementation of the enrichment and external APIAPI Application Programming Interface –bridges that let different software systems talk to each other. functions, allowing users to automatically enrich data when developing and testing their regulatory logic. Examples of reference data for which a built-in APIAPI Application Programming Interface –bridges that let different software systems talk to each other. call is provided include:
    • Legal Entity Identifier (from GLEIFGLEIF Global Legal Entity Identifier Foundation. A not‑for‑profit organization, established by the Financial Stability Board in 2014, that is responsible for supporting and overseeing the global Legal Entity Identifier (LEI) system.)
    • Market Identifier Code (from ISO)

3. Report

Why?

To generate a report output which is a DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. object in JSONJSON JavaScript Object Notation. Text-based, language-independent format with key-value pairs (eg Name: Dave). format based on a CDMCDM Common Domain Model. A standardised, machine-readable and machine-executable blueprint for how financial products are traded and managed across the transaction lifecycle. It is represented as a domain model and distributed in open source. object input.

Once enrichment has been completed within the DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. process, the regulatory reporting logic is applied. At this stage, minimal additional implementation is required from a DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. firm. The model itself defines the regulatory rules and reporting logic for each supported regime.

How?

The report and rule definitions are avaliable in the drr.regulation.* namepsaces and prefixed accordingly e.g. drr.regulation.cftc.rewrite.trade.

The DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. Java code containing the reporting rules can either be downloaded from Rosetta or added as a code dependency (e.g. using MavenMaven A build automation and project‑management tool used primarily for Java projects. or Gradle).

Example using Maven

This dependency gives access to the generated Java class representing a specific report object e.g. CFTCPart45TransactionReport

<dependency>
<groupId>com.regnosys.drr</groupId>
<artifactId>rosetta-source</artifactId>
<version>LATEST</version>
</dependency>

The DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. artefacts can be found in the DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. repository: https://europe-west1-maven.pkg.dev/production-208613/isda-maven. Add the following repository block to your pomPOM Project Object Model. An XML file named pom.xml that sits at the root of every Maven project. It tells Maven everything it needs to know to build, test, package and manage a project. file or settings file:

<repository>
<id>digital-regulatory-reporting</id>
<url>https://github.com/rosetta-models/digital-regulatory-reporting</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
  • To execute a report for a particular DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. version:

    • Namespace: the namespace for the report, e.g. drr.regulation.cftc.rewrite
    • Bodybody The organisation or authority that issues the regulatory or technical document the model is based on e.g. a regulator (CFTC, ESMA) or a standard‑setting organisation (CPMI–IOSCO).: the bodybody The organisation or authority that issues the regulatory or technical document the model is based on e.g. a regulator (CFTC, ESMA) or a standard‑setting organisation (CPMI–IOSCO). of the report that this class will generate, e.g. CFTC
    • Corpuscorpus The regulatory document that a reporting rule is based on. list: a list of corpuscorpus The regulatory document that a reporting rule is based on. for the report that this class generates, e.g. Part45
  • Create the Guice module used to initialise the report functions. The convention for DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. is DrrRuntimeModuleExternalApi.class

  • Create the report function for the report

    • The class will have been automatically generated by the DSLDSL Domain-Specific Language – a programming language for a narrow purpose e.g. for financial regulatory reporting.
CFTCPart45ReportFunction function = injector.getInstance(CFTCPart45ReportFunction.class)
  • Create an input CDMCDM Common Domain Model. A standardised, machine-readable and machine-executable blueprint for how financial products are traded and managed across the transaction lifecycle. It is represented as a domain model and distributed in open source. object representing the transaction (always a RosettaModelObject sub-type, e.g. ReportableEvent) by either:

    • Converting JSONJSON JavaScript Object Notation. Text-based, language-independent format with key-value pairs (eg Name: Dave). to Java by using a Jackson Object Mapper (the RosettaObjectMapper utility helps set things up),
    • Creating a ReportableEvent by Ingesting Record Keeping FpMLFpML Financial Products Markup Language or other external models into the CDMCDM Common Domain Model. A standardised, machine-readable and machine-executable blueprint for how financial products are traded and managed across the transaction lifecycle. It is represented as a domain model and distributed in open source.,
    • Creating a ReportableEvent using Java code, or
    • Extracting a ReportableEvent from a CDMCDM Common Domain Model. A standardised, machine-readable and machine-executable blueprint for how financial products are traded and managed across the transaction lifecycle. It is represented as a domain model and distributed in open source. native implementation
  • Run the report based on that input CDMCDM Common Domain Model. A standardised, machine-readable and machine-executable blueprint for how financial products are traded and managed across the transaction lifecycle. It is represented as a domain model and distributed in open source. object (inputData), to return a structured object, according to the report’s specified data typedata type A structured model object that defines: what information exists; how that information is organised; what constraints or validations apply. It’s the basic building block used to model reporting concepts such as events, trades, parties, reports and enriched information..

CFTCPart45TransactionReport report = function.evaluate(reportableEvent);

A full example using the “CFTCCFTC Commodity Futures Trading Commission – United States regulator overseeing derivatives markets, including swaps and futures. Part 45” reporting regime:

package com.regnosys.drr.examples;

import cdm.base.staticdata.party.CounterpartyRoleEnum;
import cdm.base.staticdata.party.metafields.ReferenceWithMetaParty;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.regnosys.drr.DrrRuntimeModuleExternalApi;
import com.regnosys.drr.examples.util.ResourcesUtils;
import com.regnosys.rosetta.common.serialisation.RosettaObjectMapper;
import drr.regulation.cftc.rewrite.CFTCPart45TransactionReport;
import drr.regulation.cftc.rewrite.reports.CFTCPart45ReportFunction;
import drr.regulation.common.ReportableEvent;
import drr.regulation.common.ReportingSide;
import drr.regulation.common.TransactionReportInstruction;
import drr.regulation.common.functions.Create_TransactionReportInstruction;
import drr.regulation.common.functions.ExtractTradeCounterparty;

import java.io.IOException;
import java.util.List;

public class CFTCPart45ExampleReport {

public static void main(String[] args) throws IOException {
// 1. Deserialise a `ReportableEvent` JSON from the test pack
ReportableEvent reportableEvent = ResourcesUtils.getObjectAndResolveReferences(ReportableEvent.class, "regulatory-reporting/input/events/New-Trade-01.json");

// Run report
CFTCPart45ExampleReport cftcPart45ExampleReport = new CFTCPart45ExampleReport();
cftcPart45ExampleReport.runReport(reportableEvent);
}

private final Injector injector;

CFTCPart45ExampleReport() {
this.injector = Guice.createInjector(new DrrRuntimeModuleExternalApi());
}

void runReport(ReportableEvent reportableEvent) throws IOException {
// TransactionReportInstruction from ReportableEvent and ReportingSide
// For this example, arbitrarily PARTY_1 as the reporting party and PARTY_2 as the reporting counterparty
final ReportingSide reportingSide = ReportingSide.builder()
.setReportingParty(getCounterparty(reportableEvent, CounterpartyRoleEnum.PARTY_1))
.setReportingCounterparty(getCounterparty(reportableEvent, CounterpartyRoleEnum.PARTY_2))
.build();
final Create_TransactionReportInstruction createInstructionFunc = injector.getInstance(Create_TransactionReportInstruction.class);
final TransactionReportInstruction reportInstruction = createInstructionFunc.evaluate(reportableEvent, reportingSide);

// Run the API to produce a CFTCPart45TransactionReport
final CFTCPart45ReportFunction reportFunc = injector.getInstance(CFTCPart45ReportFunction.class);
final CFTCPart45TransactionReport report = reportFunc.evaluate(reportInstruction);
// Print
System.out.println(RosettaObjectMapper.getNewRosettaObjectMapper()
.writerWithDefaultPrettyPrinter()
.writeValueAsString(report));

private ReferenceWithMetaParty getCounterparty(ReportableEvent reportableEvent, CounterpartyRoleEnum party) {
ExtractTradeCounterparty func = injector.getInstance(ExtractTradeCounterparty.class);
return func.evaluate(reportableEvent, party).getPartyReference();
}
}

4. Project

Why?

To convert a DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. reports output (JSONJSON JavaScript Object Notation. Text-based, language-independent format with key-value pairs (eg Name: Dave).) into the format required for Trade Repository submission (e.g. ISO 20022)

How?

In the previous step, we converted the DRRDRR Digital Regulatory Reporting. An industry‑developed, machine‑executable interpretation of regulatory rules that produces consistent, transparent and fully traceable reporting outputs from standardised CDM data. report object to JSONJSON JavaScript Object Notation. Text-based, language-independent format with key-value pairs (eg Name: Dave). using this code:

RosettaObjectMapper.getNewRosettaObjectMapper()
.writerWithDefaultPrettyPrinter()
.writeValueAsString(report);

However, the ISO 20022 standard requires the output to be serialised as XMLXML Extensible Markup Language. Text-based format used to store and transport data in a structured way that both humans and machines can read.. As an example, this code can be used to serialise an iso20022.auth108.esma.Document object to XMLXML Extensible Markup Language. Text-based format used to store and transport data in a structured way that both humans and machines can read..

URL xmlConfig = Resources.getResource("xml-config/auth108-esma-rosetta-xml-config.json");
RosettaObjectMapperCreator
.forXML(xmlConfig.openStream())
.create()
.writerWithDefaultPrettyPrinter()
.writeValueAsString(document);

The JSONJSON JavaScript Object Notation. Text-based, language-independent format with key-value pairs (eg Name: Dave). file auth108-esma-rosetta-xml-config.json defines the necessary metadata to ensure that the output conforms exactly to the ISO auth.108.001.01.xsd XMLXML Extensible Markup Language. Text-based format used to store and transport data in a structured way that both humans and machines can read. schema file. It's available as a resource in this MavenMaven A build automation and project‑management tool used primarily for Java projects. artefact:

<dependency>
<groupId>org.iso20022</groupId>
<artifactId>rosetta-source</artifactId>
<version>LATEST</version>
</dependency>

The ISO artefacts are in the ISDAISDA International Swaps and Derivatives Association. The global trade association for participants in the derivatives markets. repository in MavenMaven A build automation and project‑management tool used primarily for Java projects.: https://europe-west1-maven.pkg.dev/production-208613/isda-maven. This repository block can be added to a POMPOM Project Object Model. An XML file named pom.xml that sits at the root of every Maven project. It tells Maven everything it needs to know to build, test, package and manage a project. file or settings file:

<repository>
<id>isda-maven</id>
<url>https://europe-west1-maven.pkg.dev/production-208613/isda-maven</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>