Skip to content

Commit 98873d8

Browse files
Chuks-AjehOscar-TwomeyCDM-ReleaseManagement-OTPayalKhanna
authored
[7 dev] Oscar Twomey Asset Model - Aligning AssetType with Asset and Security (Update Expectations) (#4434)
* Asset Model - Aligning AssetType with Asset and Security * Adding conditions * update README.md * Update RELEASE.md * fix Mappers and documentation * update expectations * update reference for instrumentType to securityType * Taking letter of credit out of SecurityTypeEnum * Updating descriptions and some mappings * Code cleanup * update expectations * Updating cardinality of securityType * update expectations * update isla expectation * update expectations * removed old Ingestion mapping analytics which are not needed anymore * Removing hardcoding of Commodity on Observable * Hardcode securityType into bond execution func input * update expectations * formatting * Update RELEASE.md * Update RELEASE.md * Adding extra conditions * update expectations --------- Co-authored-by: Oscar Twomey <oscar.twomey@regnosys.com> Co-authored-by: CDM-ReleaseManagement-OT <oscar.twomey+cdm@regnosys.com> Co-authored-by: payal.khanna <payal.khanna@regnosys.com>
1 parent 187b69c commit 98873d8

File tree

910 files changed

+10949
-5664
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

910 files changed

+10949
-5664
lines changed

RELEASE.md

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,19 @@
1-
# _Collateral Model - Addition of IndexType_
2-
_Background_
3-
4-
In the collateral model, there is no way of specifying whether a security is a constituent of a particular index without also specifying an asset identifier for that index.
5-
6-
Furthermore, it was agreed on the working group discussions that `RegCap` could be removed as it is not in use.
7-
8-
Addition of a new type `IndexType`.
9-
10-
This allows for the definition of an index within collateral criteria without using `Index` in the Product Model. Therefore, only the value in the `EquityIndexEnum` needs to be specified rather than an `AssetIdentifier`.
1+
# *Asset Model - Aligning AssetType with Asset and Security*
112

12-
_Review Directions_
13-
14-
The changes can be reviewed in PR: [#4476](https://github.com/finos/common-domain-model/pull/4476)
15-
16-
# _Asset Model - Removal of DebtClassEnum_
173
_Background_
184

19-
There is ambiguity around vanilla and structured enum values without a defined taxonomy. Recent changes in `DebtType` now allow for Structured and Vanilla debt to be defined outside of this enum based solely on their characteristics.
20-
21-
Furthermore, it was agreed on the working group discussions that `RegCap` could be removed as it is not in use.
5+
There is inconsistency in how asset type, instrument, and security types are modelled. This release seeks to restructure the types and enums so they are harmonised.
226

237
_What is being released?_
248

25-
Removal of `DebtClassEnum` and any references to it.
9+
- Renaming `InstrumentTypeEnum` to `SecurityTypeEnum`
10+
- Adding `SecurityTypeEnum` as an attribute under `Security` and removing it from `InstrumentBase`
11+
- Removing `ListedDerivative` and `LetterOfCredit` from `SecurityTypeEnum` and adding them to `AssetTypeEnum`
12+
- Adding `Loan` to `AssetTypeEnum` to further align it with the asset and instrument model
13+
- Adding `AssetTypeEnum` to `AssetBase`
14+
- Adding conditions on each of the types to enforce the correct asset type selection
2615

2716
_Review Directions_
2817

29-
The changes can be reviewed in PR: [#4474](https://github.com/finos/common-domain-model/pull/4474)
18+
Changes can be reviewed in PR: [#4434](https://github.com/finos/common-domain-model/pull/4434)
19+

docs/product-model.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,22 +140,26 @@ for purposes of brevity.
140140
Security has a set of additional attributes, as shown below:
141141

142142
``` Haskell
143-
type Security extends InstrumentBase:
143+
type Security extends InstrumentBase:
144+
securityType SecurityTypeEnum (1..1)
144145
debtType DebtType (0..1)
145146
equityType EquityType (0..1)
146147
fundType FundProductTypeEnum (0..1)
147148

148149
condition DebtSubType:
149-
if instrumentType <> InstrumentTypeEnum -> Debt
150+
if securityType <> Debt
150151
then debtType is absent
151152

152153
condition EquitySubType:
153-
if instrumentType <> InstrumentTypeEnum -> Equity
154+
if securityType <> Equity
154155
then equityType is absent
155156

156157
condition FundSubType:
157-
if instrumentType <> InstrumentTypeEnum -> Fund
158+
if securityType <> Fund
158159
then fundType is absent
160+
161+
condition AssetType:
162+
assetType = Security
159163
```
160164

161165
The asset identifier will uniquely identify the security. The

rosetta-source/src/main/java/cdm/event/workflow/processor/FISMapperMappingProcessor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import cdm.base.math.UnitType;
88
import cdm.base.staticdata.asset.common.AssetIdTypeEnum;
99
import cdm.base.staticdata.asset.common.AssetIdentifier;
10-
import cdm.base.staticdata.asset.common.InstrumentTypeEnum;
1110
import cdm.base.staticdata.asset.common.Security;
11+
import cdm.base.staticdata.asset.common.SecurityTypeEnum;
1212
import cdm.base.staticdata.party.CounterpartyRoleEnum;
1313
import cdm.base.staticdata.party.PartyIdentifier;
1414
import cdm.event.common.ExecutionTypeEnum;
@@ -93,7 +93,7 @@ private void staticMappings(PathValue<TradeStateBuilder> tradeState) {
9393
getIRP(tradeState).getValue().getOrCreatePaymentDates().getOrCreatePaymentFrequency().setPeriodMultiplier(1);
9494

9595
//sec lending payout
96-
getSecPO(tradeState).getValue().getOrCreateUnderlier().getOrCreateInstrument().getOrCreateSecurity().setInstrumentType(InstrumentTypeEnum.EQUITY);
96+
getSecPO(tradeState).getValue().getOrCreateUnderlier().getOrCreateInstrument().getOrCreateSecurity().setSecurityType(SecurityTypeEnum.EQUITY);
9797

9898
getSecPO(tradeState).getValue().getOrCreatePayerReceiver().setPayer(CounterpartyRoleEnum.PARTY_1);
9999
getSecPO(tradeState).getValue().getOrCreatePayerReceiver().setReceiver(CounterpartyRoleEnum.PARTY_2);
@@ -337,7 +337,7 @@ private Multimap<String, MappingConsumer<TradeStateBuilder>> buildCommonMappings
337337
// key
338338
PathValue<PriceQuantityBuilder> pq = getPriceQuantityForSecurityFinancePayout(tradeState);
339339
Security security = Security.builder()
340-
.setInstrumentType(InstrumentTypeEnum.EQUITY)
340+
.setSecurityType(SecurityTypeEnum.EQUITY)
341341
.addIdentifier(AssetIdentifier.builder()
342342
.setIdentifierValue(value)
343343
.setIdentifierType(AssetIdTypeEnum.SEDOL));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[
2-
{"fileName":"cdm-sample-files/fis/isla1.xml","excludedPaths":0,"externalPaths":120,"outstandingMappings":15,"validationFailures":37,"qualificationExpectation":{"success":false,"qualifyResults":[],"qualifiableObjectCount":7}}]
2+
{"fileName":"cdm-sample-files/fis/isla1.xml","excludedPaths":0,"externalPaths":120,"outstandingMappings":15,"validationFailures":61,"qualificationExpectation":{"success":false,"qualifyResults":[],"qualifiableObjectCount":7}}]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[
2-
{"fileName":"cdm-sample-files/ore-1-0-39/Vanilla_IR_Swap.xml","excludedPaths":0,"externalPaths":37,"outstandingMappings":27,"validationFailures":42,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"InterestRate_IRSwap_FixedFloat","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}}]
2+
{"fileName":"cdm-sample-files/ore-1-0-39/Vanilla_IR_Swap.xml","excludedPaths":0,"externalPaths":37,"outstandingMappings":27,"validationFailures":44,"qualificationExpectation":{"success":true,"qualifyResults":[{"qualifiedName":"InterestRate_IRSwap_FixedFloat","qualifiedObjectClass":"cdm.product.template.EconomicTerms"}],"qualifiableObjectCount":1}}]

rosetta-source/src/main/resources/functions/business-event/allocation/allocation-func-input.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@
576576
},
577577
"identifierType" : "Other"
578578
} ],
579+
"assetType" : "Other",
579580
"assetClass" : "InterestRate",
580581
"floatingRateIndex" : {
581582
"value" : "EUR-EURIBOR-Telerate"
@@ -606,7 +607,7 @@
606607
}
607608
},
608609
"meta" : {
609-
"globalKey" : "7f34ef05"
610+
"globalKey" : "9e80e65f"
610611
}
611612
} ]
612613
} ],
@@ -767,11 +768,11 @@
767768
}
768769
} ],
769770
"meta" : {
770-
"globalKey" : "b65a7edf"
771+
"globalKey" : "6e775081"
771772
}
772773
},
773774
"meta" : {
774-
"globalKey" : "b65a7edf"
775+
"globalKey" : "6e775081"
775776
}
776777
}
777778
}

rosetta-source/src/main/resources/functions/business-event/allocation/allocation-func-output.json

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,7 @@
578578
},
579579
"identifierType" : "Other"
580580
} ],
581+
"assetType" : "Other",
581582
"assetClass" : "InterestRate",
582583
"floatingRateIndex" : {
583584
"value" : "EUR-EURIBOR-Telerate"
@@ -608,7 +609,7 @@
608609
}
609610
},
610611
"meta" : {
611-
"globalKey" : "7f34ef05"
612+
"globalKey" : "9e80e65f"
612613
}
613614
} ]
614615
} ],
@@ -769,11 +770,11 @@
769770
}
770771
} ],
771772
"meta" : {
772-
"globalKey" : "6c064d26"
773+
"globalKey" : "19c5cbc6"
773774
}
774775
},
775776
"meta" : {
776-
"globalKey" : "6c064d26"
777+
"globalKey" : "19c5cbc6"
777778
}
778779
}
779780
}
@@ -1196,6 +1197,7 @@
11961197
},
11971198
"identifierType" : "Other"
11981199
} ],
1200+
"assetType" : "Other",
11991201
"assetClass" : "InterestRate",
12001202
"floatingRateIndex" : {
12011203
"value" : "EUR-EURIBOR-Telerate"
@@ -1226,7 +1228,7 @@
12261228
}
12271229
},
12281230
"meta" : {
1229-
"globalKey" : "93a1ffed"
1231+
"globalKey" : "17b5f277"
12301232
}
12311233
} ]
12321234
} ],
@@ -1374,11 +1376,11 @@
13741376
}
13751377
} ],
13761378
"meta" : {
1377-
"globalKey" : "6d51d130"
1379+
"globalKey" : "f93c9d0"
13781380
}
13791381
},
13801382
"meta" : {
1381-
"globalKey" : "6d51d130"
1383+
"globalKey" : "f93c9d0"
13821384
}
13831385
}, {
13841386
"trade" : {
@@ -1797,6 +1799,7 @@
17971799
},
17981800
"identifierType" : "Other"
17991801
} ],
1802+
"assetType" : "Other",
18001803
"assetClass" : "InterestRate",
18011804
"floatingRateIndex" : {
18021805
"value" : "EUR-EURIBOR-Telerate"
@@ -1827,7 +1830,7 @@
18271830
}
18281831
},
18291832
"meta" : {
1830-
"globalKey" : "8c3cb371"
1833+
"globalKey" : "3271af73"
18311834
}
18321835
} ]
18331836
} ],
@@ -1975,11 +1978,11 @@
19751978
}
19761979
} ],
19771980
"meta" : {
1978-
"globalKey" : "c4154e13"
1981+
"globalKey" : "afa3efb3"
19791982
}
19801983
},
19811984
"meta" : {
1982-
"globalKey" : "c4154e13"
1985+
"globalKey" : "afa3efb3"
19831986
}
19841987
}, {
19851988
"trade" : {
@@ -2398,6 +2401,7 @@
23982401
},
23992402
"identifierType" : "Other"
24002403
} ],
2404+
"assetType" : "Other",
24012405
"assetClass" : "InterestRate",
24022406
"floatingRateIndex" : {
24032407
"value" : "EUR-EURIBOR-Telerate"
@@ -2428,7 +2432,7 @@
24282432
}
24292433
},
24302434
"meta" : {
2431-
"globalKey" : "2497ea44"
2435+
"globalKey" : "a57d5300"
24322436
}
24332437
} ]
24342438
} ],
@@ -2589,7 +2593,7 @@
25892593
}
25902594
} ],
25912595
"meta" : {
2592-
"globalKey" : "58e4046"
2596+
"globalKey" : "b13c3ca6"
25932597
}
25942598
},
25952599
"state" : {
@@ -2599,10 +2603,10 @@
25992603
"positionState" : "Closed"
26002604
},
26012605
"meta" : {
2602-
"globalKey" : "9ce9ccef"
2606+
"globalKey" : "8e82994f"
26032607
}
26042608
} ],
26052609
"meta" : {
2606-
"globalKey" : "f0ae4b6f"
2610+
"globalKey" : "8aa23335"
26072611
}
26082612
}

rosetta-source/src/main/resources/functions/business-event/clearing/clearing-func-input.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@
517517
},
518518
"identifierType" : "Other"
519519
} ],
520+
"assetType" : "Other",
520521
"assetClass" : "InterestRate",
521522
"floatingRateIndex" : {
522523
"value" : "USD-LIBOR-BBA"
@@ -547,7 +548,7 @@
547548
}
548549
},
549550
"meta" : {
550-
"globalKey" : "2b19d7ea"
551+
"globalKey" : "33dc370e"
551552
}
552553
}, {
553554
"price" : [ {
@@ -789,11 +790,11 @@
789790
}
790791
} ],
791792
"meta" : {
792-
"globalKey" : "6e2ff940"
793+
"globalKey" : "eb1c12ec"
793794
}
794795
},
795796
"meta" : {
796-
"globalKey" : "6e2ff940"
797+
"globalKey" : "eb1c12ec"
797798
}
798799
}
799800
}

0 commit comments

Comments
 (0)