finos / common-domain-model

The CDM is a model for financial products, trades in those products, and the lifecycle events of those trades. It is an open source standard that aligns data, systems and processes and is available as code in multiple languages for easy implementation across technologies.
Other
139 stars 59 forks source link

FRAGMOS - ObservationTerms & ValuationTerms #3058

Closed JBZ-Fragmos closed 2 months ago

JBZ-Fragmos commented 3 months ago

Background

We consider that both observation terms and valuation terms are generic features to any payout type to be populated on business case basis, therefore should not be restricted to particular types.

As of today ObservationTerms is only an attribute of OptionPayout and of PerformancePayout, and ValuationDates is only an attribute of PerformancePayout. We beleive all other types of payout may need to use such attributes.

To provide at least one example among many other possible ones, let's consider forwardPayout :

That is to illustrate that the need for observation or valuation terms is not driven by the type of the payout, but by the business usage and other features of the product to be considered in addition to the core payout type, given context.

Main Proposal - PayoutBase

Related PR https://github.com/finos/common-domain-model/pull/3051

image main refactoring notably results in increasing consistency of current PayoutBase i.e. all kinds of "terms" are gathered same place i.e. current SettlementTerms are relevantly completed with the new attributes below highlighted : ObservationTerms and ValuationTerms

Additional Refactoring - ObservationTerms

Proposal : to add two attributes, each being an existing type :

image

Additional Refactoring - ObservationSchedule

We are currently missing item for representing manufactured schedule composed of period series (mostly used when period are irregular, thus unlikely calculable based on periodic parameters)

for clarity, there is a component which already exists for similar need i.e. representing manufactured schedule, that is type SchedulePeriod, however, this type is too specific because it was fined-tuned especially for commodityPayout (thus includes additional specific attributes for commos such as "deliveryPeriod", "fixingDates" and "paymentDates", etc.), so we cannot re-use type SchedulePeriod as it is, hence proposal to create new type to meet core need to represent a set of schedule periods, but with no other any extra features.

Proposal :

Additional Refactoring - ObservationDates

new Enum image

Additional Refactoring - ValuationDates + PerformanceValuationDates

here is recap of situation today :

image

compare with change proposal :

image image

Changes proposals are furthed detailed below.

Additional Refactoring - ValuationDates

Additional Refactoring - PerformanceValuationDates

Compatibility

Renaming, as well as moving existing items, involved update in mapping Accordingly, the set of changes proposed is not backward-compatible - hence proposal to push it under Dev

JBZ-Fragmos commented 2 months ago

in accordance with next steps which resulted from presenting this Github Issue to last DPBE Meeting https://github.com/finos/common-domain-model/issues/3080 :

commodityPayout

calculationPeriodDates may be removed => replaced by the same type already existing in ObservationTerms image

pricingDates may be removed => replaced by the same in ObservationTerms, since both attributes are adequatly covered by similar components in ObservationTerms : parametricDates

specificDates image

specificDates image

only this item may contain redundancy but together with additional specific features

so there are two possibilities to handle this :

would recommand just to add an addition (solution A) but happy to hear otherwise or other suggestions ?

interestRatePayout

image

image

a solution may be to add this condition below : image

in case you would wonder why then just not add observable as an attribute, answer is that it is requried in some cases, for instance in Range accrual, the observable in corridor may not be the same as the rateOption, sometimes it is another rate and/or it may also be another asset tyep, for instance an Equity stock, etc. hence we prefer having observable as an optional attribute and just prevent redundancy with the condition to ensure that only when there is real need to observe another type than rateOption then populating such attribute is permitted

for ALL payout[type]

have added observable direclty at payout root (thus removed out of PayoutBasis->ObservationTerms) with same condition for each below :

image

for clarity, it may at first glance looks like equivalent to have observable remained under ObservationTerms, but when considering as well potential usage under Event model, eventually it seems that this will leave more flexibility in the model not to include Observable inside ObservationTerms

JBZ-Fragmos commented 2 months ago

@lolabeis

i have been reconsidering the original proposal, notably taking into accounts points of attention you have raised about proposal to add these two new attributes in ObserationTerms

as a result, i can effectively see more overlaps than expected (due to work in progress with the ARTF, that i had not sufficiently taken into account in my original proposal)...

so will refactor this proposal, but for clarity prefer closing this one, and start new proposal from clean new ref in github

JBZ-Fragmos commented 2 months ago

new proposal will replace this one

please see : https://github.com/finos/common-domain-model/issues/3114