Skip to content

8.0.0-dev.15

Latest

Choose a tag to compare

@ReleaseManagement-BP ReleaseManagement-BP released this 13 Nov 15:30
· 16 commits to master since this release
25eb4ef

Rescale price.derivedQuantity in Create_QuantityChange

Summary

After Create_QuantityChange, PriceQuantity.price.derivedQuantity was being carried through from the BEFORE state unchanged, leaving it stale for equity swaps and any AssetPrice whose price carries a populated derivedQuantity.

For the partial-termination-equity-swap-func example, this showed up as LOT-2 correctly ending at 608,320 Share, but its derivedQuantity remained at the pre-termination 28,469,376 USD instead of rescaling to 22,775,500.80 USD (= 608,320 × 37.44 USD/Share). The same symptom appears on full termination, lot-level increase, and the FpML xccy partial-termination path.

Closes 4909 - the residual observation flagged while investigating here #4929 and.

Change

Introduces a RescaleDerivedQuantity helper in product-common-settlement-func.rosetta and wires it into UpdateAmountForEachMatchingQuantity, so every event routing through Create_QuantityChange (partial/full termination, lot-level increase, compression, allocation, FpML xccy partial termination, etc.) preserves the invariant:

derivedQuantity = quantity × price.value

Guards

Rescaling is deliberately skipped unless all of the following hold:

  • price.derivedQuantity is populated. Otherwise there's nothing to rescale, so spread rows on interest-rate payouts stay untouched.
  • price.perUnitOf matches the sibling quantity's unit. Currency-only PriceQuantity rows on IR payouts stay untouched.
  • The price value itself did not change between the before and updated states.

The last guard protects stock split. Create_StockSplit sends both a new quantity (preShares × adjustmentRatio) and a new price (prePrice / adjustmentRatio) through the primitive. Total notional is already preserved by construction, so recomputing newQty × newPrice would only reintroduce rounding error from the non-terminating BigDecimal division (e.g. 37.44 / 0.23) and break the "before and after must have the same notional" assertion in BusinessEventExecutionTest.mustCreateStockSplitBusinessEventAcceptedWorkflowStep.

Backward compatibility

Area Impact
Wire / schema No type changes. Existing serialized CDM instances still round-trip.
Function API Create_QuantityChange, UpdateAmountForEachMatchingQuantity, UpdatePriceAmountForEachMatchingQuantity and UpdateQuantityAmountForEachMatchingQuantity keep their signatures. RescaleDerivedQuantity is additive.
Semantic This is a behaviour change for consumers who treated price.derivedQuantity as an immutable execution-time snapshot. For everyone else (IR / FX / credit samples with no derivedQuantity, or equity samples that expected derivedQuantity = quantity × price.value), this is a bug fix.

resolves #5014

Proposed Enhancement to the Common Domain Model

Background

Issue #5014 reports that FX exotic options ingested from FpML were labelled incorrectly. The FpML mappings did not populate OptionPayout.feature, so the qualification functions could not distinguish a barrier, touch or average-rate option from a plain vanilla. Qualify_ForeignExchange_VanillaOption also deliberately accepted options carrying only an averagingFeature. FX digital (touch) options were mapped without an underlier, so they failed Qualify_AssetClass_ForeignExchange and received no ISDA label.

Changes

Ingestion mapping

  • ingest-fpml-confirmation-product-fxoption-func.rosetta
    • MapFxOptionPayout now populates feature.barrier from FpML <features><barrier> and feature.averagingFeature from <features><asian>.
    • Barrier trigger levels carry unit / perUnitOf derived from the barrier's quotedCurrencyPair.
    • averagingFeature.averagingCalculation is populated. isWeighted is derived from the presence of rateObservation/averageRateWeightingFactor. FpML does not carry the averaging method or rounding for FX average-rate options, so these default to Arithmetic and Nearest (market convention for FX average-rate options).
  • ingest-fpml-confirmation-product-fxdigitaloption-func.rosetta
    • MapFxDigitalOptionPayout now populates feature.barrier from FpML <touch> (Touch → knockIn, Notouch → knockOut). Trigger levels carry unit / perUnitOf from the touch's quotedCurrencyPair.
    • The underlier is mapped as Cash in the base currency of the touch's quotedCurrencyPair, using the same convention as vanilla FX options, where the underlier is the strike's perUnitOf currency. It is only mapped when a <touch> is present.

Qualification (product-qualification-func.rosetta)

  • New Qualify_ForeignExchange_SimpleExotic_Barrier: FX option with a barrier, underlier and strike.
  • New Qualify_ForeignExchange_SimpleExotic_Digital: FX option with a barrier and no strike (binary / touch).
  • New Qualify_ForeignExchange_SimpleExotic_Asian: FX option with an averaging feature, underlier and strike.
  • Qualify_ForeignExchange_VanillaOption now requires feature is absent. The averagingFeature only exists carve-out is removed, so average-rate options no longer qualify as both vanilla and Asian.

Samples / expectations

  • Regenerated 21 FX trade-state outputs across fpml-5-10, fpml-5-12 and fpml-5-13 (fx-ex12, 13, 16–22) and the 5 corresponding test-pack-translate-* configs.

Documentation

  • New ingest/README-INCOMPLETE-SAMPLES.md lists the input/*incomplete-* sample folders and explains why their FpML→CDM ingestion is not yet complete (per the CRWG decision of 29 Sep 2026). It sits outside ingest/input/ because the test-pack writer parses every file in those folders as FpML.

Backward Compatibility

Area Impact
Wire / schema None. No types or attributes added, removed or changed.
Function API Additive: three new qualification functions. No signatures changed.
Semantic / qualification Behaviour change. FX barrier options now qualify as ForeignExchange_SimpleExotic_Barrier and average-rate options as ForeignExchange_SimpleExotic_Asian; both were previously ForeignExchange_VanillaOption. FX touch / no-touch options now qualify as ForeignExchange_SimpleExotic_Digital; they previously had no ISDA label. Any FX option carrying an averagingFeature no longer qualifies as ForeignExchange_VanillaOption. Ingested FX digital options now carry an underlier.
Expectations modelValidationFailures is unchanged for the barrier and average-rate samples. It improves by 1 for the touch samples fx-ex16–19, which now have an underlier. No runtime errors.

Cross reference

This PR: to be added · Issue: #5014

Supporting Documentation

  • CRWG decision (29 Sep 2026): document why the incomplete-* FpML sample folders are not fully mapped.
  • Known gap / follow-up: European digital options (fx-ex14, fx-ex15) use FpML <trigger> rather than <touch>. They are not mapped by this PR and still receive no ISDA label.
  • Defaulted values: averagingCalculation.averagingMethod.calculationMethod = Arithmetic and precision.roundingDirection = Nearest are defaults, not sourced from FpML. Reviewers may prefer making AveragingFeature.averagingCalculation optional instead; happy to change.

Product Model - Make party roles optional for Cash

Background

Where a TransferableProduct contains an asset that is Cash it does not need to enforce the setting of the productPartyRole nor the partyRole under the asset itself.

What is being released?

Changes:

  • productPartyRole in TransferableProduct has been changed from (1..1) to (0..1) cardinality i.e. it is now optional
  • a new PartyRolesExist condition has been added that ensures that the productPartyRole and the partyRole under the asset are set for all assets other than Cash i.e. Commodity, DigitalAsset, Instrument
  • the AssetPartyRoleExists condition has been removed as the logic has been rolled into the new PartyRolesExist condition
  • the description for AssetPayout has been slightly modified

Review Directions

Changes can be reviewed in PR: #5207