Skip to content

Commit

Permalink
Marc Gratacos Updated Qualifying functions for Known Amount ZC (#2571)
Browse files Browse the repository at this point in the history
* Update RELEASE.md

* Update RELEASE.md

* Update RELEASE.md

* Update RELEASE.md

* Add PR link

* Updated Qualifying functions for Known Amount ZC

Updated the qualifying functions and synonym mappings for Known Amount ZC Swaps.

* Fix CVE scanning (#2561)

* Fixed CVE scan

* Added JAVA_HOME env

* Fixed versioning

* Fixed versioning

* Fixed versioning

* Prevent GitHub Actions from being triggered twice (#2559)

* Corrected action workflows

* Test

* Test

* Fixed

* Cleaned

* Updated Qualifying functions for Known Amount ZC 2

Updated the Qualifying functions for Known Amount Zero Coupon Swaps.

* Revert "Prevent GitHub Actions from being triggered twice (#2559)"

This reverts commit b297b46.

* Revert "Fix CVE scanning (#2561)"

This reverts commit 42aedde.

* Fix release notes

* Add release note

* Fix syntax validation error and update docs code snippet

* Update PR

---------

Co-authored-by: JayasriR <124573358+JayasriR@users.noreply.github.com>
Co-authored-by: eacunaISDA <82891014+eacunaISDA@users.noreply.github.com>
Co-authored-by: lolabeis <leo.labeis@regnosys.com>
Co-authored-by: Marc Gratacos <mgratacos@tradeheader.com>
Co-authored-by: SimonCockx <47859223+SimonCockx@users.noreply.github.com>
  • Loading branch information
6 people authored Dec 1, 2023
1 parent 75bccf8 commit aea4912
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 22 deletions.
38 changes: 36 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ _Review directions_

Inspect formatting changes in the files listed above.

There are no functional changes to the model. In the expectation files, global keys and references have been updated due
to a bug fix, but they remain semantically the same.
There are no functional changes to the model. In the expectation files, global keys and references have been updated due to a bug fix, but they remain semantically the same.

The changes can be reviewed in PR [#2550](https://github.com/finos/common-domain-model/pull/2550).

Expand Down Expand Up @@ -58,3 +57,38 @@ _Review directions_
In the CDM Portal, select the Textual Browser and inspect each of the changes identified above.

PR: [#2552](https://github.com/finos/common-domain-model/pull/2552)

# *Product Model - Qualification Functions for Zero-coupon Swaps*

_Background_

The qualification function for a zero-coupon swap is too restrictive in CDM, since it requires that all the payout legs should feature one unique payment at Term. Normally a zero coupon only points out that at least one leg has a unique payment made at term.

This release fixes this, along with some inaccurate provisions of qualifying functions regarding zero-coupon swaps. In addition, a new `Qualify_Transaction_ZeroCoupon_KnownAmount` function was added to facilitate the classification of Zero Coupon swaps with a Known Amount.

This release also removes the use of conditional synonym mappings from FpML to CDM of the `PrincipalPayments` element for Zero-Coupon Swaps with Known Amount cases. The `Qualify_SubProduct_FixedFloat` qualification function has also been updated to not require the use of this `PrincipalPayments` element.

_What is being released?_

- Minor changes to existing Zero-Coupon Swap qualification functions
- Addition of a new Zero-Coupon Swap Known Amount qualification function
- Removed the conditional synonym mappings from FpML to CDM for the PrincipalPayments element in scenarios with Zero-Coupon Swaps with Known Amount.

_Qualification_

- Updated `Qualify_Transaction_ZeroCoupon` function to accurately qualify Zero-Coupon swaps.
- Updated `Qualify_SubProduct_FixedFloat` function to include Zero-Coupon swaps with Known Amount.
- Updated `Qualify_InterestRate_IRSwap_FixedFloat_ZeroCoupon` function to include Zero-Coupon swaps with Known Amount.
- Updated `Qualify_InterestRate_InflationSwap_FixedFloat_ZeroCoupon` function to include Zero-Coupon swaps with Known Amount.
- Created new `Qualify_Transaction_ZeroCoupon_KnownAmount` function.
- Updated the annotations of `Qualify_InterestRate_IRSwap_FixedFloat_ZeroCoupon`, `Qualify_InterestRate_InflationSwap_FixedFloat_ZeroCoupon` and `Qualify_InterestRate_InflationSwap_Basis_ZeroCoupon` functions to accurately describe the qualified products.

_Translate_

- Deprecated use of synonym mapping from FpML to CDM for the `PrincipalPayments` element for Zero-Coupon Swaps with Known Amount cases.

Review directions

In the CDM Portal, select the Textual Browser and inspect each of the changes identified above.

Inspect Pull Request: [#2571](https://github.com/finos/common-domain-model/pull/2571)
2 changes: 1 addition & 1 deletion docs/product-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -986,7 +986,7 @@ func Qualify_InterestRate_InflationSwap_FixedFloat_ZeroCoupon:
Qualify_BaseProduct_Inflation(economicTerms) = True
and Qualify_BaseProduct_CrossCurrency( economicTerms ) = False
and Qualify_SubProduct_FixedFloat(economicTerms) = True
and Qualify_Transaction_ZeroCoupon(economicTerms) = True
and (Qualify_Transaction_ZeroCoupon(economicTerms) = True or Qualify_Transaction_ZeroCoupon_KnownAmount(economicTerms) = True)
```

If all the statements above are true, then the function evaluates to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ synonym source FpML_5_Confirmation_To_TradeState extends FpML
[value "calculation" path "calculationPeriodAmount" mapper "FloatingRateCalculation"]
[value "fixedRateSchedule" path "calculationPeriodAmount->calculation"]
[value "spreadSchedule" path "calculationPeriodAmount->calculation->floatingRateCalculation"]
[value "knownAmountSchedule" path "calculationPeriodAmount"]
// For FRAs:
[hint "fixedRate"]
// For Credit:
Expand Down Expand Up @@ -665,7 +666,6 @@ synonym source FpML_5_Confirmation_To_TradeState extends FpML
[value "notionalStepSchedule" path "calculationPeriodAmount->calculation->notionalSchedule"]
[value "fxLinkedNotionalSchedule" path "calculationPeriodAmount->calculation"]
[value "futureValueNotional" path "calculationPeriodAmount->calculation"]
[value "knownAmountSchedule" path "calculationPeriodAmount"]
[value "notionalAmount"]
// For FRAs:
[value "notional"]
Expand Down Expand Up @@ -825,13 +825,10 @@ synonym source FpML_5_Confirmation_To_TradeState extends FpML
[value "PrincipalExchanges" meta "id"]
+ initialPayment
[value "initialExchange"]
[set to False when "knownAmountSchedule" exists]
+ finalPayment
[value "finalExchange"]
[set to True when "knownAmountSchedule" exists]
+ intermediatePayment
[value "intermediateExchange"]
[set to False when "knownAmountSchedule" exists]
+ principalPaymentSchedule
[value "cashflows" mapper "PrincipalPaymentSchedule"]

Expand Down Expand Up @@ -2311,6 +2308,7 @@ synonym source FpML_5_Confirmation_To_TradeState extends FpML
// For Swap Stream:
[value "calculation" path "calculationPeriodAmount"]
[value "fxLinkedNotionalSchedule" path "calculationPeriodAmount->calculation"]
[value "knownAmountSchedule" path "calculationPeriodAmount"]
// For FRAs:
[hint "notional"]
// For the interest leg of Equity Swap:
Expand Down
41 changes: 26 additions & 15 deletions rosetta-source/src/main/rosetta/product-qualification-func.rosetta
Original file line number Diff line number Diff line change
Expand Up @@ -910,15 +910,15 @@ func Qualify_SubProduct_FixedFloat: <"Qualifies a product as having the Sub Prod

set is_product:
(economicTerms -> payout -> interestRatePayout -> rateSpecification -> fixedRate count = 1
and economicTerms -> payout -> interestRatePayout -> rateSpecification -> floatingRate count = 1)
or (economicTerms -> payout -> interestRatePayout -> rateSpecification -> fixedRate count = 1
and economicTerms -> payout -> interestRatePayout -> rateSpecification -> inflationRate count = 1)
or ((economicTerms -> payout -> interestRatePayout -> rateSpecification -> fixedRate is absent
and economicTerms -> payout -> interestRatePayout -> principalPayment -> finalPayment only-element = True)
and (economicTerms -> payout -> interestRatePayout -> rateSpecification -> floatingRate count = 1
or economicTerms -> payout -> interestRatePayout -> rateSpecification -> inflationRate count = 1))
and economicTerms -> payout -> interestRatePayout -> rateSpecification -> floatingRate count = 1)
or (economicTerms -> payout -> interestRatePayout -> rateSpecification -> fixedRate count = 1
and economicTerms -> payout -> interestRatePayout -> rateSpecification -> inflationRate count = 1)
or ((economicTerms -> payout -> interestRatePayout -> rateSpecification -> floatingRate count = 1
or economicTerms -> payout -> interestRatePayout -> rateSpecification -> inflationRate count = 1)
and (economicTerms -> payout -> interestRatePayout
filter rateSpecification is absent and priceQuantity exists then count = 1))

func Qualify_SubProduct_FixedFixed: <"Qualifies a product as having the Sub Product classification Fixed Float">
func Qualify_SubProduct_FixedFixed: <"Qualifies a product as having the Sub Product classification Fixed Fixed">
inputs:
economicTerms EconomicTerms (1..1)
output:
Expand All @@ -943,8 +943,19 @@ func Qualify_Transaction_ZeroCoupon: <"Qualifies a product as having the Transac
output:
is_product boolean (1..1)
set is_product:
economicTerms -> payout -> interestRatePayout -> paymentDates -> paymentFrequency -> periodMultiplier all = 1
and economicTerms -> payout -> interestRatePayout -> paymentDates -> paymentFrequency -> period all = PeriodExtendedEnum -> T
economicTerms -> payout -> interestRatePayout -> paymentDates -> paymentFrequency
filter item -> periodMultiplier = 1 and item -> period = PeriodExtendedEnum -> T then exists

func Qualify_Transaction_ZeroCoupon_KnownAmount: <"Qualifies a product as having the Transaction classification Zero Coupon with a Known Amount. This category applies to a Zero Coupon Swap in which the fixed leg pays a known amount at maturity.">
inputs:
economicTerms EconomicTerms (1..1)
output:
is_product boolean (1..1)
set is_product:
Qualify_SubProduct_FixedFloat(economicTerms) = True and
Qualify_Transaction_ZeroCoupon(economicTerms) = True and
(economicTerms -> payout -> interestRatePayout
filter item -> priceQuantity exists and rateSpecification is absent and paymentDates -> paymentFrequency -> periodMultiplier = 1 and paymentDates -> paymentFrequency -> period = PeriodExtendedEnum -> T then exists)

func Qualify_Transaction_YoY: <"Qualifies a product as having the Transaction classification Year on Year">
inputs:
Expand Down Expand Up @@ -1084,7 +1095,7 @@ func Qualify_InterestRate_IRSwap_Basis: <"Qualifies a product as a Basis (Float-
and Qualify_SubProduct_Basis(economicTerms) = True
and Qualify_Transaction_OIS(economicTerms) = False

func Qualify_InterestRate_IRSwap_FixedFloat_ZeroCoupon: <"Qualifies a product as a Fixed-Float Zero Coupon Interest Rate Swap based on the economic terms and the following criteria: 1) An interest rate product with one fixed and one floating leg and more than one payment, 2) without inflation features or cross-currency features, and 3) where the floating leg is not based on an OIS index.">
func Qualify_InterestRate_IRSwap_FixedFloat_ZeroCoupon: <"Qualifies a product as a Fixed-Float Zero Coupon Interest Rate Swap based on the economic terms and the following criteria: 1) An interest rate product with one fixed and one floating leg, 2) where the fixed leg represents one singular payment agreed upon execution and to be made at maturity, 3) where the floating leg is not based on an OIS index and 4) without any inflation features or cross-currency features.">
[qualification Product]
inputs:
economicTerms EconomicTerms (1..1)
Expand All @@ -1095,7 +1106,7 @@ func Qualify_InterestRate_IRSwap_FixedFloat_ZeroCoupon: <"Qualifies a product as
set is_product:
Qualify_BaseProduct_IRSwap(economicTerms) = True
and Qualify_SubProduct_FixedFloat(economicTerms) = True
and Qualify_Transaction_ZeroCoupon(economicTerms) = True
and (Qualify_Transaction_ZeroCoupon(economicTerms) = True or Qualify_Transaction_ZeroCoupon_KnownAmount(economicTerms) = True)
and Qualify_Transaction_OIS(economicTerms) = False

func Qualify_InterestRate_IRSwap_FixedFloat_OIS: <"Qualifies a product as a Fixed-Float OIS Interest Rate Swap based on the economic terms and the following criteria: 1) An interest rate product with one fixed and one floating leg and more than one payment and where the floating leg is based on an OIS index, 2) without inflation features or cross-currency features, and 3) could include 'zero coupon' features.">
Expand Down Expand Up @@ -1191,7 +1202,7 @@ func Qualify_InterestRate_InflationSwap_FixedFloat_YearOn_Year: <"Qualifies a pr
* and Qualify_InterestRate_InflationSwap_Basis_ZeroCoupon (economicTerms) = False
* and Qualify_InterestRate_InflationSwap_Basis_YearOn_Year (economicTerms) = False
*/
func Qualify_InterestRate_InflationSwap_FixedFloat_ZeroCoupon: <"Qualifies a product as a Fixed-Float Inflation Swap with a single accrual period based on the economic terms and the following criteria: 1) An interest rate product with one fixed and one inflation rate leg and more than one payment, and 2) without cross-currency features.">
func Qualify_InterestRate_InflationSwap_FixedFloat_ZeroCoupon: <"Qualifies a product as a Fixed-Float Inflation Swap based on the economic terms and the following criteria: 1) An interest rate product with one fixed and one inflation rate leg, 2) where the fixed leg represents one singular payment agreed upon execution and to be made at maturity, 3) where the inflation leg features an inflation floating rate and 4) without cross-currency features.">
[qualification Product]
inputs:
economicTerms EconomicTerms (1..1)
Expand All @@ -1203,7 +1214,7 @@ func Qualify_InterestRate_InflationSwap_FixedFloat_ZeroCoupon: <"Qualifies a pro
Qualify_BaseProduct_Inflation(economicTerms) = True
and Qualify_BaseProduct_CrossCurrency(economicTerms) = False
and Qualify_SubProduct_FixedFloat(economicTerms) = True
and Qualify_Transaction_ZeroCoupon(economicTerms) = True
and (Qualify_Transaction_ZeroCoupon(economicTerms) = True or Qualify_Transaction_ZeroCoupon_KnownAmount(economicTerms) = True)

func Qualify_InterestRate_InflationSwap_Basis_YearOn_Year: <"Qualifies a product as a Basis (Float-Float) Annual Reset Inflation Swap based on the economic terms and the following criteria: 1) An interest rate product with one floating interest rate leg and one inflation rate leg and more than one payment, and 2) without cross-currency features or 'zero coupon' features.">
[qualification Product]
Expand All @@ -1219,7 +1230,7 @@ func Qualify_InterestRate_InflationSwap_Basis_YearOn_Year: <"Qualifies a product
and Qualify_SubProduct_Basis(economicTerms) = True
and Qualify_Transaction_YoY(economicTerms) = True

func Qualify_InterestRate_InflationSwap_Basis_ZeroCoupon: <"Qualifies a product as a Basis (Float-Float) Inflation Swap with a single accrual period based on the economic terms and the following criteria: 1) An interest rate product with one floating interest rate leg and one inflation rate leg and more than one payment, and 2) without cross-currency features or 'zero coupon' features.">
func Qualify_InterestRate_InflationSwap_Basis_ZeroCoupon: <"Qualifies a product as a Basis (Float-Float) Inflation Swap based on the economic terms and the following criteria: 1) An interest rate product with one floating interest rate leg and one inflation interest rate leg, 2) where the floating leg is not based on an OIS index, 3) where the inflation leg features an inflation floating rate, 4) where an interest rate payout is made at maturity into a singular payment and 5) without cross-currency features.">
[qualification Product]
inputs:
economicTerms EconomicTerms (1..1)
Expand Down

0 comments on commit aea4912

Please sign in to comment.