Preview market data API data loading

The preview market data API provides two options for loading data into the stores.

This section provides information about:

  • data loading properties.
  • selecting between the current and preview file formats.
  • conditional annotations for Spring configuration.
  • configuration classes that need to be imported for:
    • backwards compatibility with the current file format.
    • new data file formats.

Properties

The following properties have been added to the application:

Property Default Details
mr.common.file-patterns.instrument-market-data None An INSTRUMENT_MARKET_DATA_FILE_PATTERN constant with the value glob:**Instrument_Market_Data*.csv is available in CommonFilePatternProperties.
mr.common.file-patterns.curve-market-data None A CURVE_MARKET_DATA_FILE_PATTERN constant with the value glob:**Curve_Market_Data*.csv is available in CommonFilePatternProperties.
mr.common.file-patterns.surface-market-data None A SURFACE_MARKET_DATA_FILE_PATTERN constant with the value glob:**Surface_Market_Data*.csv is available in CommonFilePatternProperties.
mr.common.file-patterns.cube-market-data None A CUBE_MARKET_DATA_FILE_PATTERN constant with the value glob:**Cube_Market_Data*.csv is available in CommonFilePatternProperties.

Selecting between the current and preview file formats.

If all source configuration classes defined below are imported into the application, the selection between the file formats will be based on whether a pattern has been defined for the specific market data store.

For example, if the mr.common.file-patterns.instrument-market-data property has been set to glob:**Instrument_Market_Data*.csv and mr.common.file-patterns.cube-market-data has been left empty, the InstrumentMarketData store will expect the preview file format, whereas the CubeMarketData store will be loaded from the current file format.

The Atoti Market Risk solution defaults to backwards compatible data loading and does not currently provide sample data files for the preview formats.

Conditional annotations

To allow the correct configuration to be loaded if all source configuration classes are imported, the following annotations are available for both @Bean methods and @Configuration classes:

Annotation Matching
@ConditionalOnBCInstrumentMarketDataFileFormatDisabled Matches if the mr.common.file-patterns.instrument-market-data property has a value.
@ConditionalOnBCInstrumentMarketDataFileFormatEnabled Matches if the mr.common.file-patterns.instrument-market-data property isn’t set.
@ConditionalOnBCCurveMarketDataFileFormatDisabled Matches if the mr.common.file-patterns.curve-market-data property has a value.
@ConditionalOnBCCurveMarketDataFileFormatEnabled Matches if the mr.common.file-patterns.curve-market-data property isn’t set.
@ConditionalOnBCSurfaceMarketDataFileFormatDisabled Matches if the mr.common.file-patterns.surface-market-data property has a value.
@ConditionalOnBCSurfaceMarketDataFileFormatEnabled Matches if the mr.common.file-patterns.surface-market-data property isn’t set.
@ConditionalOnBCCubeMarketDataFileFormatDisabled Matches if the mr.common.file-patterns.cube-market-data property has a value.
@ConditionalOnBCCubeMarketDataFileFormatEnabled Matches if the mr.common.file-patterns.cube-market-data property isn’t set.

Backwards compatibility

All the preview market data API stores can be loaded from the current market data input file format. To add backwards compatible sources for all stores, import the AllBackwardsCompatibleMarketDataSources configuration class.

Instrument market data loading

Defined in the BCInstrumentMarketDataCsvSourceParametersProviderConfig class. Each row will be checked for validity as follows:

Axis field Empty Filled in
TenorLabels Y N
TenorDates Y N
MaturityLabels Y N
MaturityDates Y N
MoneynessLabels Y N
Nominal Y N

Curve market data loading

Defined in the BCCurveMarketDataCsvSourceParametersProviderConfig class. Each row will be checked for validity as follows:

Axis field Empty Filled in
TenorLabels N Y
TenorDates Y N
MaturityLabels Y N
MaturityDates Y N
MoneynessLabels Y N
Nominal Y N

Surface market data loading

Defined in the BCSurfaceMarketDataCsvSourceParametersProviderConfig class. Each row will be checked for validity as follows:

Axis field Empty Filled in
TenorLabels N Y
TenorDates Y N
MaturityLabels Y N
MaturityDates Y N
MoneynessLabels N Y
Nominal Y N

Cube market data loading

Defined in the BCCubeMarketDataCsvSourceParametersProviderConfig class. Each row will be checked for validity as follows:

Axis field Empty Filled in
TenorLabels N Y
TenorDates Y N
MaturityLabels N Y
MaturityDates Y N
MoneynessLabels N Y
Nominal Y N

New data file formats

If backwards compatibility isn’t required, sources matching the data model stores are available. The file formats in this section refer to this data loading mode.

Instrument market data loading

Defined in the InstrumentMarketDataCsvSourceParametersProviderConfig class.

Curve market data loading

Defined in the CurveMarketDataCsvSourceParametersProviderConfig class.

Surface market data loading

Defined in the SurfaceMarketDataCsvSourceParametersProviderConfig class.

Cube market data loading

Defined in the CubeMarketDataCsvSourceParametersProviderConfig class.