Migration notes 5.4

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

Migrate to 5.4.0-BETA 2

Upgrading from version 5.3.0 - see Atoti Market Risk 5.4-BETA 2 Release Notes.

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-api library module and the market-data-api-spring-boot-starter module for easy auto-configuration. The changes include:
    • MarketDataDateShift enum: Changed the MarketDataDateShift enum value TODAY to CURRENT_DAY to clarify its meaning.
    • Interpolators: Two new interpolators are now accessible from the `IInterpolationService:
      • BilinearInterpolator lets you perform linear interpolation on a 2D surface of values.
      • TrilinearInterpolator lets you perform linear interpolation on a 3D cube of values.
    • Changed new Market Data model: The MarketDataSet and ID fields in the new Market Data data model have been swapped around.
  • Atoti Server: Upgraded to Atoti Server 6.0.12-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-config project to the mr-application project.
  • 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 MarketRiskAccelerator to MR.
  • 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 ne be used. For details, see The MRCombinedCube metrics.
  • Property cleanup: The unused property SENSITIVITY_TYPE has been removed in the DynamicTenorsAndMaturitiesPostProcessor class.
  • 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.
  • 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-query is required when using mr-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.

Breaking changes

  • A number of classes named ...Helper(s) have been renamed to ...Utils for 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.AdjustmentsConstants has been removed and the two constants from this class added to com.activeviam.mr.common.constants.AdjustmentsConstants.
  • ASecurityConfig.PIVOT_USER_ROLES has changed from String[] to List<String>.
  • The METRIC variable 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-config project to the mr-application project.
  • In the mr-common-config project, the class UnsecuredDatabaseServiceConfig has been renamed to WhatIfAwareUnsecuredDatabaseServiceConfig.
  • 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 NoOpPostProcessor is defined in the common lib, the package is now com.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_TYPE has been removed in the DynamicTenorsAndMaturitiesPostProcessor class.
  • 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::addTopic now has a 4th parameter that holds the list of all topic aliases to which the topic belongs. The function DataLoadControllerConfig::registerTopicAliases computes 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 ReferenceLevelLocationShift post-processor with the Common Library ReferenceLevelLocationShiftLight. Any usage of the post-processor will have to be replaced, as will any usage of the mr.metrics.rlshift.post-processor property referring to the old plugin key. The default value of the property has been changed to ReferenceLevelLocationShiftLight.
  • 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 ApplicationJwtConfig has been added to handle the configuration used for JWT authentication.
  • The constant VALUE_CCY in StoreFieldConstants has been removed and replaced by the constant CCY.
  • The MRCombinedCube metrics are now configured by beans with the qualifier SP_QUALIFIER__COMMON_MEASURE_BUILDERS and SP_QUALIFIER__COMMON_MEASURES.
  • The interface IAsyncTask has been replaced by IRefreshTaskthat 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 SplitRatioMarketData store is used for the handling of stock split rations 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-lib and mr-market-data-config have been removed. They were used for the configuration of the Market Data Cube.
  • In the ThetaCopper class, some methods have been renamed. The marketDataPostProcessor and scalarMarketDataPostProcessor methods have been renamed.
  • The com.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.
  • Some methods have been added to the ISensitivityMarketDataMeasures interface and the following methods have been changed: scalarNativeIntermediateInterpolatedDividend, scalarNativeIntermediateInterpolatedTheta, vectorNativeIntermediateInterpolatedTheta
  • For the market data measure chains configuration: the classes names *CurrentDateMarketDataChain, *NextDateMarketDataChain and *PreviousDateMarketDataChain hae 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.

Breaking changes in the Market Data API (formerly Preview Market Data API)

  • The classes that make up the new Market Data API (introduced in Atoti Market Risk 5.3.0) have been moved from the mr-common-config and mr-common-lib modules to new market-data-api and market-data-api-spring-boot-starter modules. The packages of these classes have also changed. However, the sources for the market data stores remain in the mr-sensi-config module. A description of the new modules is given below.
  • The mr.enable.preview.market-data property has been removed, together with the Spring @Conditional classes that were based on this property. To use the new Market Data API, you must now remove the following auto-configuration exclusions from MarketRiskApplication:
    • CubeMarketDataRetrievalConfig.class,
    • CurveMarketDataRetrievalConfig.class,
    • FxRateMarketDataRetrievalConfig.class,
    • SpotMarketDataRetrievalConfig.class,
    • SurfaceMarketDataRetrievalConfig.class,
    • AllMarketDataInterpolatorsConfig.class
    • AllInterpolationTransformationsConfig
  • The I...MarketDataHandler interfaces and their corresponding implementations have been removed.
  • The I...Retriever interfaces now return interface variations of the appropriate market data. For instance, ICubeMarketDataRetriever.getCube now returns ICubeMarketData in place of CubeMarketData.
  • The IMarketDataRetriever interface and corresponding TableSingleMarketDataRetriever implementation has been removed. Retrieval of single market data values is now handled by the relevant I...Retriever interfaces.
  • The IMarketDataService interface has been removed. This reflects the fact that the different market data types are retrieved by distinct interfaces and cannot therefore be collected in a common service. The corresponding TableMarketDataService has been removed.
  • The MarketDataRetrievalService class has been removed and is replaced by the market data retrieval interfaces described below.
  • The IMarketDataKeyTranslator interface has been renamed to IMarketDataCoordinateTranslator.
  • The DatabaseMarketDataKeyTranslator which implemented IMarketDataKeyTranslator<Object[]> has been removed. This has been replaced by DateShiftTranslator implements IMarketDataCoordinateTranslator<LocalDate> which applies the same shift to the asOfDate of market data.
  • The IDateRetrievalService has been renamed to IDateRetriever. The implementation has been renamed from TableDateRetrievalService to TableDateRetriever.
  • The IMarketDataDateService has been renamed to IContextualDateRetriever. The implementation has been renamed from MarketDataDateService to DateShiftingDateRetriever.
  • The MarketDataDateShift enum value TODAY has been renamed to CURRENT_DAY to clarify its meaning.
  • The default value of the moneyness field in the sensitivities and market data has been changed from ATM to N/A. Data in which ATM is the intended value will have to add the value explicitly.
  • The MarketDataSet and ID fields in the new Market Data API data model have been swapped around.
  • The IInterpolator interface has been split into an IInterpolatorSettings interface which is extended by the IInterpolator interface (with less responsibility) and a new IInterpolatorFactory interface.
  • The interpolator classes in com.activeviam.mr.common.services.marketdata.interpolation.interpolators.commonsmath.impl have been updated to reflect the interface changes described above. Each interpolator class now has a corresponding ...InterpolatorFactory class conforming to the IInterpolatorFactory interface.
  • The names of two interpolators have changed to more accurately reflect their intent. The LinearBicubicInterpolator is now the BicubicInterpolator and the LinearTricubicInterpolator is now the TricubicInterpolator.
  • The LinearUnivariateInterpolator class has been removed. Linear interpolation along one axis now supported with the LinearInterpolator class that works for variable numbers of axes.
  • The behavior of the existing interpolators has been changed with respect to the way they handle requests to interpolate coordinates outside their known range of coordinates. Previously this would have caused an OutOfRangeException to be thrown. Now the interpolators modify the requests to use the closest coordinate within the existing range.
  • The ...InterpolatorConfig classes in com.activeviam.mr.common.services.marketdata.interpolation now construct beans of type IInterpolatorFactory instead of IInterpolator.
  • The store InstrumentMarketDataStore has been renamed to SpotMarketData. The classes that were referring to Instrument in their names have been renamed to refer to Spot instead. The same applies to the method/bean names in those classes. The constants that were referring to Instrument in their names have been renamed to refer to Spot instead.
  • The CurveMarketDataStore store has been renamed to CurveMarketData.
  • The SurfaceMarketDataStore store has been renamed to SurfaceMarketData.
  • The CubeMarketDataStore store has been renamed to CubeMarketData.

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 profiles dist-data-node, dist-query-node, and forceNetty (and the property directquery.enabled), we have the following properties:

Property Description Values
starter.deployment.type Specifies the nature of the database used for the cube. It can take three values:
  • in-memory (default): The in-memory datastore is used.
  • direct-query: An external database is used. This replaces the directquery.enabled property.

    note

    An in-memory datastore is still used for configuration data and caching.

  • query-node: No database is used.
starter.deployment.transport Specifies the messenger to use for communication between cubes. It can take two values:
  • local (default): For communication only within a single machine. It cannot be used for distribution, but is faster if distribution isn’t needed.
  • netty: For jgroups communication between machines in a distributed deployment.
  • none: For no communication bus, when no query cube is used.
mr.enable.cubes.common=false An existing flag which turns the MRCombinedCube polymorphic cube on or off.

The following configuration files have been added to match the behavior of the profiles:

Spring profile Configuration file starter.deployment.type starter.deployment.transport combined.disable
default in-memory local unset (false)
dist-data-node application-dist-data-node.yaml in-memory netty true
dist-query-node application-dist-query-node.yaml query-node netty unset (false)
forceNetty application-forceNetty.yaml unset (in-memory) netty unset (false)

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 on 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 metric 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

Storage source Previously used condition Common condition (DQ & In-Memory) In-Memory only condition DirectQuery only Condition
Local @ConditionalOnLocalData @ConditionalOnLocalSource @ConditionalOnLocalData @ConditionalOnDirectQueryWithLocalSource
Azure @ConditionalOnAzureData @ConditionalOnAzureSource @ConditionalOnAzureData @ConfigurationDirectQueryWithAzureSource

New Sources

A new source configuration dedicated to DirectQuery has been added by the configuration classes SensiPnLAzureCsvSourceConfig, 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:

Constant Qualifier Type Source
SP_QUALIFIER__DQ_SENSI_TOPIC_PUBLISHERS “dq-sensi-topic-publishers” Publisher generator Function Sensi for DirectQuery
SP_QUALIFIER__DQ_SENSI_TOPIC_COLUMNS “dq-sensi-topic-columns” Columns generator Function Sensi for DirectQuery
SP_QUALIFIER__DQ_SENSI_TOPIC_TO_STORE_AND_FILE_MAP “dq-sensi-topic-to-store-and-file-map” Definition of the topics Sensi for DirectQuery

Configuration classes

Files Modified

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:

Old class name New class name
DatastoreDescriptionHelper DatastoreDescriptionUtils
MeasureChainHelpers MeasureChainUtils
SchemaHelpers SchemaUtils

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, and 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

The type of the constant 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 a METRIC field, representing the metric that the chain is responsible for creating 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:

Class name Field name
FileUploadPayload filePathSeparator
FileUploadPayload topics
FileUploadTopic name
FileUploadTopic files
Security configuration

The following files have been moved from the mr-common-config project to the mr-application project:

File name Old package New package
IUserLogoutSuccessHandler com.activeviam.mr.common.config.security.filter com.activeviam.mr.application.config.security
CookieUtil com.activeviam.mr.common.config.security com.activeviam.mr.application.config.security
CorsConfig com.activeviam.mr.common.config.security com.activeviam.mr.application.config.security
JwtAuthenticationConfigurer com.activeviam.mr.common.config.security com.activeviam.mr.application.config.security
SameSiteConfig com.activeviam.mr.common.config.security com.activeviam.mr.application.config.security
SecurityJwtProperties com.activeviam.mr.common.config.security com.activeviam.mr.application.config.security
UserDetailsServiceConfig com.activeviam.mr.common.config.security com.activeviam.mr.application.config.security

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

The class MRSecurityFilterChainsConfig has been changed to fix the known 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).

The class DispatcherServletConfig has been added in com.activeviam.mr.application.config.security to contain cookie configuration taken from the MarketRiskApplication class.

Market Data API

Module market-data-api

  • The signature of the ICachingInterpolationService.getInterpolator method has changed: an object is now used for the cacheKy argument instead of a String. The class CachingInterpolationService that implements the ICachingInterpolationService interface has been amended accordingly.

  • In the AMarketDtaPostProcessor class, a third generic type T extends IContextualMarketDataRetriever<C, V>> is needed on top of the previous two C and V, the signature of the abstract method getMarketDataRetriever had been changed from: IMarketDataRetrievalService<C, V> getMarketDataRetriever(ILocation location) to: T getMarketDataRetriever(ILocation location)

  • A new abstract class ADefaultMarketDataPostProcessor has been created, that implements the buildCoordinates method from the requiredLevels attribute.

  • The following new interfaces have been created:

    • IMarketDataRetrieverFactoryServiceAware
    • ICurveMarketDataRetrieverFactoryAware
    • ISurfaceMarketDataRetrieverFactoryAware
    • ICubeMarketDataRetrieverFactoryAware

    For details, see Market data retrieval interfaces

  • The following post-processors have been created:

    • CurvePostProcessor
    • SurfacePostProcessor
    • CubePostProcessor
  • The IMarketDataRetrieverFactory interface has been created.

For details, see Market data retrieval factories

  • The interface IInstrumentMarketDataRetriever has been deleted. The IDefaultMarketDataRetriever interface is used instead for spot market data retrieval.

  • The class IDefaultContextualCurveMarketDataRetriever has been replaced by the class IDefaultMarketDataRetriever.

  • The following interfaces have been changed to use the IDefaultMarketDataRetriever.getMarketData method instead of a specific getMarketData method:

    • ICurveMarketDataRetriever
    • ISurfaceMarketDataRetriever
    • ICubeMarketDataRetriever
    • IFxMarketDataRetriever
  • The following classes have been changed to use the TableSingleMarketDataRetriever.getMarketData method instead of a specific getMarketData method:

    • TableSingleMarketDataRetriever
    • TableCurveMarketDataRetriever
    • TableSurfaceMarketDataRetriever
    • TableCubeMarketDataRetriever
    • TableFxRateMarketDataRetriever
  • TableInstrumentMarketDataRetriever has been removed and is replaced by TableSingleMarketDataRetriever.

  • The following classes have been removed.

    • DateShiftingSurfaceMarketDataRetriever
    • DateShiftingCurveMarketDataRetriever
    • DateShiftingInstrumentMarketDataRetriever
    • DateShiftingCubeMarketDataRetriever
    • DateShiftingFxRateMarketDataRetriever
  • The following interfaces have been removed:

    • IContextualInstrumentMarketDataRetriever
    • IContextualCurveMarketDataRetriever
    • IContextualSurfaceMarketDataRetriever
    • IContextualCubeMarketDataRetriever
    • IContextualFxRateMarketDataRetriever
  • The new implementations of IDefaultContextualMarketDataRetriever are:

    • SingleMarketDataRetriever
    • InterpolatingCurveMarketDataRetriever
    • InterpolatingSurfaceMarketDataRetriever
    • InterpolatingCubeMarketDataRetriever
    • FxMarketDataRetriever
  • The class ACachingMarketDataRetrievalService has been deleted and is replaced by the SingleMarketDataRetriever.

  • The interface IMarketDataRetrievalService has been deleted and is replaced by the IMarketDataRetrieverFactoryService interface.

  • The interface IMarketDataRetrieverFactoryService and the implementation MarketDataRetrieverFactoryService have been created.

  • The DateShiftTranslator has been modified to handle a list of objects instead of a single coordinate.

  • In the interface IMarketDataCoordinateTranslator, the getMarketDataDateService() method that was not relevant has been removed.

  • In the class MarketDataConstants, the values of the following constants have been modified:

Constant name New value Old value
CUBE_MARKET_DATA_STORE CubeMarketData CubeMarketDataStore
CURVE_MARKET_DATA_STORE CurveMarketData CurveMarketDataStore
INSTRUMENT_MARKET_DATA_STORE SpotMarketData InstrumentMarketDataStore
SURFACE_MARKET_DATA_STORE SurfaceMarketData SurfaceMarketDataStore
FX_RATE_MARKET_DATA_STORE FxRateMarketData FxRateMarketDataStore

For details, see Spring configuration classes.

Module market-data-api-spring-boot-starter

  • InstrumentMarketDataRetrievalConfig has been renamed to SpotMarketDataRetrievalConfig.
  • In AllMarketDataRetrievalConfig, the import of the class MarketDataRetrieverFactoryServiceConfig has been added.
  • The class MarketDataRetrieverFactoryServiceConfig has been added in the file org.springframework.boot.autoconfigure.AutoConfiguration.imports.
  • The configuration classes SpotMarketDataRetrievalConfig, CurveMarketDataRetrievalConfig, SurfaceMarketDataRetrievalConfig,
  • CubeMarketDataRetrievalConfig, FxRateMarketDataRetrievalConfig have been changed to reflect the changes in the translator and to use the new factories.

Configuration

The following attributes have been added to the RiskPostProcessorInjector class:

    protected final CurveMarketDataRetrieverFactory curveFactory;
	protected final SurfaceMarketDataRetrieverFactory surfaceFactory;
	protected final CubeMarketDataRetrieverFactory cubeFactory;
	protected final IMarketDataRetrieverFactoryService<IDefaultContextualMarketDataRetriever> retrieverFactoryService;

and the following injections have been added in the apManagerInitPrerequisitePluginInjections method of the same class:

    injectAll(ICurveMarketDataRetrieverFactoryAware.class, curveFactory);
	injectAll(ISurfaceMarketDataRetrieverFactoryAware.class, surfaceFactory);
	injectAll(ICubeMarketDataRetrieverFactoryAware.class, cubeFactory);
	injectAll(IMarketDataRetrieverFactoryServiceAware.class, retrieverFactoryService);

Store InstrumentMarketDataStore renamed to SpotMarketData

  • See section Modified stores for the change of the store name.
  • The classes that were referring to Instrument in their names have been renamed to refer to Spot instead. The same applies to the method/bean names in those classes:

Module market-data-api:

New class name Old class name New method or bean name Old method or bean name
SpotMarketDataStore InstrumentMarketDataStore spotMarketDataStoreDescription instrumentMarketDataStoreDescription
SpotMarketDataRetrievalConfig InstrumentMarketDataRetrievalConfig spotMarketDataStore instrumentMarketDataStore
spotDateRetriever instrumentDateRetriever
spotDateShiftingDateRetriever instrumentDateShiftingDateRetriever
spotRetriever instrumentRetriever

Module mr-common-config:

New class name Old class name New method or bean name Old method or bean name
ConditionalOnBCSpotMarketDataFileFormatDisabled ConditionalOnBCInstrumentMarketDataFileFormatDisabled
ConditionalOnBCSpotMarketDataFileFormatEnabled ConditionalOnBCInstrumentMarketDataFileFormatEnabled
BeanDisabledBCSpotMarketDataFileFormat BeanDisabledBCInstrumentMarketDataFileFormat
SpotMarketDataFileFormatDefined InstrumentMarketDataFileFormatDefined
BeanEnabledBCSpotMarketDataFileFormat BeanEnabledBCInstrumentMarketDataFileFormat
ConfigurationDisabledBCSpotMarketDataFileFormat ConfigurationDisabledBCInstrumentMarketDataFileFormat
ConfigurationEnabledBCSpotMarketDataFileFormat ConfigurationEnabledBCInstrumentMarketDataFileFormat
SpotMarketDataCsvSourceParametersProviderConfig InstrumentMarketDataCsvSourceParametersProviderConfig spotMarketDataTopicToStoreAndFilePatternMapDefault instrumentMarketDataTopicToStoreAndFilePatternMapDefault
BCSpotMarketDataCsvSourceParametersProviderConfig BCInstrumentMarketDataCsvSourceParametersProviderConfig spotMarketDataParameters instrumentMarketDataParameters
spotTopicColumns instrumentTopicColumns
spotTopicPublishers instrumentTopicPublishers
  • The constants that were referring to Instrument in their names have been renamed to refer to Spot instead:

  • Module market-data-api:

Class in which the constant is defined New constant name Old constant name New constant value Old constant value
SpotMarketDataRetrievalConfig (renamed from InstrumentMarketDataRetrievalConfig) RETRIEVER_NAME RETRIEVER_NAME SPOT_MARKET_DATA_RETRIEVER DEFAULT_DATE_SHIFTING_INSTRUMENT_RETRIEVER
MarketDataConstants SPOT_MARKET_DATA_STORE INSTRUMENT_MARKET_DATA_STORE SpotMarketDataStore InstrumentMarketDataStore

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. The following classes have been modified in the mr-sensi-config module:

Modified class Changes
DeltaCurrentDateMarketDataChain New bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Eq" and MeasureGroup SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Fx" and MeasureGroup SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Curves" and MeasureGroup SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Components"
Change of configuration for bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT
DeltaNextDateMarketDataChain New bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Eq" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Fx" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Curves" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
Change of configuration for bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT
DeltaPreviousDateMarketDataChain New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " EqFx" and MeasureGroup SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Curves" and MeasureGroup SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_FILTERED_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_EXPAND_INTERMEDIATE_INT
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD_NATIVE
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD
GammaCurrentDateMarketDataChain New bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " EqFX" and MeasureGroup SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Curves" and MeasureGroup SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Components"
Change of configuration for bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT
GammaNextDateMarketDataChain New bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Eq" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Fx" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Curves" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
Change of configuration for bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT
GammaPreviousDateMarketDataChain New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " EqFx" and MeasureGroup SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Curves" and MeasureGroup SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_FILTERED_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_EXPAND_INTERMEDIATE_INT
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD_NATIVE
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD
VegaCurrentDateMarketDataChain New bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Non GIRR" and MeasureGroup SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Cubes" and MeasureGroup SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Components"
Change of configuration for bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT
VegaNextDateMarketDataChain New bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Non GIRR" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Cubes" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
Change of configuration for bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT
VegaPreviousDateMarketDataChain New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Non GIRR" and MeasureGroup SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " GIRR" and MeasureGroup SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_FILTERED_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_EXPAND_INTERMEDIATE_INT
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD_NATIVE
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD
VolgaCurrentDateMarketDataChain New bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Non GIRR" and MeasureGroup SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Cubes" and MeasureGroup SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Components"
Change of configuration for bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT
VolgaCurrentDateMarketDataChain New bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Non GIRR" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Cubes" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
Change of configuration for bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT
VolgaPreviousDateMarketDataChain New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Non GIRR" and MeasureGroup SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " GIRR" and MeasureGroup SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_FILTERED_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_EXPAND_INTERMEDIATE_INT
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD_NATIVE
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD
CrossGammaCurrentDateMarketDataChain New bean with Qualifier SPLIT_RATIO_2_CURRENT
New bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " spot" and MeasureGroup SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + CURRENT_MD_2_NATIVE_INTERMEDIATE_INT + " spot" and MeasureGroup SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Components"
Change of configuration for bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT
Change of configuration for bean with Qualifier SENSI + CURRENT_MD_2_NATIVE_INTERMEDIATE_INT
CrossGammaNextDateMarketDataChain New bean with Qualifier SPLIT_RATIO_2_NEXT
New bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " spot" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + NEXT_MD_2_NATIVE_INTERMEDIATE_INT + " spot" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
Change of configuration for bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT
Change of configuration for bean with Qualifier SENSI + NEXT_MD_2_NATIVE_INTERMEDIATE_INT
CrossGammaPreviousDateMarketDataChain New bean with Qualifier SPLIT_RATIO_2_PREVIOUS
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " spot" and MeasureGroup SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + PREVIOUS_MD_2_NATIVE_INTERMEDIATE_INT + " spot" and MeasureGroup SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT
New bean with Qualifier SENSI + PREVIOUS_MD_2_NATIVE_INTERMEDIATE_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_FILTERED_INT
New bean with Qualifier SENSI + PREVIOUS_MD_2_NATIVE_INTERMEDIATE_FILTERED_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_EXPAND_INTERMEDIATE_INT
New bean with Qualifier SENSI + PREVIOUS_MD_2_NATIVE_EXPAND_INTERMEDIATE_INT
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD_NATIVE
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD_2_NATIVE
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD_2
VannaCurrentDateMarketDataChain New bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Non GIRR" and MeasureGroup SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Cubes" and MeasureGroup SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + CURRENT_MD_2_NATIVE_INTERMEDIATE_INT + " Non GIRR" and MeasureGroup SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + CURRENT_MD_2_NATIVE_INTERMEDIATE_INT + " Cubes" and MeasureGroup SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT + " Components"
Change of configuration for bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT
Change of configuration for bean with Qualifier SENSI + CURRENT_MD_2_NATIVE_INTERMEDIATE_INT
VannaNextDateMarketDataChain New bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Non GIRR" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Cubes" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + NEXT_MD_2_NATIVE_INTERMEDIATE_INT + " Eq" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + NEXT_MD_2_NATIVE_INTERMEDIATE_INT + " Fx" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + NEXT_MD_2_NATIVE_INTERMEDIATE_INT + " Curves" and MeasureGroup SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT + " Components"
Change of configuration for bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT
Change of configuration for bean with Qualifier SENSI + NEXT_MD_2_NATIVE_INTERMEDIATE_INT
VannaPreviousDateMarketDataChain New bean with Qualifier SPLIT_RATIO_2_PREVIOUS
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Non GIRR" and MeasureGroup SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Cubes" and MeasureGroup SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + PREVIOUS_MD_2_NATIVE_INTERMEDIATE_INT + " EqFx" and MeasureGroup SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + PREVIOUS_MD_2_NATIVE_INTERMEDIATE_INT + " Curves" and MeasureGroup SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT + " Components"
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT
New bean with Qualifier SENSI + PREVIOUS_MD_2_NATIVE_INTERMEDIATE_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_FILTERED_INT
New bean with Qualifier SENSI + PREVIOUS_MD_2_NATIVE_INTERMEDIATE_FILTERED_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_EXPAND_INTERMEDIATE_INT
New bean with Qualifier SENSI + PREVIOUS_MD_2_NATIVE_EXPAND_INTERMEDIATE_INT
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD_NATIVE
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD_2_NATIVE
CorrelationCurrentDateMarketDataChain Change of configuration for bean with Qualifier SENSI + CURRENT_MD_NATIVE_INTERMEDIATE_INT
CorrelationNextDateMarketDataChain Change of configuration for bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT
CorrelationPreviousDateMarketDataChain New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_FILTERED_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_EXPAND_INTERMEDIATE_INT
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD_NATIVE
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD
DividendCurrentDateMarketDataChain Change of configuration for bean with Qualifier SENSI + NEXT_MD_2_NATIVE_INTERMEDIATE
DividendNextDateMarketDataChain Change of configuration for bean with Qualifier SENSI + NEXT_MD_NATIVE_INTERMEDIATE_INT
DividendPreviousDateMarketDataChain New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_INTERMEDIATE_FILTERED_INT
New bean with Qualifier SENSI + PREVIOUS_MD_NATIVE_EXPAND_INTERMEDIATE_INT
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD_NATIVE
Change of configuration for bean with Qualifier SENSI + PREVIOUS_MD

In the mr-sensi-lib module:

  • The following methods have been added to the ISensitivityMarketDataMeasures class:

    • levelFromIdentifier
    • singleValueMarketData
    • sumWithoutNull
    • multiplyWithoutNull
    • divideWithoutNull
    • curveMarketData
    • surfaceMarketData
    • cubeMarketData and the following methods have been changed: scalarNativeIntermediateInterpolatedDividend, scalarNativeIntermediateInterpolatedTheta, vectorNativeIntermediateInterpolatedTheta
  • In the SensiMeasureNames, the following constants have been added:

    • PREVIOUS_MD_NATIVE_INTERMEDIATE_INT
    • PREVIOUS_MD_2_NATIVE_INTERMEDIATE_INT
    • PREVIOUS_MD_NATIVE_EXPAND_INTERMEDIATE_INT
    • PREVIOUS_MD_2_NATIVE_EXPAND_INTERMEDIATE_INT
    • PREVIOUS_MD_NATIVE_INTERMEDIATE_FILTERED_INT
    • PREVIOUS_MD_2_NATIVE_INTERMEDIATE_FILTERED_INT
    • NEXT_MD_2_NATIVE_INTERMEDIATE_INT
    • NEXT_MD_NATIVE_INTERMEDIATE_FILTERED_INT and the following methods have been added to that class:
    • getPreviousDateMdNativeIntermediateInterpolated()
    • getPreviousDateMd2NativeIntermediateInterpolated()
    • getPreviousDateMdNativeExpandIntermediateInterpolated()
    • getPreviousDateMd2NativeExpandIntermediateInterpolated()
    • getPreviousDateMdNativeIntermediateFilteredInterpolated()
    • getPreviousDateMd2NativeIntermediateFilteredInterpolated()
Market Data configuration

Configuration classes for the new Market Data API have been moved from the mr-common-config module to the new market-data-api-spring-boot-starter module. By adding this module as a dependency, the interpolator services will be auto-configured. The configured classes are:

Old class New class
CubeMarketDataStoreConfig CubeMarketDataRetrievalConfig
CurveMarketDataStoreConfig CurveMarketDataRetrievalConfig
InstrumentMarketDataStoreConfig SpotMarketDataRetrievalConfig
SurfaceMarketDataStoreConfig SurfaceMarketDataRetrievalConfig
- FxRateMarketDataRetrievalConfig
Interpolation configuration

All configuration of interpolation within the new Market Data API now resides in the new market-data-api-spring-boot-starter module. By adding this module as a dependency, the interpolator services will be auto-configured.

The ...InterpolatorConfig classes now create beans of type IInterpolatorFactory instead of IInterpolator. These factories can be used to construct the required interpolators.

In this same package, a BilinearInterpolatorConfig class and a TrilinearInterpolatorConfig class have been added which create factories for interpolators covering two and three axes respectively.

Preview Market Data property removal

The mr.enable.preview.market-data property has been removed, together with the following Spring @Conditional classes based on it:

Class Condition Replacement
@ConfigurationEnabledPreviewMarketData mr.enable.preview.market-data is true market-data-api-spring-boot-starter is a dependency of the current project.
@ConfigurationDisabledPreviewMarketData mr.enable.preview.market-data is false
@BeanEnabledPreviewMarketData mr.enable.preview.market-data is true market-data-api-spring-boot-starter is a dependency of the current project.
@BeanDisabledPreviewMarketData mr.enable.preview.market-data is false
@ConditionalOnPreviewMarketDataEnabled mr.enable.preview.market-data is true market-data-api-spring-boot-starter is a dependency of the current project.
@ConditionalOnPreviewMarketDataDisabled mr.enable.preview.market-data is false
DirectQuery configuration

The following configuration classes have been added to enable DirectQuery with Databricks:

Class Details
DatabricksSessionConfig Configures the connection to Databricks
MRDirectQueryConfig Imports required Databricks configuration classes

Input file formats

Important note:

  • The input file MarketData.csv has been deprecated. It’s only used for vectorized sensitivities. For scalar sensitivities, the input files Spot_Market_Data.csv, Curve_Market_Data.csv, Surface_Market_Data.csv, Cube_Market_Data.csv, and Correlation_Market_Data.csv need to be used instead.
  • The input file FXRates.csv is not used anymore. The input file FX_Rate_Market_Data.csv needs to be used instead.
  • The input file CorporateAction.csv has been deprecated. It’s only used for handling dividends market data for vectorized sensitivities. For dividends with scalar sensitivities, the input files Dividend.csv needs to be used instead. For stock split ratios, both for vectorized and scalar sensitivities, the file SplitRatio.csv needs to be used instead of CorporateAction.csv.

New files

File Purpose
Correlation_Market_Data.csv Stores the correlation market data.
FX_Rate_Market_Data.csv Stores the FX rate market data.
Dividend.csv Stores the dividend market data.
SplitRatio.csv Stores the stock split ratio market data.

Modified

The file Instrument_Market_Data.csv has been renamed to Spot_Market_Data.csv

Modification File Field Optional Description
Changed default MarketData.csv MoneynessLabels Y List of moneyness labels, if applicable. The default value is now N/A.
Changed default VannaSensitivities.csv, CrossGammaSensitivities.csv, CorrelationSensitivities.csv MoneynessLabels Y List of moneyness labels, if applicable. The default value is now N/A.
Changed default DeltaSensitivities.csv, GammaSensitivities.csv, VegaSensitivities.csv, VolgaSensitivities.csv, CashSensitivities.csv, ThetaSensitivities.csv MoneynessLabels Y List of moneyness labels, if applicable. The default value is now N/A.
Changed header VannaSensitivities.csv, CrossGammaSensitivities.csv, CorrelationSensitivities.csv None N/A The header ValueCCy has been replaced by Ccy.
Changed header DeltaSensitivities.csv, GammaSensitivities.csv, VegaSensitivities.csv, VolgaSensitivities.csv, CashSensitivities.csv, ThetaSensitivities.csv None N/A The header ValueCCy has been replaced by Ccy.
Changed default Spot_Market_Data.csv MoneynessLabels Y List of moneyness labels, if applicable. The default value is now N/A.
Changed fields Spot_Market_Data.csv InstrumentId, MarketDataSet - Changed order to MarketDataSet, InstrumentId.
Changed default Curve_Market_Data.csv MoneynessLabels Y List of moneyness labels, if applicable. The default value is now N/A.
Changed fields Curve_Market_Data.csv CurveId, MarketDataSet - Changed order to MarketDataSet, CurveId.
Changed default Surface_Market_Data.csv MoneynessLabels Y List of moneyness labels, if applicable. The default value is now N/A.
Changed fields Surface_Market_Data.csv SurfaceId, MarketDataSet - Changed order to MarketDataSet, SurfaceId.
Changed default Cube_Market_Data.csv MoneynessLabels Y List of moneyness labels, if applicable. The default value is now N/A.
Changed fields Cube_Market_Data.csv CubeId, MarketDataSet - Changed order to MarketDataSet, CubeId.

Removed

File Details
FXRates.csv The input file FX_Rate_Market_Data.csv has to be used instead.

Configuration

Configuration properties

Properties added

The following properties have been created for the new market-data-api-spring-boot-starter module:

Property Default value Description
market-data-api.defaults.tenor “N/A” Default value for tenor coordinates. This is equivalent to the mr.tenors-and-maturities.default-value property of the old market data API.
market-data-api.defaults.moneyness “N/A” Default value for moneyness coordinates. This is equivalent to the mr.moneyness.default-value property of the old market data API.
market-data-api.defaults.maturity “N/A” Default value for maturity coordinates. This is equivalent to the mr.tenors-and-maturities.default-value property of the old market data API.
market-data-api.fx.pivot-currency “EUR” Where no FX rate exists between two currencies, a third (pivot) currency provides rates against both and is used to derive a rate between them. This is equivalent to the mr.fx.common-currency property of the old market data API.

The following properties have been created in the mr-sensi-config module:

Property Default value Description
mr.sensi.file-patterns.split-ratio “*SplitRatio.csv” Pattern for the Split Ratio input file.
mr.sensi.file-patterns.dividends “*Dividends.csv” Pattern for the Dividend input file.
mr.sensi.file-patterns.correlation-market-data “*Correlation_Market_Data.csv” Pattern for the Correlation market data input file.
Properties modified
Property Name Comment Value
mr.moneyness.default-value The default value has changed to N/A from ATM. N/A
mr.enable.data-model.scalar-sensitivities The default value has changed to true from false. true
mr.sign-off.extractionTemplates.defaultMapping The default value has changed to true from false. true
mr.sign-off.extractionTemplatesScalar.defaultMapping The default value has changed to CubeAdjustmentExport, FXRateExport, FxRateMarketDataExport, "BookParentChildExport from CubeAdjustmentExport, FXRateExport, BookParentChildExport. CubeAdjustmentExport, FXRateExport, FxRateMarketDataExport, "BookParentChildExport
Properties removed

The mr.enable.preview.market-data property has been removed. the "mr.enable.cubes.market-data property has been removed.

Property Files

Files Modified
application.yaml

The following properties have been added to address cors issues and the removal of the distribution Spring profiles:

Key Value Description
server.servlet.session.cookie.secure true Enables/disables always marking the cookie as secure.
server.servlet.session.cookie.http-only true Enables/disables using the “HttpOnly” attribute for the cookie.
server.servlet.session.cookie.same-site none SameSite setting for the cookie.
starter.deployment.type in-memory Specifies the nature of the database used for the cube.
starter.deployment.transport local Specifies the messenger to use for communication between cubes.
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:

Property Name Comment Value
mr.enable.tracing.open-telemetry Enables the OpenTelemetry Configuration. false
mr.open-telemetry.zipkin-span-exporter-url URL to use for zipkin SpanProcessor bean. http://localhost:9411/api/v2/spans
mr.open-telemetry.logging-span-exporter-enabled Enables the SpanProcessor bean with LoggingSpanExporter. false

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

New store configurations are available in the market-data-api module. These stores are not currently created in Atoti Market Risk by default, which continues to use the old market data store for the present, but are available for those who wish to use the new Market Data API.

Store Class Details
CorrelationMarketData CorrelationMarketDataStore Contains Correlation market data.
DividendMarketData DividendMarketDataStore Contains split ratio market data.
FxRateMarketData FxRateMarketDataStore A store that is part of the new Market Data API for FX Rate market data.
SplitRatioMarketData SplitRatioMarketDataStore Contains dividend market data.
  • The CorporateAction store has been deprecated. It is still used to handle dividends for vectorized sensitivities, but not for scalar sensitivities. The stores DividendMarketData and SplitRatioMarketData should be used instead.
  • The MarketData store has been deprecated. It is still used to handle dividends for vectorized sensitivities, but not for scalar sensitivities. The stores SpotMarketData, CurveMarketData, SurfaceMarketData, CubeMarketData and CorrelationMarketData should be used instead.
  • The FXRates store has been deprecated. It is not used anymore, and will be removed. The store FxRateMarketData needs to be used instead.

*For details, see New Dividend and Split Ratio stores.

Modified store configurations

  • The InstrumentMarketData store has been renamed to SpotMarketData.

  • The CurveMarketDataStore store has been renamed to CurveMarketData.

  • The SurfaceMarketDataStore store has been renamed to SurfaceMarketData.

  • The CubeMarketDataStore store has been renamed to CubeMarketData.

  • The following store configurations in the market-data-api module have been modified. These stores are not currently created in Atoti Market Risk by default, which continues to use the old market data store for the present, but are available for those who wish to use the new Market Data API.

Modification Store Class Field Type Description
Reordered CubeMarketData CubeMarketDataStore MarketDataSet String This now precedes CubeId.
Reordered CubeMarketData CubeMarketDataStore CubeId String This is now preceded by MarketDataSet.
Reordered CurveMarketData CurveMarketDataStore MarketDataSet String This now precedes CurveId.
Reordered CurveMarketData CurveMarketDataStore CurveId String This is now preceded by MarketDataSet.
Reordered SpotMarketData SpotMarketDataStore MarketDataSet String This now precedes InstrumentId.
Reordered SpotMarketData SpotMarketDataStore InstrumentId String This is now preceded by MarketDataSet.
Reordered SurfaceMarketData SurfaceMarketDataStore MarketDataSet String This now precedes SurfaceId.
Reordered SurfaceMarketData SurfaceMarketDataStore SurfaceId String This is now preceded by MarketDataSet.
Secondary index added CubeMarketData CubeMarketDataStore MarketDataSet String A secondary index has been added on the AsOfDate, MarketDataSet, and CubeId fields.
Secondary index added SurfaceMarketData SurfaceMarketDataStore MarketDataSet String A secondary index has been added on the AsOfDate, MarketDataSet, and SurfaceId fields.

Marked for removal

Name Type Module Affected Class
Market Data Store Store configuration for vectors format mr-sensi-config VectorMarketDataStoreConfig
Trade Sensitivities Store Store configuration for vectors format mr-sensi-config VectorTradeSensitivitiesStoreConfig
Sensitivities Aggregated Store Store configuration for vectors format mr-sensi-config VectorSensiAggregatedStoreConfig
Sensitivities Flat Store Store configuration for vectors format mr-sensi-config VectorSensiFlatStoreConfig
FXRates Store Store configuration for FX rates that is not used any more t mr-common-config FxRateStoreConfig

Databases

Added tables

Table Details
CORRELATION_MARKET_DATA Market data related to the correlation between risk factors
CUBE_MARKET_DATA Market data defined along three axes (tenors, moneyness and underlying maturities).
CURVE_MARKET_DATA Market data defined along a tenor axis.
DIVIDEND_MARKET_DATA Market data related to dividends.
FX_RATE_MARKET_DATA FX rates.
SPLIT_RATIO_MARKET_DATA Market data related to stock splits.
SPOT_MARKET_DATA Spot price market data.
SURFACE_MARKET_DATA Market data defined along two axes (tenors and moneyness).

Cube schema

The Market Data Cube has been deleted.

Measures

Added

Cube Measure Details
Sensitivity Cube Split Ratio 2 Current Split of the secondary underlying instrument as of current date
Sensitivity Cube Split Ratio 2 Previous Split of the secondary underlying instrument as of previous date

Removed

The following debug market data measures found in the mr-sensi-config module were removed:

Measure removed File location
Current Market Data Native Intermediate Int Debug CorrelationCurrentDateMarketDataChain.java, DeltaCurrentDateMarketDataChain.java, GammaCurrentDateMarketDataChain.java, VannaCurrentDateMarketDataChain.java, VegaCurrentDateMarketDataChain.java, VolgaCurrentDateMarketDataChain.java
Current Market Data 2 Native Intermediate Int Debug CorrelationCurrentDateMarketDataChain.java, VannaCurrentDateMarketDataChain.java
Current Market Data Native Intermediate Filtered Int Debug CorrelationCurrentDateMarketDataChain.java, DeltaCurrentDateMarketDataChain.java, GammaCurrentDateMarketDataChain.java, VannaCurrentDateMarketDataChain.java, VegaCurrentDateMarketDataChain.java, VolgaCurrentDateMarketDataChain.java
Current Market Data 2 Native Intermediate Filtered Int Debug CorrelationCurrentDateMarketDataChain.java, VannaCurrentDateMarketDataChain.java
Current Market Data Native Expand Intermediate Int Debug CorrelationCurrentDateMarketDataChain.java, DeltaCurrentDateMarketDataChain.java, GammaCurrentDateMarketDataChain.java, VannaCurrentDateMarketDataChain.java, VegaCurrentDateMarketDataChain.java, VolgaCurrentDateMarketDataChain.java
Current Market Data 2 Native Expand Intermediate Int Debug CorrelationCurrentDateMarketDataChain.java, VannaCurrentDateMarketDataChain.java
Current Market Native Debug CorrelationCurrentDateMarketDataChain.java, DeltaCurrentDateMarketDataChain.java, GammaCurrentDateMarketDataChain.java, VannaCurrentDateMarketDataChain.java, VegaCurrentDateMarketDataChain.java, VolgaCurrentDateMarketDataChain.java
Current Market Native 2 Debug CorrelationCurrentDateMarketDataChain.java, VannaCurrentDateMarketDataChain.java
Previous Market Native Debug CorrelationPreviousDateMarketDataChain.java, DeltaPreviousDateMarketDataChain.java, GammaPreviousDateMarketDataChain.java, VannaPreviousDateMarketDataChain.java, VegaPreviousDateMarketDataChain.java, VolgaPreviousDateMarketDataChain.java
Previous Market Native 2 Debug CorrelationPreviousDateMarketDataChain.java, VannaPreviousDateMarketDataChain.java

For additional changes related to this, see Removal of debug market data measures.

Deprecation of Sensitivities vector measures
Name Type Module Affected Class
Current MD Native Intermediate Int. Vector Measure mr-sensi-config *CurrentDateMarketDataChain
Current MD Native Intermediate Filtered Int. Vector Measure mr-sensi-config *CurrentDateMarketDataChain
Current MD Native Expand Intermediate Int. Vector Measure mr-sensi-config *CurrentDateMarketDataChain
Next MD Native Intermediate Int. Vector Measure mr-sensi-config *NextDateMarketDataChain
Next MD Native Intermediate Int.filtered Vector Measure mr-sensi-config *NextDateMarketDataChain
PnL Explain Native Intermediate Next Date Vector Measure mr-sensi-config *PnLExplainChain
PnL Explain Native Expand Next Date Vector Measure mr-sensi-config *PnLExplainChain
.Ladder.Pillars.Vector.Expand Vector Measure mr-sensi-config *LadderExpansionChain
.Native.SUM.Technical.Filtered Vector Measure mr-sensi-config *NativeCurrencyChain
.Native.Vector.Expand Vector Measure mr-sensi-config *NativeCurrencyChain
Previous Vector Native Expand Vector Measure mr-sensi-config *NativeCurrencyChain
Shift Vector Vector Measure mr-sensi-config *ShiftViewerChain
Shift Vector Expanded Vector Measure mr-sensi-config *ShiftViewerChain
Shift Vector Max Level Vector Measure mr-sensi-config *ShiftViewerChain
Shift Vector Interpolated Vector Measure mr-sensi-config *ShiftViewerChain
Shift Vector Interpolated Expanded Vector Measure mr-sensi-config *ShiftViewerChain
Shift Vector Interpolated Max Level Vector Measure mr-sensi-config *ShiftViewerChain
Shift Vector Normalized Vector Measure mr-sensi-config *ShiftViewerChain
Shift Vector Normalized Expanded Vector Measure mr-sensi-config *ShiftViewerChain
Shift Vector Normalized Max Level Vector Measure mr-sensi-config *ShiftViewerChain
Shift Vector Interpolated Normalized Vector Measure mr-sensi-config *ShiftViewerChain
Shift Vector Interpolated Normalized Expanded Vector Measure mr-sensi-config *ShiftViewerChain
Shift Vector Interpolated Normalized Max Level Vector Measure mr-sensi-config *ShiftViewerChain
.Native.SUM.Technical.Filtered.Retrieval Vector Measure mr-sensi-config *TaylorChain
.Native.SUM.Technical.Filtered Summary Vector Measure mr-sensi-config Summary*NativeCurrencyChain
Native Summary Vector Measure mr-sensi-config Summary*NativeCurrencyChain
Vector Measure mr-sensi-config

* {Cash, Correlation, Crossgamma, Delta, Dividend, Gamma, Theta, Vanna, Vega}

Context values

Removed

Name Details
EnableMDStringDebug The context value was removed as part of removing the Debug measures.

DirectQuery scripts

Added

Script Details
mr-directquery/src/test/resources/databases/databricks/createMR.sql Creates the current MR schema in a Databricks database.
mr-directquery/src/test/resources/databases/databricks/loadMR.sql Loads MR reference data into a Databricks database.

Changed

Script Details
mr-directquery/src/test/resources/databases/mssql/createMR.sql Removed creation of MarketData store. Added creation of new Market Data stores (spot, curve, surface, cube, dividend, split-ratio). Modified creation of FXRate store.
mr-directquery/src/test/resources/databases/mssql/loadMR.sql Removed SQL to write to MarketData store. Added SQL to write to new Market Data stores (spot, curve, surface, cube, dividend, split-ratio).
mr-directquery/src/test/resources/databases/snowflake/createMR.sql Removed creation of MarketData store. Added creation of new Market Data stores (spot, curve, surface, cube, dividend, split-ratio). Modified creation of FXRate store.
mr-directquery/src/test/resources/databases/snowflake/loadMR.sql Removed SQL to write to MarketData store. Added SQL to write to new Market Data stores (spot, curve, surface, cube, dividend, split-ratio).

Modules removed

The modules mr-market-data-lib and mr-market-data-config have been removed. They were used for the configuration of the Market Data Cube.

Other changes

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.createHibernateConfiguration now throws an ActiveViamRuntimeException instead of a RuntimeException.
  • StaticResourcesHandler.CLASSPATH is a new private constant with the value "classpath:".
  • Nested if conditions have been removed from AdjustedCellPropertiesHandler.getForeColor\getBackColor.
  • The static variable MarketRiskApplication.context, of type ConfigurableApplicationContext, has been removed.
  • The JMXEnabler bean named JMXDatastoreEnabler, defined in MarketRiskConfig has been renamed to jmxDatastoreEnabler.
  • The JMXEnabler bean named JMXDirectMemoryMonitoringEnabler, defined in MonitorConfig has been renamed to jmxDirectMemoryMonitoringEnabler.
  • The private method performTransaction has been added to the AdjustmentExecutionConfig class 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 instace, this has been changed for the getConfiguredStageTopics method of the FileUploadWhatIfRestfulService class.
  • The main method of the InvokeBranchRelease class now uses the Map.of method to store the JMX credentials, instead of instantiating a HashTable.
  • The new configuration class ApplicationJwtConfig has been added to handle the configuration used the properties defined for JWT authentication.
  • Deprecated description IStoreFormat is replaced by IDataTable.

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 MR 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 it’s classes are available throughout the MR 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 will be automatically configured by Spring and made available to the application context. The following classes from the starter module will be automatically imported:

  • 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

The starter module is a dependency of the mr-sensi-config module. But, as Atoti Market Risk continues to use the old market data API for this release, each of the above classes is disabled from auto-configuration within the MarketRiskApplication class.

In addition to supporting cube, curve, instrument, and surface market data, FX rates are now supported and a corresponding FxRateMarketDataStore now exists.

The structure of the new Market Data API has also changed significantly from the previous release. The interfaces for retrieving market data from stores are different. Previously, a common 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 stores 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 that handles caching within a query cache.

Finally, an AMarketDataPostProcessor is now provided that should provide the basis for retrieval of market data within a measure chain.

Lambda interface changes

Old interface New interface Usage
BiFunction<ICanStartBuildingSchema, IDatastoreSchemaDescription, BuildableActivePivotSchemaDescriptionBuilder> CubeBuilderFunction All the beans with @Qualifier("Cube").
DoubleBinaryOperator ShiftScalingFunction IInterpolationConfiguration::normalizationShiftOperator
BinaryOperator PrePostFunction IInterpolationConfiguration::getPreMarketDataInterpolationFunction
BinaryOperator PrePostFunction IInterpolationConfiguration::getPostMarketDataInterpolationFunction
BinaryOperator PrePostFunction IInterpolationConfiguration::getPreShiftDataInterpolationFunction
BinaryOperator PrePostFunction IInterpolationConfiguration::getPostShiftDataInterpolationFunction
DoubleBinaryOperator AbsoluteToRelativeFunction IInterpolationConfiguration::absoluteToRelativeMarketDataOperator
DoubleBinaryOperator RelativeToAbsoluteFunction IInterpolationConfiguration::relativeToAbsoluteMarketDataOperator
DoubleBinaryOperator ShiftScalingFunction IInterpolationConfiguration::normalizationShiftOperator
BiFunction<Double, ICorporateAction, Double> CorporateActionOperator IInterpolationConfiguration::corporateActionOperator
UnaryOperator<ICanBuildCommonCubeDescription> QueryCubeAggregateProviderConfig Bean with @Qualifier("MRCombinedCubeConfiguration").
UnaryOperator<ICanBuildCubeDescription> AggregateProviderConfig All beans with the corresponding return signature.
ICustomParameters.ILocationFunction LocationFunction ICustomParameters::getLeafCoordinatesFunction
BiConsumer<String, Collection<Object[]» DatastorePublisher A function with the behavior of ITransactionalWriter::addAll.
Supplier Constructor Every time a constructor without arguments needs to be provided.
Supplier NotNullCacheSupplier Supplier of function PostProcessorUtils::getInCacheOrComputeNeverNull.
Supplier NullableCacheSupplier Supplier of function PostProcessorUtils::getInCacheOrCompute.
BiFunction<ILocation, IQueryCache, List> LeafFunction Return type of ICustomLeaf::apply.
Function<Double, Pair<T, String» DataRetrieverFunction Parameter of IInterpolation::interpolation used to get the underlying data.
UnaryOperator SimpleNameConverter Simple naming convention change, used for DirectQuery.
BiPredicate<IPillar, IPillar> EqualsFunction ModifiedPillarSetOfPillar equals function.
BiFunction<LocalDate, Boolean, LocalDate> DateSearchStepper Used in PostProcessorUtils::dateSearch to go to the next date.
Function<LocalDate, T> DateSearchRetriever Used in PostProcessorUtils::dateSearch to get the value for a given date.
UnaryOperator AdjustmentConverterOperator Used to define basic operation for the adjustment.
BiFunction<Map<String, Object>, List, U> AdjustmentInputConverter Converts the user request into a pre-processed input request for the adjustment.
BiFunction<AdjustmentRequestDTO, SupportedAdjustmentDTO, Map<String, Object» AdjustmentInputParser Transforms a user request into adjustment values.
TriFunction<Object[], IStoreFormat, List, T> AdjustmentInputRetriever Pre-processing of a line before adjustment.
TriFunction<String, String, String, Map<String, Object» AdjustmentSourceTagger Fills the adjustment columns with the type of adjustment.
BiFunction<T, U, List> AdjustmentStep<T, U, V> One step of adjustment to modify a store line.
BiFunction<Map<String, Object>, List, Double> DoubleAdjustmentInputConverter Converts the user request into a pre-processed input request for the adjustment.
TriFunction<Object[], IStoreFormat, List, Double> DoubleAdjustmentInputRetriever Pre-processing of a line before adjustment.
BiFunction<Double, Double, List> DoubleAdjustmentStep One step of adjustment to modify a store line.
Consumer DatastoreConfiguratorConsumer Used for applying customizations to the IDatastoreConfigurator object.
Function<String, Set> BookRetriever Helper function for adjustment executions that retrieves a set of books belonging to a desk.
BiFunction<String, String, Set> TradeRetriever Helper function for adjustment executions that retrieves a set of trades belonging to a specific desk and book.
Supplier FileUploadAddressSupplier Used by the file upload What-If implementation to get the addresses for file upload services present in a distributed cluster.
BiFunction<IDatastoreSchemaDescription, String, T> BaseSelectionCreator Used to configure schema selection based on a datastore schema and the name of the base store.
UnaryOperator ExtraSelectionApplier Used to apply extra schema selections.
Function<IDatastoreSchemaDescription, ISelectionDescription> SelectionDescriptionCreator Used to create a selection description based on a datastore schema description.
Function<IActivePivotManagerDescriptionBuilder, IActivePivotManagerDescriptionBuilder> CatalogCreator Used to add catalogs to the AP manager description builder.
Consumer CopperCubePublisher Used to add Copper cube components to the Copper context.
Consumer MeasurePublisher Used to publish measures to the Copper context.
Function<ICanStartBuildingMeasures, IHasAtLeastOneMeasure> MeasureAdder Adds a measure through the fluent API.
Function<T, String> NameRetriever Selects a measure name from the names object (e.g. SensiMeasureNames).
Function<T, String> ParameterRetriever Selects a parameter from the parameters object (e.g. SensiMeasureParameters).
Consumer DatastorePostprocessorConfigurator Used to add datastore postprocessors to the datastore.
Consumer DataLoadControllerConfigurator Used for customizing the Data Load Controller.
BiFunction<String, Map<String, Object>, ICondition> StoreAndScopeToConditionConverter Converts a store name and a DLC scope to an ICondition.
Function<String, IFilesScopedTopic.IScopeToFileScanParametersConverter> TopicToScopeToLoadConverter Matches a topic name to a DLC scope-to-file-scan converter.
Function<String, IDataLoadController.IScopeToRemoveWhereConditionConverter> TopicToScopeToRemoveWhereConditionConverter Matches a topic name to a DLC scope-to-remove-where-condition converter.
Function<IStoreMessageChannelFactory<I, ?>, IMessageChannel<I, ?» MessageChannelCreator Creates a message channel from the given factory.
BiConsumer<AdjustmentRequestDTO, String> AdjustmentExecutor Object that contains the execution steps of the adjustments.
BiConsumer<AdjustmentDeletionRequestDTO, String> AdjustmentDeleter Object that contains the execution steps of the adjustments deletion.

Wherever the changes above have resulted in a removal of ambiguity, the associated Spring @Qualifier has been removed:

Qualifier Replacement interface alias
@Qualifier(SP_QUALIFIER__CUSTOMISATIONS) DatastoreConfiguratorConsumer
@Qualifier(“Catalog”) CatalogCreator
@Qualifier(“Cube”) CubeBuilderFunction
@Qualifier(“DLC-registration”) DataLoadControllerConfigurator
@Qualifier(“DLC-source”) Removed as ICsvSource is generic

Other interface changes

Old interface New interface Usage
Pair<U, String> Result Return type of IInterpolation::interpolation

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 returns HierarchyBuilderConsumer, replacing DimensionsAdder. This return type allows to define a hierarchy by itself.

Here’s how it works:

    // The return object will be consumed at cube creation
    @Bean
    @Qualifier("commonDimension")
    public HierarchyBuilderConsumer bookingDimension() {
        return BookingDimensionConfig::getBookingDimension;
    }

    // We can group the declaration inside the bean
    public static void getBookingDimension(@NonNull HierarchyBuilder hierarchyBuilder) {
        getDesksHierarchy(hierarchyBuilder);
        getSrcCurrencyHierarchy(hierarchyBuilder);
        getDateHierarchy(hierarchyBuilder);
    }

    // This is a vanilla hierarchy
    public static void getDesksHierarchy(@NonNull HierarchyBuilder hierarchyBuilder) {
        hierarchyBuilder.toDimension(BOOKING_DIMENSION, builder -> builder.withHierarchy(DESKS_HIERARCHY).withLevel(DESK_LEVEL));
    }

    // This is an analysis hierarchy with a shorthand compared to the previous syntax
    public static void getSrcCurrencyHierarchy(@NonNull HierarchyBuilder hierarchyBuilder) {
        hierarchyBuilder.toDimension(CURRENCY_DIMENSION, FxHierarchy.hierarchy(SRC_FX_HIERARCHY).withLevel(SRC_FX_LEVEL));
    }

    // Here you can see the set of an extra property at dimension level
    public static void getDateHierarchy(@NonNull HierarchyBuilder hierarchyBuilder) {
        hierarchyBuilder.withType(DATES_DIMENSION, TIME);
        hierarchyBuilder.toDimension(DATES_DIMENSION, b -> b.withHierarchy(DATE_HIERARCHY).withLevel(AS_OF_DATE_LEVEL).withType(ILevelInfo.LevelType.TIME));
    }

New abstract tuple publisher

We have introduced the ATableFormatTuplePublisher 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 the market-risk POM file for the Admin UI version:

  <admin-ui.version>5.1.5</admin-ui.version>

and the admin-ui artifact has been added in the dependency management section of that POM file:

<dependency>
        <groupId>com.activeviam.tech</groupId>
        <artifactId>admin-ui</artifactId>
        <version>${admin-ui.version}</version>
</dependency>

and the hard-coded version number has been removed in the mr-application POM file for that artifact:

<dependency>
    <groupId>com.activeviam.tech</groupId>
    <artifactId>admin-ui</artifactId>
</dependency>

Unused property removed in AsOfDateNeighbourValuePostProcessor

The unused property IS_PARTITIONED_ON_RANGE_LEVELS_PROPERTY has been removed from the class AsOfDateNeighbourValuePostProcessor.

MarketDataDateShift enum

The MarketDataDateShift enum value TODAY has been renamed to CURRENT_DAY to clarify its meaning.

Deprecated unused column calculator

The unused SensiValueCalculator is now deprecated.

Unused property removed in DynamicTenorsAndMaturitiesPostProcessor

The unused property SENSITIVITY_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 MR 5.3.0 and import them into the MR 5.4.0 application, please follow these steps:

  1. Launch your MR 5.3.0 application.
  2. Export the bookmarks from your MR 5.3.0 application by executing the main method of the class ExportReferenceContentServer in the module mr-application-tests. You may need to change the values of the properties used for bookmark export - see mr.bookmark.properties. The bookmarks will be exported in the folder specified in the value of the contentServer.bookmarks.export-folder-name property.
  3. Launch the MR 5.4.0 application with the following properties:

    warning

    Please note that this will create a new content server database from scratch and erase your existing database.

 mr.application.content-server.db.hibernate.hbm2ddl.auto=create
 mr.application.content-server.reset=folder
 mr.application.content-server.factory-reset.folder-name=file:full_path_to_the folder_where_bookmarks_were_exported

Check in Atoti UI that the imported bookmarks are present.

  1. Stop the MR 5.4.0 application and copy the mr_ref_impl_content_service.mv.db file from the target folder of the mr-application module to the src/main/resources folder of the mr-application module.
  2. Launch the MR 5.4.0 application without the following properties being set:
    mr.application.content-server.db.hibernate.hbm2ddl.auto
    mr.application.content-server.reset
    mr.application.content-server.factory-reset.folder-name

You should now see your imported bookmarks in Atoti UI.

Fluent post-processor setup

The measure creation function returning a CopperMeasure is now deprecated, for instance the old definition:

    default MeasureCreator pnlDistribution() {
        return underlier -> PnLDistributionPostProcessor.measure(
                        underlier[0],
                        getMeasureParameters().getPercentileLevel(),
                        getMeasureParameters().getPnlDistributionConfigurationService(),
                        false)
                .withFormatter(getMeasureParameters().getFormatters().getPercentFormat())
                .withinFolder(getMetricParameters().getValueAtRiskFolder() + "\\" + getMetricParameters().getVarFolder())
                .as(getMetricParameters().getPnlDistribution());
    }

is now replaced by a Fluent way of defining a custom measure:

    default MeasureCreator pnlDistribution() {
        return underlier -> PnLDistributionPostProcessor.measure()
                .withUnderlyingMeasure(underlier[0])
                .withAnalysisLevels(getMeasureParameters().getPercentileLevelId())
                .withNumberOfBuckets(getMeasureParameters().getPnlDistributionConfigurationService().getNumberOfBuckets())
                .withIsAccumulate(false)
                .withFormatter(getMeasureParameters().getFormatters().getPercentFormat())
                .withinFolder(getMetricParameters().getValueAtRiskFolder() + "\\" + getMetricParameters().getVarFolder())
                .as(getMetricParameters().getPnlDistribution());
    }

The functions providing levels as string are also deprecated and replaced by a function that returns a LevelIdentifier. Those functions are suffixed with “…Id”. The Property partitionedOnRangeLevels=false has been removed from all post-processor setups.

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 to MR from MarketRiskAccelerator. If you are using Atoti Limits with Atoti Market Risk, you need to change your UI settings. Please see the Atoti Limits doc here: https://docs.activeviam.com/products/modules/limits/latest/online-help/dev/integration/multi-server-activate.html

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:

Post Processor Module Status
APnlVectorFromRiskSensiPostProcessor.java mr-sensi-lib Modified
MarketDataDebugStringPostProcessor.java mr-sensi-lib Removed
MarketDataPostProcessor.java mr-sensi-lib Modified
PnlVectorFromCrossRiskSensiPostProcessor.java mr-sensi-lib Modified
PnlVectorFromRiskSensiPostProcessor.java mr-sensi-lib Modified
ScalarPnlVectorFromCrossRiskSensiPostProcessor.java mr-sensi-lib Modified
ScalarPnlVectorFromRiskSensiPostProcessor.java mr-sensi-lib Modified
ShiftVectorPostProcessor.java mr-sensi-lib Modified
TenorMaturityAndMoneynessStringDebugExpand.java mr-sensi-lib Removed
PriceMarketDataPostProcessor.java mr-market-data-lib Modified
PriceShiftVectorPostProcessor.java mr-market-data-lib Modified
AMarketDataPostProcessor.java mr-common-lib Modified
AShiftVectorPostProcessor.java mr-common-lib Modified
AsOfDateNeighbourValuePostProcessor.java mr-common-lib Modified
ScalarMarketDataPostProcessor.java mr-common-lib Modified
ScalarShiftVectorPostProcessor.java mr-common-lib Modified

Measure factories have been modified in consequence.

Other file affected:

File Module Status
EnableMDStringDebug.java mr-common-lib Removed
EnableMDStringDebugTranslator.java mr-common-lib Removed
IEnableMDStringDebug.java mr-common-lib Removed

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:

Class Module
MarketDataPostProcessor mr-sensi-lib
PnLExplainCrossPostProcessor mr-sensi-lib
PnLExplainPostProcessor mr-sensi-lib
PnlVectorFromCrossRiskSensiPostProcessor mr-sensi-lib
PnlVectorFromRiskSensiPostProcessor mr-sensi-lib
SensiTradeStoreTuplePublisher.java mr-sensi-config
VectorMarketDataStoreConfig mr-sensi-config
VectorTradeSensitivitiesStoreConfig mr-sensi-config
VectorRiskDimensionConfig mr-sensi-config
BeanScalar mr-common-config
BeanVectorised mr-common-config
ConditionalOnVectorizedSensitivity mr-common-config
ConditionalOnScalarSensitivity mr-common-config

New Dividend and Split Ratio stores

In the mr-application module:

  • The following attributes have been added to the RiskPostProcessorInjector class:
   protected final IContextualCorporateActionMarketDataRetriever contextualCorporateActionMarketDataRetriever;
   protected final IContextualDividendMarketDataRetriever contextualDividendMarketDataRetriever;
  • In the same class, the following injections are performed in post-processors in the method:
   injectAll(IContextualCorporateActionMarketDataRetrieverAware.class, contextualCorporateActionMarketDataRetriever);
   injectAll(IContextuaDividendMarketDataRetrieverAware.class, contextualDividendMarketDataRetriever);
  • In the DataLoadControllerFileConfig class, the following constants are used in the topicToScopeToLoadConverter and topicToScopeToRemoveWhereConditionConverter:

    • SPLIT_RATIO_STORE_NAME
    • DIVIDEND_MARKET_DATA_STORE_NAME
  • In the MarketRiskConfig class, the following configuration imports have been added:

        CorporateActionMarketDataRetrievalConfig.class,
        DividendMarketDataRetrievalConfig.class,

In the mr-common-lib module:

  • In the file StoreConstants, these two constants have been added:
    • SPLIT_RATIO_STORE_NAME
    • DIVIDEND_MARKET_DATA_STORE_NAME

In the mr-sensi-config module:

  • The store CorporateAction has been deprecated. It is still used to handle dividends for vectorized sensitivities, but is not used anymore for scalar sensitivities. The stores DividendMarketData and SplitRatioMarketData need to be used instead of the CorporateAction store.
  • The SplitRatioMarketData store is used for the handling of stock split rations both for vectorized and scalar sensitivities.
  • The SensiFilePatternProperties class has been updated to take into account the file patterns for Dividends and Split Ratios.
  • In the AllSensiStoresConfig class, the DividendMarketDataStoreConfig and SplitRatioStoreConfig configuration classes are imported.
  • The DividendCurrentDateMarketDataChain uses the constant MarketDataDateShift.CURRENT_DAY instead of the constant DateShift.CURRENT_DATE. and the DividendNextDateMarketDataChain uses the constant MarketDataDateShift.NEXT_DAY instead of the constant DateShift.NEXT_DATE.
  • In the DividendPnLExplainMeasuresConfig class, the DividendMarketDataRetrievalConfig configuration class is imported.
  • In the SensiCsvSourceParametersProviderConfig class, the following lines have been added:
    patterns.addTopic(StoreConstants.SPLIT_RATIO_STORE_NAME, StoreConstants.SPLIT_RATIO_STORE_NAME, sensiFilePatterns.getSplitRatio(), DAILY_SENSI_ALIASES);
    patterns.addTopic(StoreConstants.DIVIDEND_MARKET_DATA_STORE_NAME, StoreConstants.DIVIDEND_MARKET_DATA_STORE_NAME, sensiFilePatterns.getDividends(), DAILY_SENSI_ALIASES);

In the mr-sensi-lib module:

  • The following constants have been added to the MeasureConstants class:
   public static final String DIVIDEND_RETRIEVER_NAME = "DIVIDEND_MARKET_DATA_RETRIEVER";
   public static final String SPLIT_RATIO_RETRIEVER_NAME = "SPLIT_RATIO_MARKET_DATA_RETRIEVER";
  • In the class SensiFactory, the attribute dividendCopper and the method getDividendCopper() have been removed.
  • The signature of the method scalarNativeIntermediateInterpolatedDividend changed from: LevelParameterRetriever<SensiMeasureParameters> riskFactorLevelRetriever, IDateShift dateShift) to LevelParameterRetriever<SensiMeasureParameters> riskFactorLevelRetriever, MarketDataDateShift marketDataDateShift) and its default implementation has been changed.
  • The default implementation of the method ISplitMeasures.corporateSplit has been changed.
  • In the DividendSensiMeasureNames class, the constants SPLIT_RATIO_CURRENT and SPLIT_RATIO_PREVIOUS and the methods getSplitNameCurrent() and getSplitNamePrevious() have been removed.

In the mr-directquery module:

  • The snowflake database scripts have been updated:
    • createMR.sql now creates DIVIDEND_MARKET_DATA and SPLIT_RATIO_MARKET_DATA stores
    • loadMR.sql now loads data in the stores DIVIDEND_MARKET_DATA and SPLIT_RATIO_MARKET_DATA
  • The mssql database scripts have been update:
    • createMR.sql now creates DIVIDEND_MARKET_DATA and SPLIT_RATIO_MARKET_DATA stores
    • loadMR.sql now loads data in the stores DIVIDEND_MARKET_DATA and SPLIT_RATIO_MARKET_DATA

Deletion of Market Data Cube

The Market Data Cube has been deleted. The modules mr-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-applicaiton POM file, the following dependency has been removed:

     <dependency>
        <groupId>com.activeviam.apps</groupId>
        <artifactId>mr-market-data-config</artifactId>
        <version>${project.version}</version>
     </dependency>

The 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:

  • BeanEnabledMarketDataCube
  • ConfigurationEnabledMarketDataCube The BeanEnabledAnyCube class has been updated to take into account the removal of the Market Data Cube.

Maven dependencies

The following test dependency has been added to the mr-sensi-lib module:

    <dependency>
        <groupId>com.activeviam.apps</groupId>
        <artifactId>market-data-api</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
    </dependency>

IMaturityConverterAware class

The com.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 class ThetaCopper, the following methods have been renamed:

New method name Old method name
vectorTimeToMaturity marketDataPostProcessor
scalarTimeToMaturity scalarMarketDataPostProcessor

Market Data retriever names

The market data retriever names have been renamed as follows in the *MarketDataRetrievalConfig configuration classes:

Configuration class New value of constant RETRIEVER_NAME Old value of constant RETRIEVER_NAME
SpotMarketDataRetrievalConfig (previously InstrumentMarketDataRetrievalConfig) SPOT_MARKET_DATA_RETRIEVER DEFAULT_DATE_SHIFTING_INSTRUMENT_RETRIEVER
SpotMarketDataRetrievalConfig CURVE_MARKET_DATA_RETRIEVER DEFAULT_DATE_SHIFTING_CURVE_RETRIEVER
SpotMarketDataRetrievalConfig SURFACE_MARKET_DATA_RETRIEVER DEFAULT_DATE_SHIFTING_SURFACE_RETRIEVER
SpotMarketDataRetrievalConfig CUBE_MARKET_DATA_RETRIEVER DEFAULT_DATE_SHIFTING_CUBE_RETRIEVER

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 @Bean for adding the tenors, maturities and moneyness stores.
  • A @Bean for adding the Data Load Controller topics for loading data into the stores.
  • A @Bean for 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:

    @Bean
    public AConfigurableSchema bucketStores() {
        return new TenorsStoreConfig();
    }

Alternatively, the stores could be created explicitly:

    @Bean
    public DatastoreConfiguratorConsumer bucketStores() {
        return configurator -> {
            configurator.addStore(
                    configurator.storeBuilder()
                            .withStoreName(StoreConstants.TENOR_STORE_NAME)
                            .withField(StoreFieldConstants.SENSITIVITY_TENORS).asKeyField()
                            .withField(StoreFieldConstants.TENOR_SENSITIVITY_NAME).asKeyField()
                            .withField(StoreFieldConstants.TENOR_NUMBER_OF_DAYS, DOUBLE)
                            .withField(StoreFieldConstants.TENOR_INDICES, INT)
                            .withDuplicateKeyHandler(DuplicateKeyHandlers.LOG_WITHIN_TRANSACTION)
                            .updateOnlyIfDifferent()
                            .build()
            );
            //...
        };
    }

The data loading @Bean

This is a copy of the configuration done for the vectorized sensitivities.

    @Qualifier(SP_QUALIFIER__SENSI_TOPIC_TO_STORE_AND_FILE_MAP)
    @Bean
    @Order(10)
    public ChannelParametersHolderOperator bucketFilePatterns(SensiFilePatternProperties filePatterns) {
        var TOPIC_ALIASES = List.of(STATIC_SENSI_PILLARS, SENSI_PILLARS, SENSI_CONFIG, ALL_CONFIGURATION);
        return patterns -> {
            patterns.addTopic(StoreConstants.TENOR_STORE_NAME, StoreConstants.TENOR_STORE_NAME, filePatterns.getTenors(), TOPIC_ALIASES);
            patterns.addTopic(StoreConstants.MATURITY_STORE_NAME, StoreConstants.MATURITY_STORE_NAME, filePatterns.getMaturities(), TOPIC_ALIASES);
            patterns.addTopic(StoreConstants.MONEYNESS_STORE_NAME, StoreConstants.MONEYNESS_STORE_NAME, filePatterns.getMoneyness(), TOPIC_ALIASES);
        };
    }

The maturity converter @Bean

We can copy the maturity converter from the vectorized sensitivities configuration. To ensure the converter is used by the Solution, the @Bean should be marked as @Primary.

    /**
     * This will instantiate the duration service based on the bucket stores.
     *
     * @param smileConverter The smile converter to use in the maturity converter.
     * @return maturity converter
     */
    @Bean
    @Qualifier(SP_QUALIFIER__MATURITY_CONVERTER)
    @Primary
    public IMaturityConverter storeBackedMaturityConverter(
            @Qualifier(SP_QUALIFIER__DAY_COUNT_CONVENTION) IDayCountConvention dayCountConvention,
            @Qualifier(SP_QUALIFIER__TENOR_CONVERTER) ITenorConverter tenorConverter,
            @Qualifier(SP_QUALIFIER__SMILE_CONVERTER) ISmileConverter smileConverter) {
        Map<BucketType, StoreQueryMaturityConverter.StoreDescription> storeDescriptionMap = ImmutableMap
                .<BucketType, StoreQueryMaturityConverter.StoreDescription>builder()
                .put(TENOR_INPUT, new StoreQueryMaturityConverter.StoreDescription(
                        StoreConstants.TENOR_STORE_NAME,
                        StoreFieldConstants.TENOR_NUMBER_OF_DAYS,
                        BaseConditions.equal(FieldPath.of(StoreFieldConstants.TENOR_LABELS)).as(StoreFieldConstants.TENOR_LABELS)))
                .put(MATURITY_INPUT, new StoreQueryMaturityConverter.StoreDescription(
                        StoreConstants.MATURITY_STORE_NAME,
                        StoreFieldConstants.TENOR_NUMBER_OF_DAYS,
                        BaseConditions.equal(FieldPath.of(StoreFieldConstants.TENOR_LABELS)).as(StoreFieldConstants.TENOR_LABELS)))
                .put(MONEYNESS_INPUT, new StoreQueryMaturityConverter.StoreDescription(
                        StoreConstants.MONEYNESS_STORE_NAME,
                        StoreFieldConstants.TENOR_NUMBER_OF_DAYS,
                        BaseConditions.equal(FieldPath.of(StoreFieldConstants.TENOR_LABELS)).as(StoreFieldConstants.TENOR_LABELS)))
                .put(TENOR_DYNAMIC, new StoreQueryMaturityConverter.StoreDescription(
                        StoreConstants.DYNAMIC_TENOR_STORE_NAME,
                        StoreFieldConstants.TENOR_NUMBER_OF_DAYS,
                        BaseConditions.and(BaseConditions.equal(FieldPath.of(StoreFieldConstants.TENOR_LABELS)).as(StoreFieldConstants.TENOR_LABELS),
                                BaseConditions.equal(FieldPath.of(StoreFieldConstants.TENOR_SET)).as(StoreFieldConstants.TENOR_SET))))
                .put(MATURITY_DYNAMIC, new StoreQueryMaturityConverter.StoreDescription(
                        StoreConstants.DYNAMIC_MATURITY_STORE_NAME,
                        StoreFieldConstants.TENOR_NUMBER_OF_DAYS,
                        BaseConditions.and(BaseConditions.equal(FieldPath.of(StoreFieldConstants.TENOR_LABELS)).as(StoreFieldConstants.TENOR_LABELS),
                                BaseConditions.equal(FieldPath.of(StoreFieldConstants.TENOR_SET)).as(StoreFieldConstants.TENOR_SET))))
                .put(MONEYNESS_DYNAMIC, new StoreQueryMaturityConverter.StoreDescription(
                        StoreConstants.DYNAMIC_MONEYNESS_STORE_NAME,
                        StoreFieldConstants.TENOR_NUMBER_OF_DAYS,
                        BaseConditions.and(BaseConditions.equal(FieldPath.of(StoreFieldConstants.TENOR_LABELS)).as(StoreFieldConstants.TENOR_LABELS),
                                BaseConditions.equal(FieldPath.of(StoreFieldConstants.TENOR_SET)).as(StoreFieldConstants.TENOR_SET))))
                .build();
        return new StoreQueryMaturityConverter(storeDescriptionMap,
                new MraSimpleMaturityConverter(dayCountConvention,
                        Map.of(TENOR_INPUT, tenorConverter,
                                MATURITY_INPUT, tenorConverter,
                                MONEYNESS_INPUT, smileConverter,
                                TENOR_DYNAMIC, tenorConverter,
                                MATURITY_DYNAMIC, tenorConverter,
                                MONEYNESS_DYNAMIC, smileConverter)
                )
        );
    }