Migration notes 4.0
This page explains the changes required to migrate to the stated version of the FRTB Accelerator.
Migrate to 4.0
Upgrading from version 3.1 - See FRTB Accelerator 4.0 Release Notes.
The Accelerator is using ActivePivot 5.10.6 and ActiveUI 5.0.7.
For new features and fixes included in these releases, please see the ActiveUI documentation and ActiveUI Migration Notes, and the release notes for ActivePivot.
For clients licensed to use ActiveMonitor, a skeleton module based on version 5.10.6 is included with the FRTB Accelerator 4.0.0 release.
Breaking Changes
PL trade-level and summary cubes and have been overhauled. Input files have been modified and measures have been moved & modified.
WhatIf Changes
-
PST-735: Added support for BranchPermissions on WhatIf branches:
- The
FRTBWhatIfSecurityManager
now contains two new methods to enable BranchPermissions for What-If created branches, and another to configure the branch permissions. The default behavior is to only allow the creator of a What-If branch to modify/delete that branch - other users will not be able to modify/delete. This can be configured or disabled by extendingFRTBWhatIfSecurityManager
.
- The
-
GENACL-591: Standardized WhatIf’s RESTful response messages to UI:
- The response message sent back to the UI after What-If operations has been modified so that on errors a standardized body sends back
WhatIfStatus.FAILED
“FAILED” orWhatIfStatus.UNAUTHORISED
“UNAUTHORISED”. This way the UI can properly handle when there are Errors with What-If branch management.
- The response message sent back to the UI after What-If operations has been modified so that on errors a standardized body sends back
PL cubes
PL Summary Cube
- Added input for VaR P&L Vector
- Removed VaR and p-value inputs (now calculated at query time)
- Now requires scenarios file to describe vertices in PL Vector
- Backtesting & PLAT measures (Spearman Correlation Metric, Kolmogorov-Smirnov Test Metric, Lookback measures, Exception counts and dates) have been moved to FRTBCombinedCube where they use data from both the trade-level PL cube and PL Summary cube
PL Cube
- Added inputs for APL, HPL, and RTPL
Integration of the Sign-Off module
-
Integration of the interfaces allowing interaction with the Sign-Off Module (signoff-ext) Implementation details can be found in Sign-off API implementation notes.
-
Profile for Sign-off functionality : The
enable-signoff
Spring Profile has been added to the FRTB Accelerator, grouping all Sign-off functionality into a single toggled configuration.
Input file formats
Added
File | Details |
---|---|
PL Summary Scenarios | For the summary cube, scenarios files are now required which label every entry in the VaR P&L Vector |
Modified
Modification | File | Field | Optional | Description |
---|---|---|---|---|
Added | PL VaR Vector | Actual PL | Actual PL | |
Added | PL VaR Vector | Hypothetical PL | Hypothetical PL | |
Added | PL VaR Vector | Risk Theoretical PL | Risk Theoretical PL | |
Added | PL Summary | PnL | VaR P&L Vector | |
Added | PL Summary | Book | Book | |
Added | PL Summary | Legal Entity | Legal Entity | |
Deleted | PL Summary | Desk | Replaced by Book & Legal Entity | |
Deleted | PL Summary | VaR 99 | Measure calculated at query runtime from Var P&L Vector | |
Deleted | PL Summary | VaR 97.5 | Measure calculated at query runtime from Var P&L Vector | |
Deleted | PL Summary | p-value Actual | Measure calculated at query runtime from Var P&L Vector | |
Deleted | PL Summary | p-value Hypothetical | Measure calculated at query runtime from Var P&L Vector | |
Added | Curvature | PresentValue | Y | The (unshocked) Present Value of the instrument |
Deprecated | Trade Attributes | PresentValue | Y | Use PresentValue in Curvature and DRC Trade Level (SA) files instead |
Deprecated | Trade Attributes | Notional | Y | For DRC use Notional in DRC files. This value is still in use for RRAO. |
Configuration files
Files Added
signoff.properties
Added signoff.properties file containing specific parameters for sign-off operations.
sign-off-export-properties.md
Added signoff.export.properties file containing specific parameters for sign-off export operations.
Files Modified
frtb.properties
New properties:
Property Name | Value | Comment |
---|---|---|
data.extraction.service.base.dir.path |
./ |
Path to the folder in which the files will be generated for the extractions |
data.extraction.service.http.base.url |
http://localhost:8080 |
URL mount point to access the folder as a Web File Server for the extractions |
enhanced.drillthrough.base.dir.path |
./src/main/resources/DEEDrillthroughs |
Drillthrough directory (mandatory prop for DEE not used by FRTB currently) |
enhanced.drillthrough.http.base.url |
http://localhost:8080 |
URL mount point to access the folder as a Web FIle Server for drillthroughs (mandatory prop for DEE not used by FRTB currently) |
data.extraction.templates.base.dir.path |
./src/main/resources/DEETemplateOrders |
Path to the folder holding the JSON order template files |
data.extraction.service.with.user.folders |
false |
Include the user name in the folder path generated. Ex: /Output/User1/extraction.csv |
signoff.extraction.templates |
StandardisedApproachCube:CrifExtraction; InternalModelApproachCube:IMACubeExport; PLCube:PLCubeExport;IMADRCCube:IMADRCCubeExport |
Map of cube / list of templates that will be executed at sign-off export stage. The format is like cubeName1:templateName11,templateName12;cubeName2:templateName21 |
generated.files.base.dir.path |
${java.io.tmpdir} |
Base directory path where all the relevant files will be generated. This property is needed by the Download service |
asofdate.level |
AsOfDate@Date@Date |
asofdate level used by Sign-off |
input.data.root.dir.path |
./src/test/resources/data |
Root directory for file-upload what-if |
csvSource.subdirectory.dataset.stage |
/stage |
File-upload staging directory |
csvSource.subdirectory.dataset.whatif |
/whatif |
File-upload what-if directory |
frtb-data-load.properties
New properties:
Property Name | Value | Comment |
---|---|---|
pl.summary.scenarios.file-pattern |
**/PLSummary_Scenarios*.csv |
File loading format and pattern matching for the PLSummary Scenarios input files to the datastore |
frtb-config.properties
New properties:
Property Name | Value | Comment |
---|---|---|
curvature.pv.overridden.level |
Curvature PV Overridden@Curvature PV Overridden@Currencies |
Cube level of Curvature PV Overridden flag |
display-currency.level |
displayCurrency@displayCurrency@displayCurrency |
Cube level for the display currency. |
display-currency.default |
EUR |
The default display currency |
display-currency.sort-order |
EUR,USD,GBP,CHF,JPY,SEK,NOK,CAD |
The display currencies sort order in the displayCurrency level |
drc.sec-ctp.security |
DRC Sec CTP Security@DRC Sec CTP Security@Default Risk Charge |
Cube level of DRC Sec CTP Security |
drc.sec-ctp.seniority |
DRC Sec CTP Seniority@DRC Sec CTP Seniority@Default Risk Charge |
Cube level of DRC Sec CTP Seniority |
drc.sec-ctp.rating |
DRC Sec CTP Rating@DRC Sec CTP Rating@Default Risk Charge |
Cube level of DRC Sec CTP rating |
drc.sec-ctp.attachment |
DRC Sec CTP Attachment@DRC Sec CTP Attachment@Default Risk Charge |
Cube level of DRC Sec CTP Attachment for tranche |
drc.sec-ctp.detachment |
DRC Sec CTP Detachment@DRC Sec CTP Detachment@Default Risk Charge |
Cube level of DRC Sec CTP Detachment for tranche |
drc.sec-ctp.rating.type |
DRC Sec CTP Rating Type@DRC Sec CTP Rating Type@Default Risk Charge |
Cube level of DRC Sec CTP rating type for tranche |
drc.sec-ctp.bucket |
DRC Sec CTP Bucket@DRC Sec CTP Bucket@Default Risk Charge |
Cube level of DRC Sec CTP bucket |
drc.sec-ctp.instrument.type |
DRC Sec CTP Instrument Type@DRC Sec CTP Instrument Type@Default Risk Charge |
Cube level of DRC Sec CTP Instrument Type |
Deleted properties:
Property Name | Comment |
---|---|
context-value.reference-currency.members |
Renamed to display-currency.sort-order |
ctx.reference.ccy |
Renamed to display-currency.default |
application.yaml
New properties:
Property Name | Value | Comment |
---|---|---|
optionality-service.auto-run |
none |
Automatically set the Delta “Optionality” flag after loading certain types of files. Possible values are delta , curvature , crif , all , or none |
Datastores
Added stores
Store | Details |
---|---|
PLTrades | Trade-level PL Store previously called IMAVaRPL |
PLScenarios | Trade-level scenarios which label every entry in the PLTrades VaR P&L Vector |
PLSummaryScenarios | Book- and Legal Entity-level scenarios which label every entry in the PLSummary VaR P&L Vector |
Security | Description of the security (underlying) for SA DRC Sec CTP |
Modified stores
Modification | Store | Field | Type | Description |
---|---|---|---|---|
Added | PLSummary | Book | ||
Added | PLSummary | LegalEntity | ||
Added | PLSummary | PnL | Vector | |
Deleted | PLSummary | Desk | Replaced with Book and Legal Entity | |
Deleted | PLSummary | VaR99 | Now calculated from PnL vector | |
Deleted | PLSummary | VaR975 | Now calculated from PnL vector | |
Deleted | PLSummary | p-Value (Actual) | Now calculated from PnL vector and APL | |
Deleted | PLSummary | p-Value (Hypothetical) | Now calculated from PnL vector and HPL | |
Added | PLTrades | ActualPL | Double | |
Added | PLTrades | HypotheticalPL | Double | |
Added | PLTrades | TheoreticalPL | Double | |
Added | Curvature | PresentValue | Double | Unshocked PV for Curvature calculation (overrides the PV value in the trade attributes) |
Added | Curvature | PresentValueOverridden | Y/N | Indicates if the PV override value is present |
By activating the ‘enable-signoff’ profile, the following fields will be added :
Store | Field | Type | Description |
---|---|---|---|
DRCIMABase | Source | String | Describes the source of the data, for adjustment functionality (e.g Unadjusted, UserAdjustment1) |
DRCIMABase | Input type | String | The type of input for the row (e.g Data load, User input) |
IMATrades | Source | String | Describes the source of the data, for adjustment functionality (e.g Unadjusted, UserAdjustment1) |
IMATrades | Input type | String | The type of input for the row (e.g Data load, User input) |
PLTrades | Source | String | Describes the source of the data, for adjustment functionality (e.g Unadjusted, UserAdjustment1) |
PLTrades | Input type | String | The type of input for the row (e.g Data load, User input) |
TradeBase | Source | String | Describes the source of the data, for adjustment functionality (e.g Unadjusted, UserAdjustment1) |
TradeBase | Input type | String | The type of input for the row (e.g Data load, User input) |
Deleted stores
Store | Details |
---|---|
IMAVaRPL | Replaced by PLTrades |
PL | PL store and PLTrades are now one store |
Cube schema
In the PL Summary Cube, the Desk hierarchy has now been replaced with the Book and Legal Entity hierarchies.
Added
Cube | Dimension | Hierarchy | Levels | Datastore fields | Details |
---|---|---|---|---|---|
All | displayCurrency | displayCurrency | displayCurrency | Display Currency | |
SA | Default Risk Charge | DRC Sec CTP Seniority | DRC Sec CTP Seniority | Security.Seniority | |
SA | Default Risk Charge | DRC Sec CTP Rating | DRC Sec CTP Rating | Security.Rating | |
SA | Default Risk Charge | DRC Sec CTP Security | DRC Sec CTP Security | Security.Security | |
SA | Default Risk Charge | DRC Sec CTP Attachment | DRC Sec CTP Attachment | Security.Attachment | |
SA | Default Risk Charge | DRC Sec CTP Detachment | DRC Sec CTP Detachment | Security.Detachment | |
SA | Default Risk Charge | DRC Sec CTP Rating Type | DRC Sec CTP Rating Type | Security.Type | |
SA | Default Risk Charge | DRC Sec CTP Bucket | DRC Sec CTP Bucket | Security.Bucket | |
SA | Default Risk Charge | DRC Sec CTP Instrument Type | DRC Sec CTP Instrument Type | Security.Instrument Type |
By activating the ‘enable-signoff’ profile, the following dimensions will be added :
Cube | Dimension | Hierarchy | Levels | Datastore fields | Details |
---|---|---|---|---|---|
SA | Sign-Off | Feed | Status/Task | See Sign-Off Analysis Hierarchy | |
IMA | Sign-Off | Feed | Status/Task | Same as above | |
IMA DRC | Sign-Off | Feed | Status/Task | Same as above | |
PL | Sign-Off | Feed | Status/Task | Same as above |
Measures
A number of measures were added to support the DRC Sec CTP calculations, including intermediate values. These measures are:
- DRC Sec CTP Default Risk Charge
- DRC Sec CTP Default Risk Charge Bucket
- DRC Sec CTP HBR Top
- DRC Sec CTP Weighted Net JTD Long/Short
- DRC Sec CTP JTD Weightings
- DRC Sec CTP Net JTD Long/Short
- DRC Sec CTP Scaled Gross JTD
- DRC Sec CTP Gross JTD
Added
PL trade-level cube and PL Summary cube now share the same measure chain. See PL and PLSummary measures
PLAT and Backtesting measures have been moved to the FRTBCombined cube where data is seamlessly tied between trade-level and Summary cubes.
Context values
The ReferenceCurrency context value has been removed and replaced by the displayCurrency analysis hierarchy.
Topic Aliases
The PLSummaryScenarios
topic has been created for loading summary scenario data.
The BookHierarchy
and LegalEntityHierarchy
topics, which build the organisation hierarchies from the parent/child stores, have been moved from the TupleData
alias to the OrganisationData
alias.
Spring Configuration
Preview of support for customizing measures (alpha).
Migrating to Accelerator-sdk v.5
Project Structure Changes
Accelerators based on the activeUI-sdk now have a slightly different project structure. Prior to activeUI 5, the accelerator project was based on a React component called the DesktopApp, which was exported from the accelerator-sdk. ActiveUI 5 projects will now be based on the activeUI5 app, which can be downloaded from the ActiveUI documentation page. Navigate to Docs –> Getting Started to get the latest version of the activeUI starter application.
ActiveUI and the Accelerator-sdk have also been updated to Ant Design 4. Keep this in mind, as you will need to migrate all of your custom code to use Ant Design 4 before migrating over to the new accelerator-sdk.
Installing Dependencies
note
We recommend that you use the latest LTS version of Node 16.x.x for the accelerator projects, even though ActiveUI 5 only requires that you use Node 14.x.x. During development we’ve experienced minor issues using Node Node 14.x.x.
After downloading the activeuI5 app, run these commands in the following order to test that the app works as expected:
1) yarn install
2) yarn build
3) yarn start
The yarn start command opens the project in your browser, displaying a blank ActiveUI5 project.
After confirming that the project starts correctly, add the accelerator-sdk and accelerator-specific packages to your project. You can do this by going to the package.json file of your project, and adding the following dependencies:
"@activeviam/frtb-sdk": "4.0.0",
"@activeviam/accelerator-sdk": "5.0.3",
After adding these dependencies to your package.json, rerun the yarn install command.
Applying accelerator code to your project
Once the dependencies have been installed, add the code from the accelerator-sdk and the accelerator-specific sdk to your application.
The frtb-sdk currently exports the drill-in actions and Desk Switch action from the package.
import { defaultPlugins } from "@activeviam/accelerator-sdk";
import { drillDownToRiskClassesPlugin, deskModelSwitchPlugin } from "@activeviam/frtb-sdk";
After importing the frtb-sdk code, you need to register them in the activeUI5 plugin registry. You can do this by adding them to the widget property on the defaultPlugins object exported from the accelerator-sdk. This is an example of one of the ways to update the widget property:
import _ from "lodash";
import { defaultPlugins } from "@activeviam/accelerator-sdk";
import { drillDownToRiskClassesPlugin, deskModelSwitchPlugin } from "@activeviam/frtb-sdk";
const allPlugins = _.set(
defaultPlugins,
`menu-item.${drillDownToRiskClassesPlugin.key}`,
drillDownToRiskClassesPlugin,
);
_.set(
allPlugins,
`menu-item.${deskModelSwitchPlugin.key}`,
deskModelSwitchPlugin,
);
[pluginWidgetPivotTable, pluginWidgetTreeTable, pluginWidgetTable].forEach(
(tableWidget) => {
tableWidget.menuItems = [
pluginMenuItemRemoveWidget.key,
pluginMenuItemDuplicateWidget.key,
"save-as",
];
tableWidget.titleBarButtons = [
pluginTitleBarButtonFullScreen.key,
pluginTitleBarButtonToggleQueryMode.key,
];
tableWidget.contextMenuItems = [
pluginMenuItemFilterOnEverythingButSelection.key,
drillDownToRiskClassesPlugin.key,
deskModelSwitchPlugin.key,
pluginMenuItemFilterOnSelection.key,
pluginMenuItemOpenDrillthrough.key,
pluginMenuItemSortPivotTableAscendingly.key,
pluginMenuItemSortPivotTableDescendingly.key,
pluginMenuItemRemoveSort.key,
pluginMenuItemCopyQuery.key,
pluginMenuItemShowHideTotals.key,
pluginMenuItemRefreshQuery.key,
pluginMenuItemExportToCsv.key,
pluginMenuPivotTableCompute.key,
pluginRemoveOtherMeasures.key,
pluginPivotTableDayToDay.key,
pluginStorytellingManager.key,
pluginStorytellingAction.key,
pluginTradeScale.key,
];
}
);
After this code, the allPlugins object will contain the drillDownToRiskClasses plugin and deskModelSwitch Plugin. Now, simply pass this into the activeUI plugins extension point:
configuration.pluginRegistry = allPlugins;
Accelerator Settings
For any of the widgets to work in the new activeUI 5 app, certain settings must be set, and registered using the activeUI 5 configuration.higherOrderComponents extension point. The following is an object that represents the settings required for the accelerator to work:
const frtbSettings = {
asOfDateDimensionName: "Dates",
asOfDateHierarchyName: "Date",
tradeDimensionName: "Booking",
tradeHierarchyName: "Trades",
drillinServiceUrl: "/drillin/rest/mdx",
"accelerator_parameter-sets-widget-container.server.whitelist": ["FRTB"],
"accelerator_file-upload.server.whitelist": ["FRTB"],
"accelerator_whatif-manager.server.whitelist": ["FRTB"],
"accelerator_story-telling-action.whitelist": ["FRTB"],
"accelerator_parameter-sets-widget-container.server.params": {
FRTB: {
store: "FRTBParameters",
parameterSet: "BCBS",
parameterStores: {
CommodityBucketRiskWeights: ["RiskWeight"],
CommodityIntraBucketCorrelations: ["Correlation"],
CSRBucketCorrelations: ["Correlation"],
CSRBucketsRiskWeight: ["RiskWeight"],
DRCWeight: ["DefaultRiskWeight"],
EquityBucketsRiskWeight: ["Risk Weight Spot", "Risk Weight Repo"],
ERBARiskWeight: ["DefaultRiskWeight", "Type"],
FRTBParameters: ["Value"],
GIRRDeltaWeighting: ["RiskWeight"],
InstrumentToLGD: ["LGD"],
VegaRiskWeights: ["Liquidity Horizon"],
FXDeltaSpecialCrosses: [],
Vertices: ["Vertex"],
OptionResidualMaturityVertices: ["Vertex"],
ObligorToRiskWeight: ["RiskWeight"],
GIRRMajorCurrency: [],
FXRiskWeightOverrides: ["FXRiskWeight"],
GIRRCorrelationOverrides: ["Correlation"],
SensitivityScaling: ["SensitivityScaleFactor"]
}
},
},
"accelerator_file-upload.server.params": {
FRTB: {
groupSelectorEnabled: true,
getFilePathsRestEndpoint:
"/services/rest/whatif/fileUpload/retrieveStagedFile",
sendFilePathsRestEndpoint: "/services/rest/whatif/fileUpload/upload/",
successMessage: "What-if successfully triggered",
initialPrompt:
"Please select the topic you wish to contribute to your What-if",
fileSelectorPlaceholder: "Select a File",
uploadNamePlaceholder: "What-if Branch Name",
stagingDirectoryName: "stage",
filePathSpliterator: "\\",
selectableDirectories: true,
},
},
"accelerator_documentation-widget-container.server.whitelist": ["FRTB"],
"accelerator_documentation-widget-container.server.params": {
FRTB: {
documentationBaseURL: `${window.env.activePivotServers.FRTB.url}/documentation/`,
documentationLandingPage: "index.html",
},
},
};
After creating this object, add the following import to your index.js file:
import { withClientSettings } from "@activeviam/accelerator-sdk";
Add the following line to your code:
const accSdkHoc = withClientSettings(frtbSettings);
Once you’ve created the accelerator-sdk higher order component, you need to pass the accSdkHoc object to the configuration.higherOrderComponents extension point in order for the settings to be accessible throughout the activeUI application:
configuration.higherOrderComponents = [withSandboxClients, accSdkHoc];
Registering Custom Settings
To register your own settings, simply add them to the frtbSettings object that you just created. You can add any settings you need for your custom code, as long as the setting name does not clash with any of the accelerator settings. A good rule of thumb is to prefix the setting with your project name, in order to avoid clashing.
To use any custom settings that you may have added, you can use a custom hook designed by the accelerator team. The first step is to import this hook from the accelerator-sdk as such:
import { useAccSdkSettings } from "@activeviam/accelerator-sdk";
This hook follows the standard rules of hooks, and should be used only at the top level of any react component.
const customWidget = () => {
const settingsFromHook = useAccSdkSettings();
return <div>Name: {settingsFromHook.widgetName}</div>
}
Migrating Bookmarks
Activeui 5 relies on a new content server structure, which means that the bookmarks need to be migrated to be compatible with this version. ActiveUI 4 bookmarks are not compatible with ActiveUI 5.
There is a simple tool that you can download to migrate your bookmarks though. You can install it by running yarn global add activeui-migration
or npm install -g activeui-migration
, and run it by using the migrate
command that gets installed. The instructions on how to use the tool, as well as the tool itself, can be found on the github repository for the tool. If you have difficulties installing the tool from the public repo, we recommend you install and build the tool from this repo.
In order to use the tool, you will need the server file for your input, we have included that file here