SA ETL for SBM Delta

This topic covers the ETL specifics for the Delta files. It provides an overview of ETL for SBM Delta, starting with a dataflow diagram for SBM Delta. A table shows you the fields included in each “SBM” row of a Delta Sensitivity CSV Input Data file, indicating which stores these fields are copied to during the ETL process.

Additionally, it shows the key fields for vector creation and the fields that have the potential to be populated with vectors, as opposed to always containing scalar values.

Dataflow diagram

SA ETL dataflow diagram for sbm delta files

Vectorization

The following table provides information about the vectors employed within the CSV Input files for each risk class:

Risk Class Vector Information

- GIRR

- CSR non-Sec

- CSR Sec CTP

- CSR Sec non-CTP

Commodity
The indices of the vectors are the vertices.

Vectorization is applied for both tenors and sensitivity values.

- Equity

- FX
Fields are always single-value single-tenor for a Delta sensitivity.

PublisherUtils vectorization methods 

This table describes the PublisherUtils methods used for vectorization:

Method Parameters Description
PublisherUtils.buildVectorSensitivityAndCurrencyMaps
- tuples

- publisherDataStructures

- indexes

- context
This PublisherUtils method is used for Vector-based Delta. It builds maps based on key fields in the input file format (as of date, trade id, risk factor).

The lowest level map is of the form Date -> Sensitivity.

The key fields for vector creation and the vector fields themselves are show in Mapping of SBM Delta CSV file fields onto the stores that they populate.
PublisherUtils.buildSingleValueAndTradeBaseTuples
- tuples

- publisherDataStructures

- indexes

- context
This PublisherUtils method is used for Single-value Delta. A single call to this method will create the Sensitivity and Base store tuples.

The map and interpolation required by Vector-based Delta will not be performed, as sensitivities are always a single value for a single tenor.

Interpolation

All the input vectors will be interpolated onto FRTB vertices that are loaded from the following file:

frtb-starter/src/test/resources/data/configuration/Vertices.csv

All the vertices in the FRTB project can be found within this file. Default vertices are based on the BCBS specification.

PublisherUtils interpolation methods 

The PublisherUtils methods used for vectorization are described in the following table:

Method Parameters Description
PublisherUtils.buildVectorSensitivityAndCurrencyMaps
- tuples

- publisherDataStructures

- indexes

- context
This PublisherUtils method is used for Vector-based Delta. It builds maps based on key fields in the input file format (as of date, trade id, risk factor).

The lowest level map is of the form Date -> Sensitivity.

The key fields for vector creation and the vector fields themselves are show in Mapping of SBM Delta CSV file fields onto the stores that they populate.
PublisherUtils.buildSingleValueAndTradeBaseTuples
- tuples

- publisherDataStructures

- indexes

- context
This PublisherUtils method is used for Single-value Delta. A single call to this method will create the Sensitivity and Base store tuples.

The map and interpolation required by Vector-based Delta will not be performed, as sensitivities are always a single value for a single tenor.

Normalization

Delta-relevant stores

The stores that are relevant for Delta are:

Stores
TradeBase Store
Delta Store
RiskFactorDescription Store
UnderlyingDescription Store
FX Buckets Store
GIRR Buckets Store

 

Mapping of SBM Delta CSV file fields onto the stores that they populate

Field from CSV file

OR ColumnCalculator

(if the CSV file field is null)
TradeBase

Store
Delta

Store
RiskFactor Description

Store
Underlying Description Store FX Buckets

Store
GIRR Buckets

Store
Key Fields for

Vector Creation
AsOfDate checkmark icon(AsOfDate) checkmark icon(AsOfDate) checkmark icon(AsOfDate) checkmark icon(AsOfDate) checkmark icon(AsOfDate) checkmark icon(AsOfDate) star icon
TradeId checkmark icon(TradeId) checkmark icon(TradeId) star icon
DeltaCcy checkmark icon(Ccy)
DeltaSensitivities

(vector-valued field)
checkmark icon(Delta Sensitivities)
RiskClass checkmark icon(Risk Class) checkmark icon(Risk Class) checkmark icon(Risk Class) checkmark icon(Risk Class)
RiskMeasure checkmark icon(Risk Measure) checkmark icon (Risk Measure) checkmark icon (Risk Measure)
SensitivityDates

(vector-valued field)
checkmark icon(SensitivityDates)
RiskFactor OR RiskFactor ColumnCalculator checkmark icon(RiskFactor) #(RiskFactor) #(RiskFactor) #(RiskFactor) star icon
Type checkmark icon(RiskFactorType) checkmark icon(GIRR Curve Type)
GIRRCcy checkmark icon(GIRR Ccy) checkmark icon(Bucket)
Underlying checkmark icon(Underlying) checkmark icon(Underlying) checkmark icon(Bucket) checkmark icon(Curve)
CSRQuality checkmark icon(CSRQuality)
CSRSector checkmark icon(CSRSector)
EquityEconomy checkmark icon(EquityEconomy)
EquityMarketCap checkmark icon(EquityMarketCap)
EquitySector checkmark icon(EquitySector)
CmtyLocation checkmark icon(CmtyLocation)
FXCounterCurrency checkmark icon(FXCounterCurrency)
Optionality checkmark icon(Optionality)
ALWAYS UnderlyingFxCcy ColumnCalculator checkmark icon(UnderlyingFxCcy)

Column Calculators and Tuple Publishers

RiskFactorColumnCalculator

Risk Class Creation Method for RiskFactor
Commodity Risk Factor field value is created by concatenating Underlying, CmtyGrade and CmtyLocation, using ‘space’ as a delimiter
GIRR Risk Factor field value is created by concatenating Underlying and RiskFactorType, using ‘space’ as a delimiter
Equity Risk Factor field value is created by concatenating Underlying and RiskFactorType, using ‘space’ as a delimiter
CSR non-Sec Risk Factor field value is created by concatenating Underlying and RiskFactorType, using ‘space’ as a delimiter
CSR Sec CTP Risk Factor field value is created by concatenating Underlying and RiskFactorType, using ‘space’ as a delimiter
CSR Sec non-CTP Risk Factor field value is created by concatenating Underlying and RiskFactorType, using ‘space’ as a delimiter
FX If FXCounterCurrency:


- is empty - Risk Factor field value is created by using Underlying

- is populated - Risk Factor field value is created by concatenating Underlying and FXCounterCurrency, using a configurable delimiter

The Tuple Publisher and Publisher classes

The function of the TuplePublisher and its associated Publisher classes is to separate data in the incoming file row according to its relevance to particular stores and applying ETL logic to the incoming rows:

Tuple Publisher Class Publisher Class Function
RiskClassTuplePublisher Splits fields according to the following criteria:


- fields relevant to ADeltaPublisher OR AVegaPublisher OR ACurvaturePublisher

- fields relevant to MarketDataPublisher (same one for all risk classes)

- fields relevant to StaticDataPublisher classes for GIRR Buckets and FX Buckets
ADeltaPublisher (with risk-class-specific implementations defining the context) ADeltaPublisher applies vectorization/interpolation according to rules described in the specific sections on vectorization/interpolation.

ADeltaPublisher also publishes to TradeBase store
RiskFactorDescriptionPublisher RiskFactorDescriptionPublisher publishes to RiskFactorDescription store
UnderlyingPublisher UnderlyingPublisher publishes to UnderlyingDescription store
StaticDataPublisher StaticDataPublisher is a type that allows publishing of non-duplicated rows to a given store.

Specific instances define the store (fxBucketsPublisher, girrBucketsPublisher).