Background
As BusinessEvents, which change the state of key CDM objects like TradeState, are predefined by generally agreed operational models and executed via equally well understood logic, a CDM Instruction Composition represents the codification of business and legal logic derived from market standards to establish or calculate certain facts or other data.
In the case of the Reset Instruction Composition, this logic is derived from the ISDA 2021 Interest Rate Definitions and the supplementary Floating Rate Matrix, providing the business and legal logic to calculate the value to be used in a Reset business Event.
Thus the Reset Instruction Composition Model specifically provides a modular framework designed to orchestrate the construction of a Reset Instruction.
The framework is built on the following pillars:
- Discrete steps - The InstructionComposition object evolves through CompositionSteps, each representing a logical addition derived from ISDA definitions
- Decoupled execution - Execution flow is decoupled from business logic, utilizing reusable functions for specific calculations
- Persistent history - A CompositionState records every executed step, serving as the single source of truth and providing a full audit trail
Proposal
Objective
The objective is to implement the core functions that define the framework’s overall processing flow (NB: there will be a separate issue/pull request for each Composition Step Instruction in the framework).The framework is a discrete, step-based system where each instruction performs a field-level overlay to update the shared step history without losing prior state.
Scope
- Core Functions: Functional implementation of Create_InstructionComposition, AddStepToState, and NextCompositionStepToExecute
- Reset Specific Implementation Functions: Process-specific logic for UpdateResetInstructionCompositionState and ResetInstructionNextStep
- Audit Trail: A validated CompositionState object with date allowing reconstruction of any prior state in the process
Detailed Process
We have developed the following functions to manage the process flow of a Instruction Composition:
1. Step Execution
- [func] Create_InstructionComposition
- Generates a new CompositionStep with a unique identifier and execution timestamp
- Updates the cumulative CompositionState by applying the current instruction's data
- Reconstructs the full InstructionComposition object, preserving the audit trail
2. State Transition Logic
- [func] AddStepToState
- Acts as a router that directs the incoming instruction to the process-specific update logic (in this case, Reset)
- [func] UpdateResetInstructionCompositionState
- Implements deterministic state persistence via field-by-field overlay
- Logic: If the new instruction provides a value, that value updates the history, otherwise, the previous value is carried forward. This ensures the history grows in completeness as the lifecycle progresses
3. Process Flow & Sequencing
- [func] NextCompositionStepToExecute
- Inspects the current state of the contract to determine if the process is ongoing or complete
- [func] ResetInstructionNextStep
- A state-machine evaluator that compares CompositionState against business-defined milestones
- Identifies the specific Instruction Enum required to fill data gaps
- Manages transitions from "Data Collection" to "Final Output Generation"
Outputs
Each generated instruction is then used to create the InstructionComposition using the Create_InstructionComposition, which records the Instruction data in the Composition State.
The output of the Create_InstructionComposition should then be:
- Instruction Composition containing:
- A New Composition Step
- Composition Step Identifier
- Timestamp
- Current Step Instruction
- [All the previous Composition Steps (and previous common data)]
- Trade Identifier
- Instruction Composition Type
- Instruction Composition Identifier
- Composition State
- Current Step Instruction Data (each field will be displayed individually)
- [Previous Step Instructions Data]
- Instruction Composition Output (just populated at the end of the Instruction Composition process)
The output of the NextCompositionStepToExecute should then be:
- An enumeration value with the next step to execute defined in a list, we will have one for each Instruction Composition type
Compatibility
New functions that do not affect the current model. However this issue is dependant on #4165
Release
CDM Version 7
Additional Context
No response
Background
As BusinessEvents, which change the state of key CDM objects like TradeState, are predefined by generally agreed operational models and executed via equally well understood logic, a CDM Instruction Composition represents the codification of business and legal logic derived from market standards to establish or calculate certain facts or other data.
In the case of the Reset Instruction Composition, this logic is derived from the ISDA 2021 Interest Rate Definitions and the supplementary Floating Rate Matrix, providing the business and legal logic to calculate the value to be used in a Reset business Event.
Thus the Reset Instruction Composition Model specifically provides a modular framework designed to orchestrate the construction of a Reset Instruction.
The framework is built on the following pillars:
Proposal
Objective
The objective is to implement the core functions that define the framework’s overall processing flow (NB: there will be a separate issue/pull request for each Composition Step Instruction in the framework).The framework is a discrete, step-based system where each instruction performs a field-level overlay to update the shared step history without losing prior state.
Scope
Detailed Process
We have developed the following functions to manage the process flow of a Instruction Composition:
1. Step Execution
2. State Transition Logic
3. Process Flow & Sequencing
Outputs
Each generated instruction is then used to create the InstructionComposition using the Create_InstructionComposition, which records the Instruction data in the Composition State.
The output of the Create_InstructionComposition should then be:
The output of the NextCompositionStepToExecute should then be:
Compatibility
New functions that do not affect the current model. However this issue is dependant on #4165
Release
CDM Version 7
Additional Context
No response