Migration notes 1.8.0

This page explains the changes required to migrate to the stated version of the Market Risk Accelerator.

Migrate to 1.8.0

Upgrading from version 1.7.0 See Market Risk Accelerator 1.8.0 Release Notes.

The Accelerator is using ActivePivot 5.8.11-jdk8 or ActivePivot 5.8.11-jdk11 and ActiveUI 4.3.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.8.11-jdk8 or 5.8.11-jdk11 is included with the MRA Accelerator 1.8.0 release.

Input file formats

Added

File Details
LadderDefinition.csv Sensitivity ladder inputs require defining the scale of the input vectors.
MarketDataSets.csv Market data set inputs defining different market data sets used for the calculations.
Quantiles.csv Rounding methods inputs defining different rounding methods for VaR PostProcessor calculations.
PLPCActuals.csv PL file for Product control extra measures for PnL cube. This would replace previous PLActuals file if product control module is used.

Modified

File Details
PLActuals.csv field “Value” is changed to “Daily” to represent DTD PnL Actual value.
Sensitivities.csv For sensitivity ladder inputs, the sensitivity files now have two extra fields: FirstOrderLadder and SecondOrderLadder.

Removed

None

Configuration files

Files Added

None

Files Modified

File Modification Details
risk.properties Added roundingMethodsFilePattern
Default: glob:**RoundingMethods*.csv File pattern for a csv to populate RoundingMethods store for analysis hierarchy.
Example in resources/data/RoundingMethods.csv in risk-starter tests.
quantilesFilePattern Default: glob:**Quantiles*.csv
File pattern for a csv to populate Quantiles store for analysis hierarchy.
Example in resources/data/Quantiles.csv in risk-starter tests.
marketDataSetsFilePattern
Default:glob:**MarketDataSets*.csv
File pattern for a csv to populate MarketDataSets store for analysis hierarchy.
Example in resources/data/${date}/MarketDataSets.csv in risk-starter tests.
cube.format.double
Default: DOUBLE[#,##0.00;-#,##0.00]
The formatter for double measures with at most 2 digits after the decimal separator.
cube.format.percent
Default: DOUBLE[#,##0.00%]
The formatter for percentage double measures.
cube.format.integer
Default: INT[#,###]
The int formatter.
cube.format.date
Default: DATE[HH:mm:ss]
The date formatters for timestamps.
cube.format.array
Default: DOUBLE_ARRAY[#.###########]
Double array formatter with at most 2 digits after the decimal separator.
activemonitor.restUrl
Default: http://localhost:10010/risk-activepivot/sentinel/rest/v6
Changed csvSource.dataset.import.store
New value: import/store
Old value: import\\store
csvSource.dataset.import.aggregated
New value: import/aggregated
Old value: import\\aggregated
pnlFilePattern
New value:glob:**PLActuals*.csv
Old value: glob:**PLPC*.csv
risk-config.properties Added market.data.set.level
quantileRank.level
Default: QuantileName@Quantiles@Quantiles
Level coordinate for market data set.
rounding.level
Default: MethodName@RoundingMethods@Rounding
Level coordinate for market data set.
quantile.2.rank.default
Default: EQUAL_WEIGHT
Level coordinate for market data set.
marketData.set.default
Default: Official EOD
Level coordinate for market data set.
rounding.default.type
Default: CEIL
Level coordinate for market data set.
pnl.default.type
Default: Actual PL Attributed
Default PnL type for type slicing hierarchy in PnL cube.
trades.var.inclusion.level
Default: VaR inclusion type@VaR inclusion type@TradeAttributes
Level description for Taylor VaR inclusion flag
market.data.set.level
Default: MarketDataSet@MarketDataSets@MarketData
Level description for market data set name
tenorAndMaturity.defaultValue
Default: N/A
Default value for tenors and maturities
moneyness.defaultValue
Default: `ATM
Default value for moneyness
Removed rounding.var
Changed with Rounding analysis hierarchy
rounding.es
Changed with Rounding analysis hierarchy
rounding.vae
Changed with Rounding analysis hierarchy
rounding.etg
Changed with Rounding analysis hierarchy
rounding.quantile2Rank
Changed with Rounding analysis hierarchy
signoff-export.properties Changed signoff.export.cube.skip-hierarchies
New value: ALL::BookHierarchy;LegalEntityHierarchy,VaR::Percentile,Sensi::Ladder
Shifts;BookHierarchy;LegalEntityHierarchy
Old value: ALL::BookHierarchy;LegalEntityHierarchy,VaR::Percentile
File Modification Details
risk.properties Added roundingMethodsFilePattern Default: glob:*RoundingMethods.csv File pattern for a csv to populate RoundingMethods store for analysis hierarchy. Example in resources/data/RoundingMethods.csv in risk-starter tests.
quantilesFilePattern Default: glob:*Quantiles.csv File pattern for a csv to populate Quantiles store for analysis hierarchy. Example in resources/data/Quantiles.csv in risk-starter tests.
marketDataSetsFilePattern Default: glob:*MarketDataSets.csv File pattern for a csv to populate MarketDataSets store for analysis hierarchy. Example in resources/data/${date}/MarketDataSets.csv in risk-starter tests.
cube.format.double Default: DOUBLE[#,##0.00;-#,##0.00] The formatter for double measures with at most 2 digits after the decimal separator.
cube.format.percent Default: DOUBLE[#,##0.00%] The formatter for percentage double measures.
cube.format.integer Default: INT[#,###] The int formatter.
cube.format.date Default: DATE[HH:mm:ss] The date formatters for timestamps.
cube.format.array Default: DOUBLE_ARRAY[#.###########] Double array formatter with at most 2 digits after the decimal separator.
activemonitor.restUrl Default: http://localhost:10010/risk-activepivot/sentinel/rest/v6
Changed csvSource.dataset.import.store New value: import/store Old value: import\store
csvSource.dataset.import.aggregated New value: import/aggregated Old value: import\aggregated
pnlFilePattern New value: glob:*PLActuals.csv Old value: glob:*PLPC.csv
risk-config.properties Added market.data.set.level
quantileRank.level Default: QuantileName@Quantiles@Quantiles Level coordinate for market data set.
rounding.level Default: MethodName@RoundingMethods@Rounding Level coordinate for market data set.
quantile.2.rank.default Default: EQUAL_WEIGHT Level coordinate for market data set.
marketData.set.default Default: Official EOD Level coordinate for market data set.
rounding.default.type Default: CEIL Level coordinate for market data set.
pnl.default.type Default: Actual PL Attributed Default PnL type for type slicing hierarchy in PnL cube.
trades.var.inclusion.level Default: VaR inclusion type@VaR inclusion type@TradeAttributes Level description for Taylor VaR inclusion flag
market.data.set.level Default: MarketDataSet@MarketDataSets@MarketData Level description for market data set name
tenorAndMaturity.defaultValue Default: N/A Default value for tenors and maturities
moneyness.defaultValue Default: ATM Default value for moneyness
Removed rounding.var Changed with Rounding analysis hierarchy
rounding.es Changed with Rounding analysis hierarchy
rounding.vae Changed with Rounding analysis hierarchy
rounding.etg Changed with Rounding analysis hierarchy
rounding.quantile2Rank Changed with Rounding analysis hierarchy
signoff-export.properties Changed signoff.export.cube.skip-hierarchies New value: ALL::BookHierarchy;LegalEntityHierarchy,VaR::Percentile,Sensi::Ladder Shifts;BookHierarchy;LegalEntityHierarchy Old value: ALL::BookHierarchy;LegalEntityHierarchy,VaR::Percentile

Datastores

Added

None

Modified

None

Removed

None

Cube schema

Added

Cube Details
PL cube Analysis hierarchies Analysis hierarchies have been created for:
* market data set
* rounding type
* rank computation from quantile
See list of changed properties in risk-config.properties for the details on how to configure the default value for those analysis hierarchies.

Modified

None

Removed

None

Measures

Added

Product Control measures

Cube Measure name
PL cube MTD PnL Native - Monthly PnL in native currency.
MTD PnL  - Monthly PnL after FX conversion.
YTD PnL Native - Yearly PnL in native currency.
YTD PnL   - Yearly PnL after FX conversion.
LTD PnL Native  - Lifetime PnL in native currency.
LTD PnL  - Lifetime PnL after FX conversion.

Changed

Cube Details
PL cube Measure “Value” name is changed to “Daily” and the name in the cube is DTD PnL Native. Also in the cube is the DTD PnL measure which is the result after FX conversion.
Some measures have also been changed in cube measure configuration. Check in the PnlCubeMeasuresConfig class.
Formatter patterns
Some of the formatter patterns are now defined via properties.
See list of changed properties in risk-config.properties for the list of new properties.

Removed

None

Context values

Added

None

Modified

None

Removed

Name Details
IMarketDataSet The context value IMarketDataSet has been removed and has been replaced by an analysis hierarchy (see list of changed properties in risk-config.properties for the details on how to configure the default value for that analysis hierarchy).

Changes in pom.xml and modules

A new module is introduced which has product control features. It is called risk-product-control and has to be added to master pom.xml and risk-starter pom.xml files as a dependency. 

\<dependency\>
\<groupId\>com.activeviam.apps\</groupId\>
\<artifactId\>risk-product-control\</artifactId\>
\<version\>$
\</version\>
\</dependency\>

Changes in configurations

Required if Product Control module is used

These changes are ONLY required if product control features are used.

ProductControlMeasuresConfig.class has to be added to RiskStarterConfig if product control module is used.
Product control measures have to be injected in PnlCubeConfig

1. Autowire the measures:

@Autowired @Qualifier("productControlMeasures") public Consumer\<ICopperContext\> productControlMeasures;

2. productControlMeasures have to be added to cube config which means that addMeasuresAndDimensions method should be changed to:

public ICanBuildCubeDescription\<IActivePivotInstanceDescription\> addMeasuresAndDimensions(ICubeDescriptionBuilder.INamedCubeDescriptionBuilder builder, Environment env) {        return builder            .withCalculations(pnlMeasures.andThen(productControlMeasures))            .withDimensions(b -\> pnlDimensions.apply(b)); }

3. Extra store fields for new product control measures have to be injected to DatastoreCustomisationsConfig class

@Bean public IDatastoreCustomisations datastoreCustomisations() { IDatastoreCustomisations datastoreCustomisations = new ProductControlDatastoreCustomisations(); DatastoreHelper.injectCustomisations(datastoreCustomisations); return new DatastoreCustomisations(); }

Required for newly introduced analysis hierarchies

There are mandatory breaking changes for any project.

  1. MarketDataSets/RoundingMethods/Quantiles/PnLType hierarchies would use the default value from risk-config.properties file. For the cubes that use this value, it would have to be injected: 

    1. In dimension configurations: 

      .withDimension(MARKET\_DATA\_DIMENSION) .withHierarchy(MARKET\_DATA\_SETS\_HIERARCHY) .slicing() .factless() .withStoreName(StoreNames.MARKET\_DATA\_SETS\_STORE\_NAME) .withLevel(MARKET\_DATA\_SET) .withFieldName(MARKET\_DATA\_SET)

         
      
    2. In cube configuration: 

      (i)

      public static final String MARKET\_DATA\_SETS\_HIERARCHY\_FULL = builder.append("\[" + MARKET\_DATA\_DIMENSION + "\]").append("\].\[").append("\[" + MARKET\_DATA\_SETS\_HIERARCHY + "\]").toString();

      (ii)

      public static String marketDataSetDefaultValue = new String();

      (iii) In pnlCubeDescription() method (or any other cube description method):

      this.marketDataSetDefaultValue = “[”+MARKET_DATA_SET+“].[”+env.getProperty(RiskConfigProperties.MARKET_DATA_SET_PROPERTY)+“]”;

      (iv) In mdxContext() method in all cubes that are using this hierarchy:

      withDefaultMember() .onHierarchy(MARKET_DATA_SETS_HIERARCHY_FULL) .withMemberPath(marketDataSetDefaultValue)

note

Note that all of this could be found in risk-starter implementation in the release source code. Also note that MARKET_DATA_SETS properties in the example would have to be changed into other newly introduced hierarchies in this release. Implementation can also be found in risk-starter source code.