Drill-in Configuration

  The drill-in functionality is partially handled on the server side since the 1.2.0 release of FRTB. It can be configured using the corresponding configuration file:* drillInConfig.json,* located in the *frtb-starter/src/main/resources *directory. This section contains an explanation of the structure of the new configuration file and provides a detailed example.

Client Side

The available drill-in actions in the UI are based on the column key of the selected cell* and string matching.* It is important to make sure that a specific action only appears on supported measures. For example, when drilling down to Risk Position from a Risk Charge measure, the Pro-Rata, Euler and Incremental measures are filtered out, as the action is not supported for those. The column key, after an action is selected, gets passed to the server side. In those cases, where there is more than one drill-in action available for a specific cell, an additional drillInType parameter gets passed to the server side, specifying which action has been selected. The drill-in service passes back the hierarchies to be used on the rows and the measure to drill down to. The MDX is then generated on the client side.

Server Side

The aforementioned configuration file: drillInConfig.json consists of an array of json objects. A particular entry will have the following pattern.

drill-in entry in the config.json file

After extracting the measure name from the column key passed in from the UI, an entry is selected based on pattern matching. Let’s assume that the measure passed in is GIRR Delta Risk Position High and the additional drillInType parameter set to *QIS, *so that the above entry is selected. Note that if a drillInType parameter is not passed in, the drillInType part of the json entry is ignored.

Constructing the drill-in measure(s)

A common pattern in the drill-in measures is that, in order to construct the measure name, only a small part of the input measure name string needs to be updated. By using captured name groups, it is possible to extract specific parts of the match and update them. In the above example:

Named capture group Matched string To be replaced by
<drillInParamDoubleSums> Risk Position High Risk Position Double Sums
<drillInParamCorrelations> Risk Position Risk Position Correlations

Hence, the two measures in the drill-in are: GIRR Delta Risk Position, Sums and GIRR Delta Risk Position Correlations High.

Constructing the hierarchies used on the rows

In the case of the hierarchies on the rows, the risk class often appears in the name of the hierarchy. Therefore, taking advantage of the named capture groups again, wherever the string {riskClass} appears, it will be replaced by the string matched by the capture group <riskClass>. In the above example, the <riskClass> capture group matches the string GIRR.

Hence, after the string manipulations, the hierarchies on the rows are: [Buckets].[GIRRBuckets].[GIRR Bucket], [Double Sums].[GIRR Delta Double Sums].[Curve].

Example without named capture groups

Named capture groups make it possible to group together similar use cases (e.g. similar type of action for different risk classes). However, you can specify the drill-in functionality without using named capture groups.

example without named capture groups

The above entry will only match the measure IMCC.D2D and passes the measures [IMCC], and IMCC.D2D together with the hierarchy [Risk].[Risk Classes] back to the UI without modifications.

search.js