Market data API data loading

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

This section provides information about:

  • data loading properties.
  • selecting between the new and backwards compatible file formats.
  • conditional annotations for Spring configuration.
  • configuration classes that need to be imported for:
    • backwards compatibility with the deprecated 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.fx-rate-market-data None An FX_RATE_MARKET_DATA_FILE_PATTERN constant with the value glob:**FX_Rate_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 new and backwards compatible file formats

If the Market Data API Spring Boot Starter is imported into the application with the default source configuration, 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.
@ConditionalOnBCFxRateMarketDataFileFormatDisabled Matches if the mr.common.file-patterns.fx-rate-market-data property has a value.
@ConditionalOnBCFxRateMarketDataFileFormatEnabled Matches if the mr.common.file-patterns.fx-rate-market-data property isn’t set.

Backwards compatibility

The market data can be loaded from the deprecated market data input file format, while the FX store can be loaded from the deprecated FX rates file. The sources are included in the application by default through 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

FX loading

Defined in the BCFxRateMarketDataCsvSourceParametersProviderConfig class. From the deprecated file format, the Term and RiskFactorId fields will be ignored.

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.

FX loading

Defined in the FxRateMarketDataCsvSourceParametersProviderConfig class.