common-domain-model icon indicating copy to clipboard operation
common-domain-model copied to clipboard

Transferable party1/party2 refactor

Open tomhealey-icma opened this issue 7 months ago • 13 comments

This PR addresses three issues:

  1. Define who pays / receives (Party1 / Party2) for a Tradeable Product's embedded payout #3590
  2. Add product issuer, #3567
  3. AssetType is not included in Product although it's part of CollateralCriteria and collateral EligibilityQuery. #3559

To address these issues the following changes are being made:

  1. Add new PartyRole "Issuer"
  2. Add productParty Counterparty (0..1) to TransferableProduct
  3. Add to AssetBase: assetPayer Party (0..1) assetPayerRole PartyRole (0..1) assetAncillaryParty AncillaryParty (0..*)
  4. Add new function input tests, bond-execution-with-bond-details.
  5. Add AssetType to AssetBase.

tomhealey-icma avatar Apr 28 '25 15:04 tomhealey-icma

Deploy Preview for finos-cdm ready!

Name Link
Latest commit bc61df8ec35b21bbd6ec1be65a9ff1938423f4da
Latest deploy log https://app.netlify.com/projects/finos-cdm/deploys/6909293ca41ee100086b5a72
Deploy Preview https://deploy-preview-3666--finos-cdm.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Apr 28 '25 15:04 netlify[bot]

I've added another change to address: AssetType is not included in Product although it's part of CollateralCriteria and collateral EligibilityQuery. https://github.com/finos/common-domain-model/issues/3559.

Proposal is to add AssetType to AssetBase.

tomhealey-icma avatar Apr 29 '25 17:04 tomhealey-icma

party-issuer-refactor-v2.pptx

For review and discussion at CRWG, attached presentation on issues and solution to transferable party1/party2 problem.

tomhealey-icma avatar Jun 16 '25 19:06 tomhealey-icma

For review and discussion at CRWG, attached presentation on issues and solution to transferable party1/party2 problem.

Thanks @tomhealey-icma for the useful presentation. I recommend you attach it to the issue rather than the PR, for ease of access and retrieval (PR can come and go if they're closed and replaced, whereas issues tend to have more staying power). The issue is also what we tend to point to in the WG.

lolabeis avatar Jun 17 '25 13:06 lolabeis

Unable to build until issue, 3813 is resolved.

tomhealey-icma avatar Jun 17 '25 19:06 tomhealey-icma

It was suggested that exchange is removed from AssetBase. If it's removed the mapping in cdm.mapping.fpml.confirmation.tradestate, will need to be removed: + exchange [value "bond"] [value "convertibleBond"] [value "loan"] [value "mortgage"] [value "equity"] [value "index"] [value "commodity"] [value "exchangeTradedContractNearest"]

Do you want to do this?

It was agreed to remove the exchange mapping.

tomhealey-icma avatar Jun 17 '25 19:06 tomhealey-icma

@tomhealey-icma

It was suggested that exchange is removed from AssetBase. If it's removed the mapping in cdm.mapping.fpml.confirmation.tradestate, will need to be removed

It may be easier to proceed as @mgratacos suggested at the CRWG, where these “exchange” attribute are removed and remapped in a later contribution. In order for your PR to be wholesome though, you should remove “Exchange” from AssetPartyRoleEnum, to avoid creating potentially 2 different ways to set the same attribute. The "Exchange" value could be added back into the enum when the "exchange" attributes are removed.

(Note: There was previously an issue #3553 dealing with the latter step, but it was closed and marked as duplicated. If we proceed in 2 steps that issue should be re-opened).

Tom, finally, your PR introduces backward-incompatible changes that create new validation failures with the introduction of mandatory attributes. Some work will be needed to resolve them by making sure these attributes are populated at ingestion.

lolabeis avatar Jun 20 '25 08:06 lolabeis

Following up on questions from the CRWG:

  1. Confirmed AssetPartyRole includes partyReference Party (1..1)
  2. Agreed to remove exchange and relatedExchange attributes.
  3. Please see attached file for example with data, cdm-sample-files/functions/repo-and-bond/bond-execution-with-bond-details-func-input.json

tomhealey-icma avatar Jun 20 '25 16:06 tomhealey-icma

I'll convert this to a draft until all the changes are added.

tomhealey-icma avatar Jul 03 '25 17:07 tomhealey-icma

@tomhealey-icma

I'll convert this to a draft until all the changes are added.

Note that I sent detailed review comments in-line on the other PR (#3821) that we spinned off, because I saw that you were committing changes on that PR as well. Those comments would also apply to the present PR.

Going forward, can you commit your changes on the present PR only?

lolabeis avatar Jul 04 '25 11:07 lolabeis

Model changes are complete. To Do: Documentation and Ingestion Tests

tomhealey-icma avatar Jul 16 '25 19:07 tomhealey-icma

@lolabeis , @manucarreramoreno - There's an open issue on this PR related to ingestion. When exchange is removed from AssetBase the condition below will be replaced with a new condition based on partyRole:

old: condition ExchangeListed: <"If Exchange is specified, it must be an exchange-listed Instrument."> if exchange exists then isExchangeListed

New: condition ExchangeRole: <"If Exchange is specified, it must be an exchange-listed Instrument."> if partyRole -> role = Exchange then isExchangeListed

condition ExchangeListed: <"If isExchangeListed is true then partyRole is Exchange.">
        if isExchangeListed then partyRole -> role = Exchange

condition RelatedExchange: <"If isExchangeList is false then RelatedExchange ancillaryPartyRole is absent.">
        if isExchangeListed is absent then ancillaryPartyRole -> role any <> RelatedExchange

The ingestion service and tests will need to be modified to look at the exchange role to set isExchangeListed. If you can make the ingestion source code available I will make the changes.

tomhealey-icma avatar Aug 21 '25 18:08 tomhealey-icma

@tomhealey-icma See my detailed review comments.

When exchange is removed from AssetBase the condition below will be replaced with a new condition based on partyRole

I made some suggestions for how that logic should be adjusted to reflect the original intent

The ingestion service and tests will need to be modified to look at the exchange role to set isExchangeListed. If you can make the ingestion source code available I will make the changes.

Now that the changes to introduce the open-source "Translate 2.0" mechanism in our ingestion tests have been completed as per #3836, my suggestion is to do the remapping using that new ingestion (the old ingestion tests will be degraded, but they should be deprecated eventually).

lolabeis avatar Sep 01 '25 17:09 lolabeis