Skip to content

Chris Rayner Event Model - Support for Rate Changes on Securities Lending trades#4690

Open
regnosys-prod-user wants to merge 2 commits into
finos:masterfrom
rosetta-models:chris_6218a76c221be60071967b9-RateChangePriceQuantityV3
Open

Chris Rayner Event Model - Support for Rate Changes on Securities Lending trades#4690
regnosys-prod-user wants to merge 2 commits into
finos:masterfrom
rosetta-models:chris_6218a76c221be60071967b9-RateChangePriceQuantityV3

Conversation

@regnosys-prod-user
Copy link
Copy Markdown
Collaborator

No description provided.

@regnosys-prod-user
Copy link
Copy Markdown
Collaborator Author

regnosys-prod-user commented May 7, 2026

Event Model - Support for Rate Changes on Securities Lending trades

Background

The processing of the QuantityChange primitive instruction is being enhanced to support the entry and maintenance of a schedule of interest rates in a PriceSchedule using the datedValue list.

What is being released?

The key changes are as follows:

Function UpdatePriceAmountForEachMatchingQuantity

  • Now expects a PriceQuantity rather than a Priceas input
  • Calls a new UpdateDatedValue function to update a datedValue entry if one already exists for the effective date of the price change
  • Calls a new InsertDatedValue function to insert a new entry in the datedValue list if one does not exist already for the given effective date
  • The original functionality to update the value in a PriceSchedule remains unchanged

Function PriceUnitEquals

  • Has been enhanced to take the priceSubType into account when comparing two PriceSchedule instances

Function UpdateDatedValue

  • New function to update only those entries in a datedValue list that have a date that matches the effectiveDate passed in.
  • Note: There is an existing function UpdateDatedValues which will update any entries in datedValue whose date is greater than or equal to the effectiveDate. This is not the required processing for price (rate) changes so it was felt that creating a separate function would have less impact on existing use cases.

Function InsertDatedValue

  • New function to insert a new entry into a datedValue list based upon the effectiveDate that was passed in.
  • Supports prefixing where the effectiveDate is prior to the earliest date in the datedValue list, and appending where the effectiveDate is after the latest date in the datedValue list
  • Note: as per the comment on the type, the datedValue list is expected to be maintained in ascending date order

Review Directions

Changes can be reviewed in PR: #4690

Note

This comment was generated via Rosetta.

@regnosys-prod-user regnosys-prod-user requested a review from a team as a code owner May 7, 2026 14:48
@regnosys-prod-user regnosys-prod-user added the Rosetta Pull requests which can be viewed in Rosetta label May 7, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 7, 2026

Deploy Preview for finos-cdm ready!

Name Link
🔨 Latest commit 146dc0b
🔍 Latest deploy log https://app.netlify.com/projects/finos-cdm/deploys/6a105987fe20fa000851e41d
😎 Deploy Preview https://deploy-preview-4690--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.

alias changeMatching: <"Locate the first PriceQuantity item where the attributes in the existing and the new price match.">
change
filter PriceUnitEquals(item, price)
filter PriceUnitEquals(item -> price only-element, price)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Only element is assuming the change will only have one price schedule inside it - is this intentional?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This could be an alternative...but I haven't tested it :)

alias changeMatching: 
    change
            filter c [
                c -> price
                    extract PriceUnitEquals(item, price)
                    then only-element
            ]
            then first

This would filter the list of changes (f) where an item in the list of prices within matches the price (and assuming there's only 1 match per change it uses only-element.)

That way if there's multiple price schedules it should still work.

The logic would return a single change with a matching price

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've tested the new suggested approach with my test cases and it does work for those scenarios okay 👍
I will update accordingly

extract
DatedValue {
date: item -> date,
value: if item -> date = effectiveDate
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You could use the UpdateAmount function above and pass in item -> value, changeAmount, and the Direction as arguments.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same for the UpdateDatedValues function below

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good call, I will update both the UpdateDatedValue and UpdatedDatedValues functions.

}
else
previousDatedValue
extract
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very minor, but the previousDatedValue extract isn't necessary here - you can just go straight into creating the DateValue type.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And replace item with previousDatedValue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I had a bit of trouble with this. If I took the extract out then I was getting new DatedValue items created with the value as null. This was because where previousDatedValue was empty, the extract was catering for the fact there were no dates to loop through and thus not adding any new items. When I took the extract out, null entries started to appear.

To correct this I have updated the test on previousDatedValue to check for is absent and added a test in the else clause for previousDatedValue exists. This works okay.

@regnosys-prod-user
Copy link
Copy Markdown
Collaborator Author

What is being released?

Changes from review comments

Note

This comment was generated via Rosetta.

@regnosys-prod-user regnosys-prod-user added Rosetta Pull requests which can be viewed in Rosetta and removed Rosetta Pull requests which can be viewed in Rosetta labels May 22, 2026
ReleaseManagement-BP pushed a commit that referenced this pull request May 26, 2026
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.

Support for Rate Changes on Securities Lending trades

3 participants