Migrate to 5.4.2
Upgrading from version 5.4.1 - see Atoti Market Risk 5.4.2 Release Notes.- Atoti Market Risk uses Atoti Server 6.0.18-sb3 and Atoti UI 5.1.x. For new features and fixes included in these releases, please see the Atoti UI documentation and Atoti UI Migration Notes, and the release notes for Atoti Server.
Headline announcement
- Dependency upgrades : This release includes updates to Atoti Server (6.0.18-sb3) and DASH (3.3.1-AS6.0). These updates contain a number of bug fixes and improvements. Please see the release notes for these products for further information.
- DirectQuery table validation timeout : The timeout for DirectQuery table validation queries can now be configured with a property.
- Cash market data measures : Market data measures for Cash now correctly return the FX rate instead of using the FX post-processor with dynamic aggregation.
- Missing FX rates : Attempting to retrieve FX rates for missing currencies no longer causes an error or causes queries to fail.
Missing FX Rates
This release introduces a new behavior for FX conversion. When the application converts from the currency of a trade to the display currency, it attempts to retrieve an FX rate from theFxRateMarketData store. This is handled by the FXRate post-processor, utilizing the FXRateWrapper bean. Before this release, no FX rates relating to the currency of the trade resulted in an error, causing queries to fail. In this release, instead of throwing an exception, the FXRate post-processor returns null, so these trades are not included in the displayed results. Please take this into account. In this event a warning log is reported.
Configuration Properties
Properties added
Migrate to 5.4.1
Upgrading from version 5.4.0 - see Atoti Market Risk 5.4.1 Release Notes.- Atoti Market Risk uses Atoti Server 6.0.17-sb3 and Atoti UI 5.1.x. For new features and fixes included in these releases, please see the Atoti UI documentation and Atoti UI Migration Notes, and the release notes for Atoti Server.
Headline announcement
- Upgrade to Atoti 6.0.17-sb3 : This picks up the latest bug fixes and optimizations from Atoti.
- Fix Swagger UI : Swagger UI is now accessible and documents the REST endpoints in Atoti Market Risk.
- Fix Logback file configuration : The
mr-application/src/main/resources/logback-spring-file.xmlconfiguration has been fixed and writes logs to a local file. - Configurable parent child depth: You can now configure the maximum depth of parent-child hierarchies.
- Market Data chain changes: Market data chain has been changed: it is now required to add the sensitivity name and risk class levels in the views to display market data.
- Updated dashboards : A number of dashboards have been updated due to market data measure and context value changes. For details, see Updated dashboards.
- Compatibility with Atoti Sign-off 5.3: This version of Atoti Market Risk is compatible with Atoti Sign-off 5.3.
- Adjustment fixes: Cube level adjustments for the Sensitivity and VaR modules can now be executed and the adjusted values can be found in the UI by using the corresponding
<measure>_adjustedmeasures. Deleting adjustments no longer fails when cubes are disabled.
Configurable parent child depth
You can now configure the maximum depth of the parent-child hierarchies (books, legal entities, counterparties) with new properties. To achieve this, the storesBookHierarchy, CounterpartyHierarchy, LegalEntityHierarchy now also have a variable number of fields to store the corresponding level entries.
In addition, the summary flat stores (PnLBaseStore, SensiBaseStore, BaseStore) have a variable number of fields to be in line with the variable depth.
Market Data chain changes
xxx Current MD / xxx Previous MD
The following measures do not handle FX conversion anymore. They return the same value as the underlyingxxx xxx MD Native metric.
Correlation Current MDCorrelation Previous MDCrossGamma Current MDCrossGamma Current MD 2CrossGamma Previous MDCrossGamma Previous MD 2Delta Current MDDelta Previous MDDividend CurrentDividend PreviousGamma Current MDGamma Previous MDVanna Current MDVanna Current MD 2Vanna Previous MDVanna Previous MD 2Vega Current MDVega Previous MDVolga Current MDVolga Previous MD
[Sensitivities].[Sensitivity].[SensitivityName]), risk
class ([Risk].[Risk Classes].[RiskClass]), risk factor, and other dimensional axes such as tenor/maturity/moneyness (for curve/surface/cubes market data).
Even if two pieces of market data are the same, they can’t be merged for display anymore.
Hidden measures
The following measures are now hidden, since the notion of native currency is not applicable to market data. The value of a measurexxx MD Native value is now equal to the value of the corresponding xxx MD measure.
In addition, the axes needed to fetch the underlying market data are now required: sensitivity name ([Sensitivities].[Sensitivity].[SensitivityName]), risk
class ([Risk].[Risk Classes].[RiskClass]), risk factor, and other dimensional axes such as tenor/maturity/moneyness (for curve/surface/cubes market data).
Even if two pieces of market data are the same, they can’t be merged for display anymore.
Correlation Current MD NativeCorrelation Previous MD NativeCrossGamma Current MD 2 NativeCrossGamma Current MD NativeCrossGamma Previous MD 2 NativeCrossGamma Previous MD NativeDelta Current MD NativeDelta Previous MD NativeDividend Previous NativeDividend Current NativeGamma Current MD NativeGamma Previous MD NativeVanna Current MD 2 NativeVanna Current MD NativeVanna Previous MD 2 NativeVanna Previous MD NativeVega Current MD NativeVega Previous MD NativeVolga Current MD NativeVolga Previous MD Native
Updated dashboards
The following dashboards have have been updated with the levels[Sensitivities].[Sensitivity].[SensitivityName] and [Risk].[Risk Classes].[RiskClass] added to their MDX queries so that market data can be displayed:
Atoti MR & PL/Story-Telling Target Views/Delta and Gamma P&L ExplainAtoti MR & PL/Story-Telling Target Views/Vega P&L ExplainMR/03 - PnL Explain/02 - Example for one tradeMR/03 - PnL Explain/03 - Vega Market data
MR/01 - VaR-ES/03 - VaR Explain Dashboard has been fixed: a context value that was removed in a previous version was incorrectly used in the dashboard.
Configuration
Configuration properties
Properties added
mr-common-config module:Properties changed
mr-common-config module:
mr-sensi-config module:
mr-var-config module:
Other changes
Sign-Off 5.3 compatibility
In order to achieve compatibility with Atoti Sign-Off 5.3 the following REST endpoint was added toSignOffRestService: @PostMapping("/update-state").
Sign-off uses this endpoint to update the sign-off status in Atoti Market Risk.
If you have a custom implementation of
ISignOffRestService you will need to add this endpoint to be compatible with Sign-off 5.3.Migrate to 5.4.0
Upgrading from version 5.3.0 - see Atoti Market Risk 5.4 Release Notes.- Atoti Market Risk uses Atoti Server 6.0.14-sb3 and Atoti UI 5.1.x. For new features and fixes included in these releases, please see the Atoti UI documentation and Atoti UI Migration Notes, and the release notes for Atoti Server.
Headline announcement
-
Market Data API: The new Market Data API has been significantly updated with new features. It has also been moved to dedicated modules, the
market-data-apilibrary module and themarket-data-api-spring-boot-startermodule for easy auto-configuration. The changes include:- Improved design: The design of the Market Data API has been refined to better reflect real-life usage and remove unintended complexity. For details about the design and implementation suggestions, see Market Data API.
- MarketDataDateShift enum: Changed the
MarketDataDateShiftenum valueTODAYtoCURRENT_DAYto clarify its meaning. - Interpolators: New interpolators are now accessible from the
IInterpolationService:InterpolationMode.LINEARon two axes lets you perform linear interpolation on a 2D surface of values.InterpolationMode.VOL_TO_VARIANCEon two axes lets you perform linear interpolation on a 2D surface of values, with a volatility-to-variance transformation applied to the input data and a variance-to-volatility transformation applied to the results of interpolation.InterpolationMode.LINEARon three axes lets you perform linear interpolation on a 3D cube of values.
- Changed new Market Data API data model: The
MarketDataSetandIDfields in the new Market Data API data model have been swapped around. - Migrated scalar measures: The scalar sensitivities market data measures have been migrated to the new Market Data API.
- Support for Corporate Actions: Corporate actions (splits and dividends) are now supported using the new Market Data API.
- Atoti Server: Upgraded to Atoti Server 6.0.14-sb3.
- Spring Boot 3: Upgraded to Spring Boot 3.2.0, which uses Spring Framework 6.
- Hibernate: The application has been upgraded to Hibernate 6.3.1.Final.
- H2: The application has been upgraded to H2 2.2.224.
- Security configuration: Some classes related to security configuration have been moved from the
mr-common-configproject to themr-applicationproject. - Spring Profiles: Profile-based configuration has been replaced with properties (backwards compatible). For details, see Profile-based configuration.
- Fluent post-processors: Post-processor metrics are now set up in a Fluent style. The levels and hierarchies use strong types. For more details, see Fluent post-processor setup.
- Specific alias classes for lambda generics: Lambda generics have been replaced with specific alias classes (e.g. MeasurePublisher for Consumer intended for publishing measures).
- Topic Aliases: The topic aliases used by the Data Load Controller (DLC) are now defined for each topic rather than in a single place during DLC initialization.
- New moneyness default value: The default value of the moneyness field in the sensitivities and market data has been changed from ATM to N/A.
- Catalog name: The catalog has been changed from
MarketRiskAcceleratortoMR. - Combined cube metrics: The metrics of the combined cube are now defined in the class
MRCombinedCubeMeasuresConfig, their definition in pure Copper is also provided but should not be used. For details, see The MRCombinedCube metrics. - Property cleanup: The unused property
SENSITIVITY_TYPEhas been removed in theDynamicTenorsAndMaturitiesPostProcessorclass. - Added a new abstract tuple publisher: Introduced new abstract tuple publisher (
ATableFormatTuplePublisher) for publishers where the file format does not match the table data model. For details, see New abstract tuple publisher. - Admin UI: The Admin UI has been upgraded to version 5.1.5. For details, see Upgrade to Admin UI 5.1.5.
- PnL Explain with DirectQuery: PnL Explain is now working across the transition between DirectQuery and in-memory sensitivity cubes. For details, see PnL Explain with DirectQuery.
- UI Activation: An import of
react-queryis required when usingmr-sdk. See UI activation for more details. - Databricks: Added support for DirectQuery with Databricks.
- Removed Debug measures: The debug market data measures and subsequent classes have been removed from the product.
- Scalar sensitivities default: The default data model for sensitivities changed from vector model to scalar model.
- Vector sensitivities deprecated: The vector sensitivities data model is deprecated and planned for removal. If you need to switch from vectorized to scalar sensitivities, see Customizing Atoti Market Risk to use store-backed maturity conversion with scalar sensitivities.
- Market Data bookmark removed: The
Risk Factor Historybookmark underAtoti MR & PL/Story-Telling Target Viewshas been removed. - Content server reset on start: The default behavior driven by the in-memory database properties in
application.yamlhas been changed to reset the content server on start with the bookmarks folder (mr-application/src/main/resources/mr-bookmarks). - Added topic alias
AllMarketData: All the market data tables are regrouped under the new topic aliasAllMarketData, used for loading the input files.
Breaking changes
- A number of classes named
...Helper(s)have been renamed to...Utilsfor naming consistency with similar classes. - All Utils and Constants classes, as well as other classes containing only static variables and/or methods, now have a private constructor.
com.activeviam.mr.common.calculations.adjustments.constants.AdjustmentsConstantshas been removed and the two constants from this class added tocom.activeviam.mr.common.constants.AdjustmentsConstants.ASecurityConfig.PIVOT_USER_ROLEShas changed fromString[]toList<String>.- The
METRICvariable on a number of measure chain classes is now a static constant in place of a final instance variable. - Fields on two What-If classes are now final, with corresponding getter/setter methods available.
- The lambda generic classes have been replaced by specific classes.
- Some classes related to security configuration have been moved from the
mr-common-configproject to themr-applicationproject. - In the
mr-common-configproject, the classUnsecuredDatabaseServiceConfighas been renamed toWhatIfAwareUnsecuredDatabaseServiceConfig. - The issue described in the ticket MR-1626
(trying to log in with a user that does not have admin rights throws a 403 HTTP error) has been fixed in the class
MRSecurityFilterChainsConfig. - The
NoOpPostProcessoris defined in the Common Library, the package is nowcom.activeviam.accelerator.common.postprocessor.impl. - The tuple publishers that target multiple stores, or stores with a data model distinct from the input file format now extend
ATableFormatTuplePublisher. - The unused property
SENSITIVITY_TYPEhas been removed in theDynamicTenorsAndMaturitiesPostProcessorclass. - The topic aliases used by the Data Load Controller (DLC) are now defined for each topic rather than in a single place during DLC initialization. The
ChannelParametersHolder::addTopicnow has a 4th parameter that holds the list of all topic aliases to which the topic belongs. The functionDataLoadControllerConfig::registerTopicAliasescomputes the aliases based on this extension and shouldn’t be modified anymore. For details, see Step 3 in Data loading and unloading. - Replaced the Atoti Market Risk
ReferenceLevelLocationShiftpost-processor with the Common LibraryReferenceLevelLocationShiftLight. Any usage of the post-processor will have to be replaced, as will any usage of themr.metrics.rlshift.post-processorproperty referring to the old plugin key. The default value of the property has been changed toReferenceLevelLocationShiftLight. - The application has been upgraded to Hibernate 6.3.1.Final and H2 2.2.224. As a consequence, the content of the content server database has changed. See Migration of the content server database.
- The catalog name has been renamed from “MarketRiskAccelerator” to “MR”.
- The new configuration class
ApplicationJwtConfighas been added to handle the configuration used for JWT authentication. - The constant
VALUE_CCYinStoreFieldConstantshas been removed and replaced by the constantCCY. - The
MRCombinedCubemetrics are now configured by beans with the qualifierSP_QUALIFIER__COMMON_MEASURE_BUILDERSandSP_QUALIFIER__COMMON_MEASURES. - The interface
IAsyncTaskhas been replaced byIRefreshTaskthat is more specific and used to perform refresh action upon DirectQuery refresh request. - Vectorized sensitivities have been deprecated: scalar sensitivities should be used instead of vectorized sensitivities.
- The default data model for sensitivities changed from vector model to scalar model.
- The CorporateAction store has been removed for scalar sensitivities, and deprecated for vectorized sensitivities: it is still used to handle dividends for vectorized sensitivities, but is not used anymore for scalar sensitivities.
- Stock splits are handled in a new store: the
SplitRatioMarketDatastore is used for the handling of stock split ratios both for vectorized and scalar sensitivities. - New input files for Dividends and stock Split Ratios have been created.
- New Market Data input files: spot, curve, surface, cube, and correlation market data files have been created to replace the previous market data input file.
- The Market Data Cube has been deleted : Market data measures in the Sensitivities Cube need to be used to display market data instead of the Market Data Cube.
- The debug market data measures have been removed.
- The modules
mr-market-data-libandmr-market-data-confighave been removed. They were used for the configuration of the Market Data Cube. - In the ThetaCopper class, some methods have been renamed. The
marketDataPostProcessorandscalarMarketDataPostProcessormethods have been renamed. - The
com.activeviam.accelerator.common.dates.IMaturityConverterinterface has been removed from the modulemr-common-liband has been replaced by the interfacecom.activeviam.accelerator.common.dates.IMaturityConverter. - Some methods have been added to the
ISensitivityMarketDataMeasuresinterface and the following methods have been changed:scalarNativeIntermediateInterpolatedDividendscalarNativeIntermediateInterpolatedThetavectorNativeIntermediateInterpolatedTheta
- For the market data measure chains configuration: the class names
*CurrentDateMarketDataChain,*NextDateMarketDataChainand*PreviousDateMarketDataChainhave been changed to use the new Market Data API. - The SQL scripts to create and load data for DirectQuery with Microsoft SQL Server and Snowflake have been modified to match the schema of the new Market Data API.
- Default content server startup settings changed to reset its content to the content in
mr-application/src/main/resources/mr-bookmarks. No persistence upon restart with new default properties. - The
MaturityDate&TradeDatefields of theTradeAttributesstore, and theMaturityDatesandTenorDatesfields of theTradeSensitivitiesstore are now typed as Date instead of String. Code that requires these to be Strings will need updating. - The constructor of the
MraSimpleTenorConverterclass in themr-common-libmodule has changed. In addition to a String-typed default for tenors and maturities, this class now also requires a Date-typed default. This change is due to the type change of the fields mentioned above. - The properties beginning
mr.sensi.rules.<sensitivity-type>...have been renamedmr.sensi.rules.<sensitivity-type>.pnl-explain. This is to accommodate the newmr.sensi.rules.<sensitivity-type>.taylor-varproperties that allow Taylor VaR and PnL Explain calculations to be configured independently. - The
ISensiRuleConfigurationServiceinterface has been replaced by theIPnlExplainRuleConfigurationServiceandITaylorVarRuleConfigurationServiceinterfaces. - The
ISensiRuleConfigurationServicAwareinterface has been removed. - The method
getVaRExplainFormulainIPnLExplainFormulaProviderhas been renamed togetPnlExplainFormulaForShiftas this method is now only used for PnL Explain calculations. - The constructor for the
PnLExplainFormulaProviderclass now requires anIPnlExplainRuleConfigurationServiceinstead of anISensiRuleConfigurationService. - The
InputSelectorclass has been renamed toPnlExplainInputSelector. There is a correspondingTaylorVarInputSelectorand they both implementIInputSelector. To autowire these beans you must now use the new qualifiers:SP_QUALIFIER__PNL_EXPLAIN_INPUT_SELECTORandSP_QUALIFIER__TAYLOR_VAR_INPUT_SELECTOR. - The
IInputSelectorAwareinterface has been replaced by theIPnlExplainInputSelectorAwareandITaylorVarInputSelectorAwareinterfaces. - The
APnlVectorFromRiskSensiPostProcessorpost-processor now implements theITaylorVarFormulaProviderAwareinterface instead of theIPnLExplainFormulaProviderAwareinterface. - Tenor Converter / Maturity Converter: When a parsing error occurs, a null value (for object based return functions) or a NaN value (for double return functions) is returned.
Tenor Converter / Maturity Converter
When a parsing error occurs, a null value (for object based return functions) or a NaN value (for double return functions) is returned. The caller should take action to handle the error case correctly, for instance, by calling the error handler.Profile-based configuration
The code in Atoti Market Risk will no longer change behavior based directly on Spring profiles. Instead, the behavior will be determined by properties. The properties can be set by profile-selected configuration files. Default property files are included to preserve backwards compatibility with the use of profiles. In particular, instead of the profilesdist-data-node, dist-query-node, and forceNetty (and the property directquery.enabled), we have the following properties:
The following configuration files have been added to match the behavior of the profiles:
See the Externalized Configuration section of the Spring Boot documentation for more information on profiles and property management.
The MRCombinedCube metrics
The polymorphic metrics of the combined cube (using metrics from several underlying data cubes) are now defined by beans.
The configuration is located in MRCombinedCubeMeasuresConfig configuration class.
The metrics could be defined in the legacy way under the qualifier @Qualifier(SP_QUALIFIER__COMMON_MEASURE_BUILDERS) that will be aggregated by the cube configuration.
They can also be defined in Copper style with the qualifier @Qualifier(SP_QUALIFIER__COMMON_MEASURES). The Copper for polymorphic metrics is an alpha feature and
is only present for demonstration.
The Copper for polymorphic metrics is activated by the environment variable activeviam.feature.experimental.copper_in_distributed_cube.enabled=true.
The Spring condition @ConditionalOnExperimentalCopperInDistributedCube checks that the environment variable is set.
The Spring condition @ConditionalOnNotExperimentalCopperInDistributedCube checks that the environment variable is not set.
PnL Explain with DirectQuery
By setting up Atoti Market Risk using in-memory node and DirectQuery nodes, the transition between the two nodes is now correctly handled for the PnL Explain computation. As before, the dates defined in the property mr.data-load.initial-business-dates are loaded on the in-memory node and NOT loaded in the DirectQuery node. However, on the DirectQuery node, the FXRates and MarketData stores are now loaded from both DirectQuery for the non-defined dates and from the files for the defined dates in the property. By doing this, the Day PnL Explain computation can fetch the market data for Day-1 and Day on the DirectQuery node of Day-1. This is done by adding in-memory sources on DirectQuery setup:Condition changes
New Sources
A new source configuration dedicated to DirectQuery has been added by the configuration classesSensiPnLAzureCsvSourceConfig, SensiPnLLocalCsvSourceConfig, and DirectQuerySensiCsvSourceParametersProviderConfig.
It loads the FX and market data on in-memory based for the dates defined by the property mr.data-load.initial-business-dates.
It uses the same topics and aliases as the in-memory setup (Attributes/AllAttributes/FXRates for FX, DailySensiConfig/SensiConfig/AllSensi/AllAttributes/AllFacts/MarketData for Market Data).
A refresh issued to DirectQuery will also reload the initial data.
New qualifiers
To handle this source, several qualifiers have been added:Configuration classes
Files Modified
- Application configuration
- Measures configuration
- What-If configuration
- Security configuration
- Preview Market Data property removal
- DirectQuery configuration
Application configuration
Three classes have been renamed from...Helper(s) to ...Utils for consistency with similar classes. In MR, a Utils class is one that contains only static methods. These three classes are:
We have also consolidated two Utils classes:
com.activeviam.mr.common.calculations.adjustments.constants.AdjustmentsConstants has been removed and the two constants in this class have been moved to com.activeviam.mr.common.constants.AdjustmentsConstants. These constants are unchanged, you simply need to update the import statements.
Utils classes and others, such as Constants classes, that contain only static variables and/or methods are not intended to be instantiated. Therefore, for clarity, we have added private constructors to these classes. They are as follows:
- ComponentVaRCalc
- CookieUtil
- DatastoreConstants
- DatastoreDescriptionUtils
- DimensionConstantsConfig
- DimensionUtils
- MeasureChainHelpers
- MeasureConstants
- SchemaConstants
- SignOffConstants
- StoreUtils
- WhatIfConstants
- WhatIfUtils
ASecurityConfig.PIVOT_USER_ROLES has changed from String[] to List<String>, where the list is an unmodifiable list. This is to ensure the immutability of this constant.
Measures configuration
A number of abstract measure chains have aMETRIC field, representing the metric that the chain creates measures for. On all these classes, this is now a static constant in place of a final instance variable. These chains are:
- AESChain
- AETGChain
- AHDChain
- ASummaryESChain
- ASummaryETGChain
- ASummaryVaEChain
- ASummaryVaRChain
- ASummaryWESChain
- ASummaryWETGChain
- ASummaryWVaEChain
- ASummaryWVaRChain
- AVaEChain
- AVaRChain
- AWESChain
- AWETGChain
- AWVaEChain
- AWVaRChain
What-If configuration
A number of instance variables have been made private on What-If configuration classes. In all cases there is a corresponding getter and setter that was already available and is now required to be used in all cases. These fields are:Security configuration
The following files have been moved from themr-common-config project to the mr-application project:
In the
mr-common-config project, the class UnsecuredDatabaseServiceConfig has been renamed to WhatIfAwareUnsecuredDatabaseServiceConfig.
The following files, which were not used in the code, have been removed from the mr-common-config project:
- CommonWebSecurityFiltersConfig
- ApplicationJwtConfig
- GlobalSecurityConfig
- InMemoryAuthenticationSecurityConfig
- InMemoryUserDetailsManagerBuilder
- PasswordEncoderConfig
MRSecurityFilterChainsConfig has been changed to fix known issue MR-1626
(trying to log in with a user that does not have admin rights throws a 403 HTTP error).
The class DispatcherServletConfig has been added in com.activeviam.mr.application.config.security to contain cookie configuration taken from the MarketRiskApplication class.
Preview Market Data property removal
Themr.enable.preview.market-data property has been removed, together with the following Spring @Conditional classes based on it:
DirectQuery configuration
The following configuration classes have been added to enable DirectQuery with Databricks:Migration of market data measures to new Market Data API for scalar sensitivities
The market data measures for sensitivities chains have been migrated to the new Market Data API. Several modifications were required, falling into the following categories:- Introduced distinct measures for the previous date market data, rather than location-shifting the current date market data measures.
- Changed the native intermediate interpolated market data beans to generate market data retrieval measures based on the MarketDataProperties configuration properties, with a switching post-processor using the generated measures as underliers.
- Added a specific market data type (
SensitivityMarketDataType.EQ_SPOT) for market data that requires multiplication by a split ratio for the next date market data measure.
mr-sensi-config module:
For further details on retrieval in the market data API, see Market data retrieval in the market data API data model
Input file formats
New files
Modified
The fileInstrument_Market_Data.csv has been renamed to Spot_Market_Data.csv
Logback Fix
We provide a logback configuration (mr-application/src/main/resources/logback-spring-file.xml) that outputs to a local log file. This configuration references classes that are no longer present, causing the application startup to fail.
You can fix this configuration by making the following changes:
- In
- Delete
<file>${custom.json.log.dir}/activepivot.log</file>on line 51.
Swagger UI Fix
Swagger UI is used to document REST endpoints in Atoti Market Risk. It should be available at.../swagger-ui/index.html but this endpoint results in a not found exception. This is a known issue in Atoti Market Risk 5.4 and is due to an outdated dependency. You can resolve this issue with the following steps:
- In the project root pom.xml file replace:
- In the pom.xml file of the mr-application module replace:
Configuration
Configuration properties
Properties added
market-data-api-spring-boot-starter module:
mr-sensi-config
mr-common-config
-
The properties prefixed with
mr.sensi.rulesallow users to configure the PnL Explain and Taylor VaR formulas. With this release, each sensitivity now has a set of default properties for each of the main risk classes, as well asanyproperties that will apply to custom risk classes if they are not explicitly configured.
As before, you can still add properties for custom sensitivities and custom risk classes. -
Additionally, there is a new set of properties beginning
mr.sensi.rules.<sensitivity-type>.taylor-var.
These properties mirror the previousmr.sensi.rulesproperties (which have moved tomr.sensi.rules.<senitivity-type>.pnl-explain), allowing Taylor VaR and PnL Explain calculations to be configured independently.
Properties modified
mr-common-config
- Properties in the
mr-common-configmodule beginningmr.sensi.ruleshave been renamed tomr.sensi.rules.<sensitivity-type>.pnl-explain.
Along with the newmr.sensi.rules.<sensitivity-type>.taylor-varproperties, this allows Taylor VaR and PnL Explain calculations to be configured independently. - Additionally, the
baseproperties that applied to any risk class without specified properties (e.g.mr.sensi.rules.delta.base) have been renamed toany(e.g.mr.sensi.rules.delta.pnl-explain.any).
Properties removed
The following properties have been removed as the Market Data API is no longer in preview:Properties deprecated
The sensitivity rules properties concerning interpolation have been deprecated as interpolation is now the responsibility of the new Market Data API. These properties follow the format:mr.sensi.rules.<sensitivity-type>.pnl-explain/taylor-var.<risk-class>.interpolatemr.sensi.rules.<sensitivity-type>.pnl-explain/taylor-var.<risk-class>.preInterpolationFunctionsmr.sensi.rules.<sensitivity-type>.pnl-explain/taylor-var.<risk-class>.postInterpolationFunctions
mr.tenors-and-maturities.default-valuemr.moneyness.default-valuemr.tenors-and-maturities.default-valuemr.fx.common-currency
Property Files
Files Modified
application.yaml
The following properties have been added to address CORS issues and the removal of the distribution Spring profiles:
The following property has been unset to comply with the change in the default behavior of the content-server (now reset on restart).
This eases the start of multiple instances (e.g. distributed configuration).
Files Deleted
tracing.properties
This property file has been deleted and replaced by configuration properties. In addition, due to swapping the Brave tracing configuration for OpenTelemetry, properties have been updated. The new properties are:
The following properties have been replaced by OpenTelemetry properties:
- spring.zipkin.baseUrl
- spring.zipkin.api-path
- spring.zipkin.service.name
- spring.zipkin.sender.type
- spring.zipkin.enabled
- spring.sleuth.traceId128
- activeviam.apm.zipkin.span.level
Datastores
Added store configurations
For details, see New Dividend and Split Ratio stores.
Modified store configurations
The types of the following store fields have been changed:
Marked for removal
- The [
CorporateAction] store has been deprecated. It is still used to handle dividends for vectorized sensitivities, but not for scalar sensitivities. UseDividendMarketDataandSplitRatioMarketDatainstead. - The
MarketDatastore has been deprecated. It is still used to handle dividends for vectorized sensitivities, but not for scalar sensitivities. For scalar sensitivities, use the following stores:
Removed
The
FxRateMarketData store needs to be used instead of the FXRates store.
On top of that, the FX rate service uses the Market Data API: the FXRateWrapper, implementation of IFxRates, uses the Market Data API to get the FX rates,
see Exchange Rate and Market Data API.
Database
Added tables
Modified tables
The types of the following database table fields have been changed:Deleted tables
FXRATES has been removed and replaced by the new Market Data API store FxRateMarketData.Cube schema
The Market Data Cube has been deleted.Measures
Added
Removed
The following debug market data measures found in themr-sensi-config module were removed.
For additional changes, see Removal of debug market data measures.
Deprecation of Sensitivities vector measures
* {Cash, Correlation, Crossgamma, Delta, Dividend, Gamma, Theta, Vanna, Vega}
Context values
Removed
DirectQuery scripts
Added
Changed
Modules removed
The modulesmr-market-data-lib and mr-market-data-config have been removed. They were used for the configuration of the Market Data Cube.
PnL Explain and Taylor VaR Formula Split
PnL Explain and Taylor VaR calculations can now be configured independently of one another. The following changes enable this.Properties
Themr.sensi.rules properties have been split into mr.sensi.rules.<sensitivity-type>.pnl-explain and mr.sensi.rules.<sensitivity-type>.taylor-var properties. If the Taylor VaR properties are not set, Taylor VaR calculations will continue to use the corresponding PnL Explain properties, but these new properties allow you to specify different values specifically for Taylor VaR.
The values of these properties were previously accessed at runtime using the ISensiRuleConfigurationService interface. This has been replaced by IPnlExplainRuleConfigurationService and ITaylorVarRuleConfigurationService interfaces.
The ISensiRuleConfigurationServiceAware interface has been removed as this was no longer used.
Formula Providers
In addition to the existingIPnLExplainFormulaProvider, there is now an ITaylorVarFormulaProvider class. This is available as a Spring bean, created by the TaylorVarFormulaProviderConfig class.
The method getVaRExplainFormula in IPnLExplainFormulaProvider has been renamed to getPnlExplainFormulaForShift as this method is now only used for PnL Explain calculations.
The constructor for the PnLExplainFormulaProvider class now requires an IPnlExplainRuleConfigurationService instead of an ISensiRuleConfigurationService.
Input Selector
The Input Selector classes that are used to perform ladder calculations have also been split. TheIInputSelector interface remains unchanged but the InputSelector implementation is now renamed to PnlExplainInputSelector and there is a corresponding TaylorVarInputSelector.
The InputSelectorConfig configuration class now publishes two beans of type IInputSelector, one for PnL Explain and the other for Taylor VaR. These can be autowired by using the new qualifiers: SP_QUALIFIER__PNL_EXPLAIN_INPUT_SELECTOR and SP_QUALIFIER__TAYLOR_VAR_INPUT_SELECTOR.
The IInputSelectorAware interface has been replaced by the IPnlExplainInputSelectorAware and ITaylorVarInputSelectorAware interfaces.
Post-processor
TheAPnlVectorFromRiskSensiPostProcessor post-processor now implements the ITaylorVarFormulaProviderAware interface instead of the IPnLExplainFormulaProviderAware interface, and the ITaylorVarInputSelectorAware interface instead of the IInputSelectorAware interface.
The following post-processors now implement the IPnlExplainInputSelectorAware interface instead of the IInputSelectorAware interface:
- AScalarPnLExplainPostProcessor
- PnLExplainCrossPostProcessor
- PnLExplainPostProcessor
Fluent post-processor setup
The measure creation function returning aCopperMeasure is now deprecated, for instance the old definition:
LevelIdentifier. Those functions are suffixed with ”…Id”.
The Property partitionedOnRangeLevels=false has been removed from all post-processor setups.
Removal of debug market data measures
In addition to the removed debug measures, the following changes have been made. With the post-processor property debug string no longer relevant, the following post-processors were modified:
Measure factories have been modified in consequence.
Other files affected:
New Dividend and Split Ratio stores
In themr-application module:
- The following attributes have been added to the
RiskPostProcessorInjectorclass:
- In the same class, the following injections are performed in post-processors in the method:
-
In the
DataLoadControllerFileConfigclass, the following constants are used in thetopicToScopeToLoadConverterandtopicToScopeToRemoveWhereConditionConverter:SPLIT_RATIO_STORE_NAMEDIVIDEND_MARKET_DATA_STORE_NAME
-
In the
MarketRiskConfigclass, the following configuration imports have been added:
mr-common-lib module:
- In the file
StoreConstants, these two constants have been added:- SPLIT_RATIO_STORE_NAME
- DIVIDEND_MARKET_DATA_STORE_NAME
mr-sensi-config module:
- The store
CorporateActionhas been deprecated. It is still used to handle dividends for vectorized sensitivities, but is not used anymore for scalar sensitivities. The storesDividendMarketDataandSplitRatioMarketDataneed to be used instead of theCorporateActionstore. - The
SplitRatioMarketDatastore is used for handling stock split ratios both for vectorized and scalar sensitivities. - The
SensiFilePatternPropertiesclass has been updated to take into account the file patterns for Dividends and Split Ratios. - In the
AllSensiStoresConfigclass, theDividendMarketDataStoreConfigandSplitRatioStoreConfigconfiguration classes are imported. - The
DividendCurrentDateMarketDataChainuses the constantMarketDataDateShift.CURRENT_DAYinstead of the constantDateShift.CURRENT_DATE. and theDividendNextDateMarketDataChainuses the constantMarketDataDateShift.NEXT_DAYinstead of the constantDateShift.NEXT_DATE. - In the
DividendPnLExplainMeasuresConfigclass, theDividendMarketDataRetrievalConfigconfiguration class is imported. - In the
SensiCsvSourceParametersProviderConfigclass, the following lines have been added:
mr-sensi-lib module:
- The following constants have been added to the
MeasureConstantsclass:
- In the class
SensiFactory, the attributedividendCopperand the methodgetDividendCopper()have been removed. - The signature of the method
scalarNativeIntermediateInterpolatedDividendchanged from:LevelParameterRetriever<SensiMeasureParameters> riskFactorLevelRetriever, IDateShift dateShift)toLevelParameterRetriever<SensiMeasureParameters> riskFactorLevelRetriever, MarketDataDateShift marketDataDateShift)and its default implementation has been changed. - The default implementation of the method
ISplitMeasures.corporateSplithas been changed. - In the
DividendSensiMeasureNamesclass, the constantsSPLIT_RATIO_CURRENTandSPLIT_RATIO_PREVIOUSand the methodsgetSplitNameCurrent()andgetSplitNamePrevious()have been removed.
mr-directquery module:
- The snowflake database scripts have been updated:
createMR.sqlnow createsDIVIDEND_MARKET_DATAandSPLIT_RATIO_MARKET_DATAstoresloadMR.sqlnow loads data in the storesDIVIDEND_MARKET_DATAandSPLIT_RATIO_MARKET_DATA
- The mssql database scripts have been update:
createMR.sqlnow createsDIVIDEND_MARKET_DATAandSPLIT_RATIO_MARKET_DATAstoresloadMR.sqlnow loads data in the storesDIVIDEND_MARKET_DATAandSPLIT_RATIO_MARKET_DATA
Deletion of Market Data Cube
The Market Data Cube has been deleted. The modulesmr-market-data-lib and mr-market-data-config have been removed. They were used for the configuration of the market data cube.
In the mr-application POM file, the following dependency has been removed:
MRCombinedCube class has been updated to take into account the removal of the Market Data Cube.
In the mr-common-config module, the following classes were deleted:
BeanEnabledMarketDataCubeConfigurationEnabledMarketDataCubeTheBeanEnabledAnyCubeclass has been updated to take into account the removal of the Market Data Cube.
Other changes
- Code changes in mr-application
- Market Data API changes
- Lambda interface changes
- Other interface changes
- New API to define dimension and hierarchies
- New abstract tuple publisher
- Upgrade to Admin UI 5.1.5
- Unused property removed in AsOfDateNeighbourValuePostProcessor
- MarketDataDateShift enum
- Deprecated unused column calculator
- Unused property removed in DynamicTenorsAndMaturitiesPostProcessor
- New configuration class ApplicationJwtConfig
- Tomcat server version bumped to 10.1.19
- Migration of the content server database
- Fluent post-processor setup
- Constant VALUE_CCY in StoreFieldConstants removed and replaced by constant CCY.
- Catalog name change
- Removal of debug market data measures
- Deprecation of Sensitivities vector data model
- Customizing the Market Risk Solution to use store-backed maturity conversion with scalar sensitivities
- New Dividend and Split Ratio stores
- Deletion of Market Data Cube
- Maven dependencies
- IMaturityConverterAware class
- Theta: methods renamed
- Swagger UI Fix
Code changes in mr-application
A number of code-level changes have been made to classes in the mr-application module to improve clarity and consistency. These are:LocalContentService.createHibernateConfigurationnow throws anActiveViamRuntimeExceptioninstead of aRuntimeException.StaticResourcesHandler.CLASSPATHis a new private constant with the value"classpath:".- Nested
ifconditions have been removed fromAdjustedCellPropertiesHandler.getForeColor\getBackColor. - The static variable
MarketRiskApplication.context, of typeConfigurableApplicationContext, has been removed. - The
JMXEnablerbean namedJMXDatastoreEnabler, defined inMarketRiskConfighas been renamed tojmxDatastoreEnabler. - The
JMXEnablerbean namedJMXDirectMemoryMonitoringEnabler, defined inMonitorConfighas been renamed tojmxDirectMemoryMonitoringEnabler. - The private method
performTransactionhas been added to theAdjustmentExecutionConfigclass to avoid the nesting of try-catch statements. - In a number of places, where a local variable is created and assigned just to be returned by a method, the local variable is no longer created. For instance, this has been changed for the
getConfiguredStageTopicsmethod of theFileUploadWhatIfRestfulServiceclass. - The main method of the
InvokeBranchReleaseclass now uses theMap.ofmethod to store the JMX credentials, instead of instantiating a HashTable. - The new configuration class
ApplicationJwtConfighas been added to handle the configuration of the properties used to define JWT authentication. - Deprecated description
IStoreFormatis replaced byIDataTable.
Market Data API changes
The new Market Data API that was introduced as a preview in Atoti Market Risk 5.3.0 has undergone significant changes to add functionality and improve flexibility. To reflect the independence of the API, it has been moved to a new Maven module:market-data-api. This module is not dependent on any Atoti Market Risk modules, although it has a dependency on the Datastore Helper (DASH) and DASH is required to use the store configurations. This module is a dependency of the mr-common-lib module and so its classes are available throughout the Atoti Market Risk project.
In addition to the base module, which provides interfaces and implementation classes, there is a market-data-api-spring-boot module. This contains Spring bean definitions for market data stores and retrievers, and interpolation services. As a Spring Boot starter, when you add this module as a dependency to a Spring Boot application, the beans within it are automatically configured by Spring and made available to the application context. The following classes are automatically imported from the starter module:
- com.activeviam.marketdata.api.configuration.retrievers.CubeMarketDataRetrievalConfig
- com.activeviam.marketdata.api.configuration.retrievers.CurveMarketDataRetrievalConfig
- com.activeviam.marketdata.api.configuration.retrievers.FxRateMarketDataRetrievalConfig
- com.activeviam.marketdata.api.configuration.retrievers.SpotMarketDataRetrievalConfig
- com.activeviam.marketdata.api.configuration.retrievers.SurfaceMarketDataRetrievalConfig
- com.activeviam.marketdata.api.configuration.interpolation.AllMarketDataInterpolatorsConfig
- com.activeviam.marketdata.api.configuration.interpolation.AllInterpolationTransformationsConfig
IMarketDataRetriever interface allowed you to retrieve single values from market data stores and specific retrievers, e.g. ICubeMarketDataRetriever interfaces supported retrieval of market data collections (cubes, curves, etc.). Instead, each market data type now has a specific, corresponding retriever interface that supports retrieval from that store using the semantics relevant to it. For instance, the ICurveMarketDataRetriever store now retrieves a single value from a curve or a whole curve, and the method parameters reflect the properties of a curve.
In addition to the base retriever interfaces, each market data type also now has a “contextual” variant, e.g. IContextualCurveMarketDataRetriever. This retriever accepts a MarketDataRetrieverContext that may modify the retrieval. Out-of-the-box implementations apply the date shift from the context before retrieving the market data.
Beyond retrievers, the IMarketDataService interface has been renamed to IMarketDataRetrievalService. A retrieval service contains the business rules to retrieve market data for a specific purpose. It may use multiple underlying retrievers or interpolation services to do this. We provide an abstract implementation of this interface, which handles caching within a query cache.
Finally, an AMarketDataPostProcessor is now provided that should serve as the basis for market data retrieval within a measure chain.
Lambda interface changes
Wherever the changes above have resulted in a removal of ambiguity, the associated Spring @Qualifier has been removed:
Other interface changes
New API to define dimension and hierarchies
You can now define a new hierarchy belonging to an existing dimension by registering an extra bean. Previously this was only possible at dimension level. To be able to define a new hierarchy in a cube inside an existing dimension, the signature of the dimension beans has changed. It now returnsHierarchyBuilderConsumer, replacing DimensionsAdder. This return type lets you define a hierarchy by itself.
Here’s how it works:
New abstract tuple publisher
We have introduced theATableFormatTuplePublisher for sources where the input file format does not match the table data model.
Publishers extending this abstract class can define a mapping between the table fields and the input file fields. The tuples will be generated according to matching field names and this custom mapping.
Upgrade to Admin UI 5.1.5
The Admin UI has been upgraded to version 5.1.5 from version 5.1.1. A new property has been added to themarket-risk POM file for the Admin UI version:
admin-ui artifact has been added in the dependency management section of that POM file:
mr-application POM file for that artifact:
Unused property removed in AsOfDateNeighbourValuePostProcessor
The unused propertyIS_PARTITIONED_ON_RANGE_LEVELS_PROPERTY has been removed from the class AsOfDateNeighbourValuePostProcessor.
MarketDataDateShift enum
TheMarketDataDateShift enum value TODAY has been renamed to CURRENT_DAY to clarify its meaning.
Deprecated unused column calculator
The unusedSensiValueCalculator is now deprecated.
Unused property removed in DynamicTenorsAndMaturitiesPostProcessor
The unused propertySENSITIVITY_TYPE has been removed from the DynamicTenorsAndMaturitiesPostProcessor class.
The signatures of the methods that used to have the sensitivityType parameter as an argument have been changed to remove that argument.
As a consequence, the default implementation of the method rebucketing in the INativeCurrencyMeasures interface has been changed.
New configuration class ApplicationJwtConfig
The new configuration class ApplicationJwtConfig has been added to handle the configuration used for JWT authentication.
This class can also handle the activeviam.jwt.failOnDifferentAuthorities property that was not taken into account previously.
It is imported in the class MarketRiskConfig instead of the previously used JwtConfig class.
Tomcat server version bumped to 10.1.19
In the mr-application module, this version override of the spring-boot-starter-web dependency is required to customize the use of cookies to allow websocket connections.Migration of the content server database
The application has been upgraded to Hibernate 6.3.1.Final and H2 2.2.224. As a consequence, the content of the content server database has changed. To export your existing bookmarks from Atoti Market Risk 5.3.0 and import them into 5.4.0, follow these steps:- Launch your Atoti Market Risk 5.3.0 application.
- Export the bookmarks by executing the
mainmethod of the classExportReferenceContentServerin themr-application-testsmodule. You may need to change the values of the properties used for bookmark export - see mr.bookmark.properties. The bookmarks are exported into the folder specified in the value of thecontentServer.bookmarks.export-folder-nameproperty. - Launch the Atoti Market Risk 5.4.0 application with the following properties:
- Stop the Atoti Market Risk 5.4.0 application and copy the
mr_ref_impl_content_service.mv.dbfile from the target folder of themr-applicationmodule to thesrc/main/resourcesfolder of themr-applicationmodule. - Launch the MR 5.4.0 application without the following properties being set:
Constant VALUE_CCY in StoreFieldConstants removed and replaced by constant CCY.
In the mr-common-lib module, the VALUE_CCY constant in StoreFieldConstants has been removed, and the constant CCY is used instead, because those two
constants had the same value: Ccy.
In the mr-pnl-config module, the following classes now use the CCY constant instead of the VALUE_CCY constant:
- SupportedAdjustmentsPnLConfig
- PnLStoreConfig
- PnLAggregatedStoreConfig
- PnLFlatStoreConfig
- SignoffSummaryPnlPublisher
- SummaryPnlPublisher
Catalog name change
The catalog has been renamed toMR from MarketRiskAccelerator. If you are using Atoti Limits with Atoti Market Risk, you need
to change your UI settings. See the Atoti Limits documentation.
Deprecation of Sensitivities vector data model
The vectorized sensitivities are marked as deprecated and for removal in the next version. The sensitivities measure chains and sensitivities store are primarily affected, the following are removed: This deprecation includes the removal of the following classes:Customizing the Market Risk Solution to use store-backed maturity conversion with scalar sensitivities
Customers needing to switch from vectorized to scalar sensitivities may want to keep the store-backed maturity conversion instead of the maturity conversion used by default for scalar sensitivities. To allow the maturity conversion to use stores for the definition of tenors, maturities, and moneynesses when running Atoti Market Risk with scalar sensitivities, a number of@Beans should be provided in a custom @Configuration class:
- A
@Beanfor adding the tenors, maturities, and moneyness stores. - A
@Beanfor adding the Data Load Controller topics for loading data into the stores. - A
@Beanfor the maturity converter using the stores.
The store configuration @Bean
This can be either an AConfigurableSchema or a DatastoreConfiguratorConsumer @Bean creating the three stores.
As we already provide an AConfigurableSchema for the stores, we can use it directly:
The data loading @Bean
This is a copy of the configuration done for the vectorized sensitivities.
The maturity converter @Bean
We can copy the maturity converter from the vectorized sensitivities configuration. To ensure the converter is used by the Solution, mark the @Bean as @Primary.
Maven dependencies
The following test dependency has been added to themr-sensi-lib module:
IMaturityConverterAware class
Thecom.activeviam.accelerator.common.dates.IMaturityConverter interface has been removed from the module mr-common-lib and has been replaced by the
interface com.activeviam.accelerator.common.dates.IMaturityConverter.
Theta: methods renamed
In the classThetaCopper, the following methods have been renamed: