Market data API data loading

Atoti Market Risk provides two options for loading data into the Atoti Market Data 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 are available in the application:

Property Default Details
mr.common.file-patterns.spot-market-data glob:**Spot_Market_Data*.csv An SPOT_MARKET_DATA_FILE_PATTERN constant containing the default value is available in CommonFilePatternProperties.
mr.common.file-patterns.curve-market-data glob:**Curve_Market_Data*.csv A CURVE_MARKET_DATA_FILE_PATTERN constant containing the default value is available in CommonFilePatternProperties.
mr.common.file-patterns.fx-rate-market-data glob:**FX_Rate_Market_Data*.csv An FX_RATE_MARKET_DATA_FILE_PATTERN constant containing the default value is available in CommonFilePatternProperties.
mr.common.file-patterns.surface-market-data glob:**Surface_Market_Data*.csv A SURFACE_MARKET_DATA_FILE_PATTERN constant containing the default value is available in CommonFilePatternProperties.
mr.common.file-patterns.cube-market-data glob:**Cube_Market_Data*.csv A CUBE_MARKET_DATA_FILE_PATTERN constant containing the default value is available in CommonFilePatternProperties.

Selecting between new and backwards compatible file formats

If the Atoti Market Data Spring Boot Starter is imported into the application with the default source configuration, each market data table will be loaded from its specific file based on the above patterns.

To enable loading a table from the deprecated file format, set the property for that particular table to the format pattern of the deprecated file. For example, if the mr.common.file-patterns.spot-market-data property has been set to regex:^(?i).*MarketData(?<!MarketDataSets).*.csv.*$ and mr.common.file-patterns.cube-market-data has been left empty, the SpotMarketData table will load from the old market data file format, whereas the CubeMarketData table will be loaded from the current file format.

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
@ConditionalOnBCSpotMarketDataFileFormatEnabled Matches if the mr.common.file-patterns.spot-market-data property is set to regex:^(?=.*MarketData)(?:(?!Sets).)+.csv$.
@ConditionalOnBCSpotMarketDataFileFormatDisabled Matches if the mr.common.file-patterns.spot-market-data property is anything other than the above value.
@ConditionalOnBCCurveMarketDataFileFormatEnabled Matches if the mr.common.file-patterns.curve-market-data property is set to regex:^(?=.*MarketData)(?:(?!Sets).)+.csv$.
@ConditionalOnBCCurveMarketDataFileFormatDisabled Matches if the mr.common.file-patterns.curve-market-data property is anything other than the above value.
@ConditionalOnBCSurfaceMarketDataFileFormatEnabled Matches if the mr.common.file-patterns.surface-market-data property is set to regex:^(?=.*MarketData)(?:(?!Sets).)+.csv$.
@ConditionalOnBCSurfaceMarketDataFileFormatDisabled Matches if the mr.common.file-patterns.surface-market-data property is anything other than the above value.
@ConditionalOnBCCubeMarketDataFileFormatEnabled Matches if the mr.common.file-patterns.cube-market-data property is set to regex:^(?=.*MarketData)(?:(?!Sets).)+.csv$.
@ConditionalOnBCCubeMarketDataFileFormatDisabled Matches if the mr.common.file-patterns.cube-market-data property is anything other than the above value.
@ConditionalOnBCFxRateMarketDataFileFormatEnabled Matches if the mr.common.file-patterns.fx-rate-market-data property is set to glob:**FXRates*.csv.
@ConditionalOnBCFxRateMarketDataFileFormatDisabled Matches if the mr.common.file-patterns.fx-rate-market-data property is anything other than the above value.

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 through the AllBackwardsCompatibleMarketDataSources configuration class but these are disabled by default.

Spot market data loading

Defined in the BCSpotMarketDataCsvSourceParametersProviderConfig 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 rate

Defined in the BCFxRateMarketDataCsvSourceParametersProviderConfig class. From the old 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.

Cube market data loading

Defined in the CubeMarketDataCsvSourceParametersProviderConfig class.

Input file: Cube market data

Curve market data loading

Defined in the CurveMarketDataCsvSourceParametersProviderConfig class.

Input file: Curve market data

FX rate

Defined in the FxRateMarketDataCsvSourceParametersProviderConfig class.

Input file: FX rate market data

Spot market data loading

Defined in the SpotMarketDataCsvSourceParametersProviderConfig class.

Input file: Spot market data

Surface market data loading

Defined in the SurfaceMarketDataCsvSourceParametersProviderConfig class.

Input file: Surface market data