Skip to content

Commit

Permalink
icma contribution phase 1 (finos#1872)
Browse files Browse the repository at this point in the history
* ICMA Contribution 1
  • Loading branch information
minesh-s-patel authored Jan 11, 2023
1 parent 04d8076 commit 443c5c0
Show file tree
Hide file tree
Showing 101 changed files with 28,466 additions and 1,018 deletions.
30 changes: 27 additions & 3 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
# *Infrastructure - Java 8 Support*
# *ICMA Contribution - CDM for Repo and Bonds*

_Background_

This release covers two phases of the ICMA CDM for Repo and Bonds Initiative. Phase 1 covered CDM design of a classic repurchase agreements with a fixed term and fixed rate, and events for purchase and repurchase. Phase 2 extended the CDM product model and event model to cover open term and floating rate repurchase agreements, and the associated lifecycle events.

_What is being released?_

To provide a wider compatibility for CDM Java implementors, this release changes the Java version of the distributed CDM Java artefacts from version 11 to 8.
This release includes the following:

* Additions to AssetClass and ProductTaxonomy to add Money Market and repurchase agreement taxonomy requirements.
* Add ICMA as a documentation publisher.
* Add OnVenue as a ExecutionTypeEnum.
* Replaced SecurityFinancePayout and SecurityFinanceLeg with AssetPayout and AssetLeg.
* Additional provisions for cancellation (early termination of a repo contract).
* Additional provisions for pairoff.
* Added the functions to create primitive instructions and qualifications for the following lifecycle events:

* Roll
* Early Termination
* On-Demand Rate Change
* On-Demand Interest Payment
* Shaping
* PairOff

_Review Directions_

CDM Java implementors should update their maven `pom.xml` to the latest CDM maven artefact (groupId `com.isda`, artifactId `cdm`) and recompile with Java 8 (or later).
In the CDM Portal, select the Textual Browser, navigate to types and event functions mentioned above and inspect their structure definitions and associated data conditions.

In addition for the new events, there are 2 ways to review how they work:

1. In Rosetta, select the Visualisation tab and select the Repo and Bond section, where a set of pre-canned event inputs and their output can be inspected.
2. In Rosetta, select the Functions tab and then select the `Create_BusinessEvent` function, where an arbitrary event instruction object can be passed. To build that instruction input, each new event is associated to an instruction generator function (e.g. `Create_RollPrimitiveInstruction` for the Roll event) that can be invoked in the Functions tab as well.
10 changes: 5 additions & 5 deletions documentation/source/event-model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The ``Trade`` data type defines the outcome of a financial transaction between p
type Trade:
[metadata key]
tradeIdentifier Identifier (1..*)
tradeIdentifier TradeIdentifier (1..*)
tradeDate date (1..1)
[metadata id]
tradableProduct TradableProduct (1..1)
Expand Down Expand Up @@ -94,7 +94,6 @@ The ``ExecutionDetails`` data type represents details applicable to trade execut
executionType ExecutionTypeEnum (1..1)
executionVenue LegalEntity (0..1)
packageReference IdentifiedList (0..1)
[metadata reference]
condition ExecutionVenue:
if executionType = ExecutionTypeEnum -> Electronic
Expand Down Expand Up @@ -237,7 +236,7 @@ All primitive functions are prefixed by ``Create_`` followed by the name of the
counterparty Counterparty (1..1)
ancillaryParty AncillaryParty (0..1)
partyRole PartyRole (0..1)
tradeId Identifier (1..*)
tradeId TradeIdentifier (1..*)
originalTrade TradeState (1..1)
output:
newTrade TradeState (1..1)
Expand All @@ -254,7 +253,7 @@ is associated to a primitive instruction data type that contains the function's
counterparty Counterparty (1..1)
ancillaryParty AncillaryParty (0..1)
partyRole PartyRole (0..1)
tradeId Identifier (1..*)
tradeId TradeIdentifier (1..*)
The ``PrimitiveInstruction`` data type allows to build composite primitive instructions and therefore compose primitive operators. This data type contains one instruction attribute for each of the possible nine primitive instruction types - aligned onto the nine fundamental primitive operators.

Expand Down Expand Up @@ -358,7 +357,8 @@ Therefore, the execution function does not take any before state as input and al
executionDetails ExecutionDetails (1..1)
tradeDate date (1..1)
[metadata id]
tradeIdentifier Identifier (1..*)
tradeIdentifier TradeIdentifier (1..*)
collateral Collateral (0..1)
Contract Formation Primitive
''''''''''''''''''''''''''''
Expand Down
23 changes: 18 additions & 5 deletions documentation/source/product-model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,10 @@ Cash and physical settlement methods require different, specific parameters whic
settlementCurrency string (0..1)
[metadata scheme]
settlementDate SettlementDate (0..1)
settlementCentre SettlementCentreEnum (0..1)
settlementProvision SettlementProvision (0..1)
standardSettlementStyle StandardSettlementStyleEnum (0..1)
BuyerSeller
""""""""""""
Expand Down Expand Up @@ -455,6 +459,7 @@ The CDM specifies the various sets of possible remaining economic terms using th
extraordinaryEvents ExtraordinaryEvents (0..1)
calculationAgent CalculationAgent (0..1)
nonStandardisedTerms boolean (0..1)
collateral Collateral (0..1)
Payout
""""""
Expand All @@ -472,9 +477,12 @@ The ``Payout`` type defines the composable payout types, each of which describes
forwardPayout ForwardPayout (0..*)
fixedPricePayout FixedPricePayout (0..*)
securityPayout SecurityPayout (0..*)
[deprecated]
securityFinancePayout SecurityFinancePayout (0..*)
[deprecated]
cashflow Cashflow (0..*)
performancePayout PerformancePayout (0..*)
assetPayout AssetPayout (0..*)
A number of payout types extend a common data type called ``PayoutBase``. This data type provides a common structure for attributes such as quantity, price, settlement terms and the payer/receiver direction which are expected to be common across many payouts.

Expand Down Expand Up @@ -678,22 +686,27 @@ The ``ProductTaxonomy`` data structure and an instance of a CDM object (`seriali

.. code-block:: Haskell
type ProductTaxonomy:
type ProductTaxonomy extends Taxonomy:
primaryAssetClass AssetClassEnum (0..1)
[metadata scheme]
secondaryAssetClass AssetClassEnum (0..*)
[metadata scheme]
taxonomyValue string (0..1)
[metadata scheme]
[deprecated]
taxonomySource TaxonomySourceEnum (0..1)
[deprecated]
productQualifier string (0..1)
condition TaxonomyValue:
required choice taxonomyValue, productQualifier, primaryAssetClass, secondaryAssetClass
condition TaxonomyType:
required choice source, primaryAssetClass, secondaryAssetClass, taxonomySource
condition TaxonomySource:
if taxonomySource exists then
taxonomyValue exists or productQualifier exists
if source exists then value exists and
if taxonomySource exists then productQualifier exists
condition TaxonomyValue:
optional choice value, productQualifier
.. code-block:: Javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import cdm.base.staticdata.party.*;
import cdm.base.staticdata.party.metafields.ReferenceWithMetaParty;
import cdm.event.common.Trade;
import cdm.event.common.TradeIdentifier;
import cdm.observable.asset.*;
import cdm.observable.asset.metafields.FieldWithMetaPriceSchedule;
import cdm.product.asset.ForeignExchange;
Expand Down Expand Up @@ -82,10 +83,10 @@ private Trade createFxSwapContractExample() {

ContractualProduct contractualProduct = createContractualProduct(underlier, settlementDate);

Identifier citi123 = createIdentifier("CITI123", "http://www.citi.com/fx/trade-id", party1);
Identifier barc987 = createIdentifier("BARC987", "http://www.barclays.com/fx/trade-id", party2);
TradeIdentifier citi123 = createIdentifier("CITI123", "http://www.citi.com/fx/trade-id", party1);
TradeIdentifier barc987 = createIdentifier("BARC987", "http://www.barclays.com/fx/trade-id", party2);

List<Identifier> identifiers = List.of(citi123, barc987);
List<TradeIdentifier> identifiers = List.of(citi123, barc987);
List<Party> parties = List.of(party1, party2);

return createFxSwapContract(identifiers, parties, priceQuantity, contractualProduct, tradeDate, party1, party2);
Expand Down Expand Up @@ -132,7 +133,7 @@ private PriceQuantity createPriceQuantity(String currency1Str, long quantity1, S
.build();
}

private Trade createFxSwapContract(List<Identifier> identifiers,
private Trade createFxSwapContract(List<TradeIdentifier> identifiers,
List<Party> parties,
PriceQuantity priceQuantity,
ContractualProduct contractualProduct,
Expand Down Expand Up @@ -202,8 +203,8 @@ private Party createParty(String partyId, String scheme) {
.build();
}

private Identifier createIdentifier(String identifier, String scheme, Party issuer) {
return Identifier.builder().addAssignedIdentifier(
private TradeIdentifier createIdentifier(String identifier, String scheme, Party issuer) {
return TradeIdentifier.builder().addAssignedIdentifier(
AssignedIdentifier.builder().setIdentifier(
FieldWithMetaString.builder().setValue(identifier)
.setMeta(MetaFields.builder()
Expand Down
Loading

0 comments on commit 443c5c0

Please sign in to comment.