Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into lcortes_auth0_65c35…
Browse files Browse the repository at this point in the history
…d8032527345d0bc9560-CapacityUnitEnum

# Conflicts:
#	RELEASE.md
  • Loading branch information
PayalKhanna committed Nov 12, 2024
2 parents 0d4ca4c + 8e33df0 commit 616bf08
Show file tree
Hide file tree
Showing 1,071 changed files with 42,742 additions and 40,655 deletions.
8 changes: 4 additions & 4 deletions codefresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ steps:
title: Setup build
image: alpine/git
commands:
- cf_export MVN_DEPLOY_FLAGS="-s ${{CF_VOLUME_PATH}}/${{CF_REPO_NAME}}/settings.xml -Dmaven.repo.local=${{CF_VOLUME_PATH}}/.m2 -Denv.CI_DEPLOY_PASSWORD=${{CI_DEPLOY_PASSWORD}} -Denv.CI_DEPLOY_USERNAME=${{CI_DEPLOY_USERNAME}} -Denv.GPG_KEYNAME=${{GPG_KEYNAME}} -Denv.GPG_PASSPHRASE=${{GPG_PASSPHRASE}}"
- cf_export MVN_DEPLOY_FLAGS="-s ${{CF_VOLUME_PATH}}/${{CF_REPO_NAME}}/settings.xml -Dmaven.repo.local=${{CF_VOLUME_PATH}}/.m2 -Denv.CI_DEPLOY_PASSWORD=${{CI_DEPLOY_PASSWORD}} -Denv.CI_DEPLOY_USERNAME=${{CI_DEPLOY_USERNAME}} -Denv.GPG_KEYNAME=${{GPG_KEYNAME}} -Denv.GPG_PASSPHRASE=${{GPG_PASSPHRASE}}" --mask
- cf_export MVN_BUILD_FLAGS="-Dmaven.repo.local=${{CF_VOLUME_PATH}}/.m2"
- cf_export GPG_IMPORT_COMMAND="cat <(echo -e '${{GPG_PRIVATE_KEY}}') | gpg --batch --import"
- cf_export GPG_IMPORT_COMMAND="cat <(echo -e '${{GPG_PRIVATE_KEY}}') | gpg --batch --import" --mask
- cf_export GEN_DEPLOY_POM_SCRIPT="${{CF_VOLUME_PATH}}/${{CF_REPO_NAME}}/rosetta-source/src/main/resources/build-resources/create-deploy-pom.sh"
- cf_export GEN_DEPLOY_POM_PY="${{CF_VOLUME_PATH}}/${{CF_REPO_NAME}}/rosetta-source/src/main/resources/build-resources/create-deploy-pom.py"

Expand All @@ -36,7 +36,7 @@ steps:
commands:
- cf_export RELEASE_NAME=${{TAG_NAME}}
- cf_export MAVEN_BUILD_PROFILES="daml,scala,typescript,golang,csharp8,csharp9,kotlin,python,full,gpg,excel,json-schema"
- cf_export MVN_DEPLOY_FILE_FLAGS="${{MVN_BUILD_FLAGS}} ${{MVN_DEPLOY_FLAGS}} -Durl=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2 -DrepositoryId=ossrh-distro -Dgpg.passphrase=${{GPG_PASSPHRASE}}"
- cf_export MVN_DEPLOY_FILE_FLAGS="${{MVN_BUILD_FLAGS}} ${{MVN_DEPLOY_FLAGS}} -Durl=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2 -DrepositoryId=ossrh-distro -Dgpg.passphrase=${{GPG_PASSPHRASE}}" --mask

SnapshotProperties:
stage: 'setup'
Expand All @@ -49,7 +49,7 @@ steps:
commands:
- cf_export RELEASE_NAME=${{GLOBAL_RELEASE_VERSION}}.${{CF_BRANCH_TAG_NORMALIZED}}-SNAPSHOT
- cf_export MAVEN_BUILD_PROFILES="daml,scala,typescript,golang,csharp8,csharp9,kotlin,python,gpg,excel,json-schema"
- cf_export MVN_DEPLOY_FILE_FLAGS="${{MVN_BUILD_FLAGS}} ${{MVN_DEPLOY_FLAGS}} -Durl=https://s01.oss.sonatype.org/content/repositories/snapshots -DrepositoryId=ossrh -Dgpg.passphrase=${{GPG_PASSPHRASE}}"
- cf_export MVN_DEPLOY_FILE_FLAGS="${{MVN_BUILD_FLAGS}} ${{MVN_DEPLOY_FLAGS}} -Durl=https://s01.oss.sonatype.org/content/repositories/snapshots -DrepositoryId=ossrh -Dgpg.passphrase=${{GPG_PASSPHRASE}}" --mask

Build:
stage: 'build'
Expand Down
2 changes: 1 addition & 1 deletion docs/cdm-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ and machine-executable blueprint for how financial products are traded
and managed across the transaction lifecycle. It is represented as a
[domain model](https://olegchursin.medium.com/a-brief-introduction-to-domain-modeling-862a30b38353) and distributed in open source.

For an overview of the Common Domain Model, a comparative analysis with FpML, an exploration of the CDM's historical development and events, as well as insights into its further applications, including its role in the ecosystem and support for smart contract technology, we recommend reviewing the [CDM Overview deck](/pdfs/CDM-Overview.pdf).
For an overview of the Common Domain Model, a comparative analysis with FpML, an exploration of the CDM's historical development and events, as well as insights into its further applications, including its role in the ecosystem and support for smart contract technology, we recommend reviewing the [CDM Overview deck](/pdfs/CDM-Overview.pptx.pdf).

ISDA’s Digital Regulatory Reporting (DRR) solution leverages the open-source Common Domain Model (CDM) to convert industry-agreed interpretations of new or amended regulatory reporting rules into clear, machine-executable code. This approach enhances implementation efficiency and reduces costs. Institutions contributing to the development of the ISDA DRR include (but are not limited to) those listed on [ISDA’s Digital Regulatory Reporting Page](https://www.isda.org/isda-digital-regulatory-reporting/).

Expand Down
11 changes: 7 additions & 4 deletions docs/eligible-collateral-representation.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,13 @@ type AssetCriteria:
agencyRating AgencyRatingCriteria (0..*)
maturityType MaturityTypeEnum (0..1)
maturityRange PeriodRange (0..1)
assetIdentifier AssetIdentifier (0..*)
specificAssets Asset (0..*)
collateralTaxonomy CollateralTaxonomy (0..*)
domesticCurrencyIssued boolean (0..1)
listing ListingType (0..1)

condition AssetCriteriaChoice:
optional choice collateralAssetType, collateralTaxonomy, assetIdentifier
optional choice collateralAssetType, collateralTaxonomy, specificAssets
```

- `collateralAssetType` Represents a filter based on the asset product
Expand All @@ -244,8 +244,11 @@ type AssetCriteria:
or original maturity.
- `maturityRange` Represents a filter based on the underlying asset
maturity.
- `productIdentifier` Represents a filter based on specific instrument
identifiers (e.g. specific ISINs, CUSIPs etc)
- `specificAssets` Represents a filter based on specific assets which
are acceptable as collateral (e.g. specific securities, loans, equities,
commodities or other assets etc). Assets may be defined using the
`Asset` data type, including by reference to an identifier such
as ISIN, CUSIP, etc.
- `collateralTaxonomy` Specifies the collateral taxonomy, which is
composed of a taxonomy value and a taxonomy source.
- `domesticCurrencyIssued` Identifies that the Security must be
Expand Down
5 changes: 3 additions & 2 deletions docs/event-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ type TransferState:

``` Haskell
type Transfer extends TransferBase:
settlementOrigin SettlementOrigin (0..1)
settlementOrigin Payout (0..1)
[metadata reference]
resetOrigin Reset (0..1)
transferExpression TransferExpression (1..1)
```
Expand Down Expand Up @@ -611,7 +612,7 @@ func Create_Reset:

``` Haskell
type ResetInstruction:
payout Payout (1..1)
payout Payout (1..*)
[metadata reference]
rateRecordDate date (0..1)
resetDate date (1..1)
Expand Down
1 change: 1 addition & 0 deletions docs/home.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Welcome to CDM documentation !
- [namespace](/docs/namespace)
* [Use Cases](/docs/use-cases)
- [Eligible Collateral Representation](/docs/eligible-collateral-representation)
- [Standardized Schedule Functions](/docs/standardized-Functions)
- [Repurchase Agreement Representation](/docs/repurchase-agreement-representation)
- [Securities Lending](/docs/securities-lending)
- [Pre-trade Processing](/docs/pre-trade-processing)
Expand Down
18 changes: 11 additions & 7 deletions docs/process-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,12 @@ func EquityCashSettlementAmount:
output:
equityCashSettlementAmount Transfer (1..1)

alias payout:
tradeState -> trade -> product -> economicTerms -> payout
filter PerformancePayout exists
then only-element
alias equityPerformancePayout:
tradeState -> trade -> product -> economicTerms -> payout -> performancePayout only-element
payout -> PerformancePayout
alias equityPerformance:
EquityPerformance(
tradeState -> trade,
Expand Down Expand Up @@ -585,8 +589,8 @@ func EquityCashSettlementAmount:
if equityPerformance >= 0 then receiver else payer
set equityCashSettlementAmount -> settlementDate -> adjustedDate:
ResolveCashSettlementDate(tradeState)
set equityCashSettlementAmount -> settlementOrigin -> performancePayout:
equityPerformancePayout as-key
set equityCashSettlementAmount -> settlementOrigin:
payout as-key
```

``` Haskell
Expand Down Expand Up @@ -732,8 +736,8 @@ func Create_Reset:
else instruction -> resetDate

alias observationIdentifiers:
if payout -> performancePayout count = 1 then ResolvePerformanceObservationIdentifiers(payout -> performancePayout only-element, instruction -> resetDate)
else if payout -> interestRatePayout exists then ResolveInterestRateObservationIdentifiers(payout -> interestRatePayout only-element, observationDate)
if payout -> PerformancePayout count = 1 then ResolvePerformanceObservationIdentifiers(payout -> PerformancePayout only-element, instruction -> resetDate)
else if payout -> InterestRatePayout exists then ResolveInterestRateObservationIdentifiers(payout -> InterestRatePayout only-element, observationDate)

alias observation:
ResolveObservation([observationIdentifiers], empty)
Expand All @@ -742,8 +746,8 @@ func Create_Reset:
tradeState

add reset -> resetHistory:
if payout -> performancePayout count = 1 then ResolvePerformanceReset(payout -> performancePayout only-element, observation, instruction -> resetDate)
else if payout -> interestRatePayout exists then ResolveInterestRateReset(payout -> interestRatePayout, observation, instruction -> resetDate, instruction -> rateRecordDate)
if payout -> PerformancePayout count = 1 then ResolvePerformanceReset(payout -> PerformancePayout only-element, observation, instruction -> resetDate)
else if payout -> InterestRatePayout exists then ResolveInterestRateReset(payout -> InterestRatePayout, observation, instruction -> resetDate, instruction -> rateRecordDate)
```

First, `ResolvePerformanceObservationIdentifiers` defines the specific
Expand Down
56 changes: 27 additions & 29 deletions docs/product-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ type EconomicTerms:
effectiveDate AdjustableOrRelativeDate (0..1)
terminationDate AdjustableOrRelativeDate (0..1)
dateAdjustments BusinessDayAdjustments (0..1)
payout Payout (1..1)
payout Payout (1..*)
terminationProvision TerminationProvision (0..1)
calculationAgent CalculationAgent (0..1)
nonStandardisedTerms boolean (0..1)
Expand Down Expand Up @@ -319,17 +319,17 @@ a credit default payout to specify a credit default swap.
:::

``` Haskell
type Payout:
choice Payout:
[metadata key]
interestRatePayout InterestRatePayout (0..*)
creditDefaultPayout CreditDefaultPayout (0..1)
optionPayout OptionPayout (0..*)
commodityPayout CommodityPayout (0..*)
settlementPayout SettlementPayout (0..*)
fixedPricePayout FixedPricePayout (0..*)
cashflow Cashflow (0..*)
performancePayout PerformancePayout (0..*)
assetPayout AssetPayout (0..*)
AssetPayout
Cashflow
CommodityPayout
CreditDefaultPayout
FixedPricePayout
InterestRatePayout
OptionPayout
PerformancePayout
SettlementPayout
```

A number of payout types extend a common data type called `PayoutBase`.
Expand Down Expand Up @@ -363,7 +363,6 @@ For example:

``` Haskell
type InterestRatePayout extends PayoutBase:
[metadata key]
rateSpecification RateSpecification (0..1)
dayCountFraction DayCountFractionEnum (0..1)
[metadata scheme]
Expand Down Expand Up @@ -1106,23 +1105,22 @@ ISDA definitions for reference benchmarks. Security has a
set of additional attributes, as shown below:

``` Haskell
type Security extends InstrumentBase:
securityType SecurityTypeEnum (1..1)
debtType DebtType (0..1)
equityType EquityTypeEnum (0..1)
fundType FundProductTypeEnum (0..1)

condition DebtSubType:
if securityType <> SecurityTypeEnum -> Debt
then debtType is absent

condition EquitySubType:
if securityType <> SecurityTypeEnum -> Equity
then equityType is absent

condition FundSubType:
if securityType <> SecurityTypeEnum -> Fund
then fundType is absent
type Security extends InstrumentBase:
debtType DebtType (0..1)
equityType EquityTypeEnum (0..1)
fundType FundProductTypeEnum (0..1)

condition DebtSubType:
if instrumentType <> InstrumentTypeEnum -> Debt
then debtType is absent

condition EquitySubType:
if instrumentType <> InstrumentTypeEnum -> Equity
then equityType is absent

condition FundSubType:
if instrumentType <> InstrumentTypeEnum -> Fund
then fundType is absent
```

The product identifier will uniquely identify the security. The
Expand Down
5 changes: 5 additions & 0 deletions docs/standardized-functions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Standardized Schedule functions
---

# Standardized Schedule functions
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.finos.cdm.example.globalkey;

import cdm.product.asset.InterestRatePayout;
import cdm.product.template.Payout;
import org.finos.cdm.example.InterestRatePayoutCreation;
import com.rosetta.model.lib.process.PostProcessStep;
import com.rosetta.model.metafields.MetaFields;
Expand All @@ -17,22 +18,23 @@ public static void main(String[] args) {
// Create a CDM object.
//
InterestRatePayout fixedRatePayout = InterestRatePayoutCreation.getFixedRatePayout(BigDecimal.valueOf(0.05));
Payout payout = Payout.builder().setInterestRatePayout(fixedRatePayout);


// Assert the globalKey has not been set
//
assert fixedRatePayout.getMeta().getGlobalKey() == null : "globalKey should be null";
assert payout.getMeta().getGlobalKey() == null : "globalKey should be null";


// Use the a HashFunction to generate a hash value for the fixedRatePayout object created above.
//
String hash = new SerialisingHashFunction().hash(fixedRatePayout);
String hash = new SerialisingHashFunction().hash(payout);


// Now, set the computed global key onto the original object. Note that toBuilder()
// creates a new instance of the object.
//
InterestRatePayout withGlobalKey = fixedRatePayout.toBuilder().setMeta(MetaFields.builder().setGlobalKey(hash).build()).build();
Payout withGlobalKey = payout.toBuilder().setMeta(MetaFields.builder().setGlobalKey(hash).build()).build();

System.out.println("globalKey is: " + withGlobalKey.getMeta().getGlobalKey());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private static EligibleCollateralCriteria getCommonCriteria() {
.addAsset(AssetCriteria.builder()
.addCollateralAssetType(AssetType.builder()
.setAssetType(AssetTypeEnum.SECURITY)
.setSecurityType(SecurityTypeEnum.DEBT)))
.setSecurityType(InstrumentTypeEnum.DEBT)))
.addIssuer(IssuerCriteria.builder()
.addIssuerType(CollateralIssuerType.builder()
.setIssuerType(IssuerTypeEnum.SOVEREIGN_CENTRAL_BANK))
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

<repoServerHost>s01.oss.sonatype.org</repoServerHost>
<stagingTimeoutInMinutes>10</stagingTimeoutInMinutes>
<rosetta.bundle.version>11.24.1</rosetta.bundle.version>
<rosetta.bundle.version>11.24.2</rosetta.bundle.version>
<rosetta.code-gen.version>${rosetta.bundle.version}</rosetta.code-gen.version>
<rosetta.dsl.version>9.20.0</rosetta.dsl.version>

Expand Down
Loading

0 comments on commit 616bf08

Please sign in to comment.