Skip to main content
The reference implementation of supports fact-level and roll-over adjustments for the InternalModelApproachCube, IMADRCCube, PLCube and StandardisedApproachCube cubes. As an example of how to configure a new custom adjustment, this page will walk through how PNL adjustments have been defined within the starter module in the frtb-starter/src/main/java/com/activeviam/frtb/starter/signoff/adjustments/ directory.

Configure Adjustment Execution

All adjustment processes are defined within the AdjustmentExecutionConfig.java class. Other library classes are mentioned where relevant.

Fact-level adjustments

Fact-level adjustments are modifications of the underlying data held in the datastore. They operate directly on datastore rows, using Execution objects containing functional components. These functional components are defined in the ExecutionFunctionalComponents.java class.

The Execution object

Add On Execution

  • appliesOnAdjustments is false
  • sourceTagger contains:
    • userInputSourceTagging() - tags the row as direct user input
  • steps contains:
    • doubleInputReplacer() - replaces the initial value with the request input value

Scaling Execution

  • appliesOnAdjustments is true
  • sourceTagger contains:
    • inverseTagging() - tags a row as the inversion of the initial row
    • scaleTagging() - tags the row as a scaling of the initial row
  • steps contains:
    • doubleInverter() - the execution replaces the initial value with its inverse (initialValue * -1.0)
    • doubleScaler() - the execution replaces the initial value with the scaled value (initialValue * scalingFactor)

Override Execution

  • appliesOnAdjustments is true
  • sourceTagger contains:
    • inverseTagging() - tags a row as the inversion of the initial row
    • userInputSourceTagging() - tags the row as direct user input
  • steps contains:
    • doubleInverter() - the execution replaces the initial value with its inverse (initialValue * -1.0)
    • doubleInputReplacer() - replaces the initial value with the request input value

Roll-over adjustments

Roll-over adjustments operate on the datastore, replacing the rows corresponding to the current as-of date with the approved rows from the input as-of date. The executors use the rollOver() method with the following arguments: For the PnL roll-over adjustment, the inverters are as follows:
The inPlaceDoubleOrArrayInverter() function returns input * 1.0 for double inputs and ((IVector) input).scale(-1.0) for IVector inputs.

Include Defined Executions in Executors Map

Now that we have defined our adjustment executions we need to add them to our executors Map which will be accessed by the services defined in the Sign-off API library. We want to include our executors in the bean with the qualifier SP_QUALIFIER__EXECUTORS Note that our executors are included in both profiles.

Define required dimensions for sign-off adjustments

Navigate to PLSignOffAnalysisConfig.java We add SignOff Source Dimension to the appropriate cube in this case PLCube.

Add source tagging fields

This will add extra fields to describe the adjustments and handle the sign-off. Navigate to PLSignOffAnalysisConfig.java

Define the sign-off task store

This store will hold the sign-off task for the sign-off task hierarchy and task filtering. This store is defined from the base cube store and the required levels to filter on. The specific Datastore Schema Description Post-Processor will introspect the cube description and create the sign-off store compatible with the required level. Navigate to PLSignOffAnalysisConfig.java

Define supported Adjustment

Navigate to SupportedAdjustmentsConfig Define a SupportedAdjustmentDTO bean.

Add-on

Scaling

Override

Roll-over