Skip to content

Conversation

regnosys-prod-user
Copy link
Collaborator

No description provided.

@regnosys-prod-user regnosys-prod-user requested a review from a team as a code owner September 2, 2025 11:02
@regnosys-prod-user
Copy link
Collaborator Author

CDM Event Model - Termination for Schedules

Background

When a termination applies to a quantity schedule, all the dated values from the effective period onwards should be set to zero.

What is being released?

The UpdateQuantityAmountForEachMatchingQuantity function has been enhanced to apply the quantity change to all dated values from the current period onward. A new function UpdateDatedValues has been created to perform the update of the DatedValue.

The period from which the change should take effect is determined using the primitiveInstruction → quantityChange → change → effectiveDate.

Review Directions

Changes can be reviewed in PR: #4001

Note

This comment was generated via Rosetta.

@regnosys-prod-user regnosys-prod-user added the Rosetta Pull requests which can be viewed in Rosetta label Sep 2, 2025
Copy link

netlify bot commented Sep 2, 2025

Deploy Preview for finos-cdm ready!

Name Link
🔨 Latest commit 8373fe8
🔍 Latest deploy log https://app.netlify.com/projects/finos-cdm/deploys/68c19512dd9a010008e4e7a8
😎 Deploy Preview https://deploy-preview-4001--finos-cdm.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

value:
if item -> date >= effectiveDate then (
if direction = QuantityChangeDirectionEnum -> Increase then item -> value + changeAmount
else if direction = QuantityChangeDirectionEnum -> Decrease then item -> value + changeAmount
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is changeAmount going to include the sign e.g. -33? If not then shouldn't this be item -> value - changeAmount.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrisisla totally agree, thank you for pointing that out. The sign has been fixed in this commit: 8373fe8

UpdateQuantityAmountForEachMatchingQuantity(
item,
change -> quantity, // FilterChangePriceQuantity(priceQuantity, change) -> quantity,
change, // FilterChangePriceQuantity(priceQuantity, change),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May as well remove the FilterChangePriceQuantity... comment now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @chrisisla, I think it’s better to keep it, as the comment is still relevant if the function FilterChangePriceQuantity becomes operative in the future. I’ve updated it: before it was FilterChangePriceQuantity -> quantity, and now it just stays at the change level.

quantity NonNegativeQuantitySchedule (0..1) <"List of NonNegativeQuantitySchedule to update.">
[metadata location]
change NonNegativeQuantitySchedule (0..*) <"List of new NonNegativeQuantitySchedule to use where the units match.">
change PriceQuantity (0..*) <"List of new PriceQuantity to use where the units match.">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is accepting a NnonNegativeQuantitySchedule as the source data i.e. a quantity, but you have changed the search term to now be a PriceQuantity i.e. a quantity and a price (and an observable potentially too).

Are we looking to have separate functions to update quantities and prices or is this function going to now be able to update both?

  • If it's the former then we should leave the search term as being a NonNegativeQuantitySchedule i.e. keep it tied to quantities only.
  • If it's the latter then we should consider updating the name of the function to show it operates on either a price or a quantity.

I think we just need a bit more clarity on what the overall goal is for these functions. Do we want an all in one PriceQuantity change function, or separate functions for prices and quantities.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @chrisisla for the comments. I leave the answer we discussed from the CRWG 9th to keep track:

The function input has changed from quantity to PriceQuantity because PriceQuantity corresponds to the type of the higher level (change) that wraps both the quantity and its associated effectiveDate. This is needed to keep the effectiveDate linked with the quantity so that the logic contained in the function has the correct effective date for the applicable quantity, ensuring we don’t lose the linkage between the quantity and the corresponding effective date.

As we agreed, I've added a brief explanation in lines 32 and 81 from the code (see commit fcb608f).

@regnosys-prod-user regnosys-prod-user removed the Rosetta Pull requests which can be viewed in Rosetta label Sep 10, 2025
@regnosys-prod-user
Copy link
Collaborator Author

What is being released?

Comments added in the code.

Note

This comment was generated via Rosetta.

@regnosys-prod-user regnosys-prod-user added the Rosetta Pull requests which can be viewed in Rosetta label Sep 10, 2025
@regnosys-prod-user regnosys-prod-user removed the Rosetta Pull requests which can be viewed in Rosetta label Sep 10, 2025
@regnosys-prod-user
Copy link
Collaborator Author

What is being released?

fixed sign for decrease changed amount

Note

This comment was generated via Rosetta.

@regnosys-prod-user regnosys-prod-user added the Rosetta Pull requests which can be viewed in Rosetta label Sep 10, 2025
Copy link
Contributor

@chrisisla chrisisla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes @gtarres 🙂

@gtarres
Copy link
Contributor

gtarres commented Sep 18, 2025

The mapper in PR #4012, built by @hugohills-regnosys, should be contributed together with this PR since it includes the mapping of the effective date from FpML to the quantity change primitive instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rosetta Pull requests which can be viewed in Rosetta
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing Support for Schedule Quantities in Create_QuantityChange Function
3 participants