SA ETL for SBM Curvature
This topic covers the ETL specifics for the Curvature files. It provides an overview of ETL for SBM Curvature, starting with a dataflow diagram for SBM Curvature. A table shows you the fields included in each row of a Curvature 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
Vectorization
The following table provides information about the vectors employed within the Curvature CSV Input files for each risk class:
Risk Class | Vector Information |
---|---|
- GIRR | Curvature shocked prices; the indices of the vectors are the risk weights. |
- CSR non-Sec | |
- CSR Sec CTP | |
- CSR Sec non-CTP | |
- Equity | |
- Commodity | |
- FX |
PublisherUtils vectorization methods
For Curvature, two sets of vectors are created:
Shift Up | Shift Down |
---|---|
[shift up risk weights]+[sensitivities] | [shift down risk weights]+[sensitivities] |
Shift Up Risk Weights and Sensitivities
The PublisherUtils methods used for Shift Up Risk Weights and Sensitivities are described in the table below:
Methods | Parameters | Description |
---|---|---|
PublisherUtils.buildVectorSensitivityAndCurrencyMaps | - tuples- publisherDataStructures- shiftUpIndexes- context | These build 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 RiskWeight -> Sensitivity. The key fields for vector creation and the vector fields themselves are shown in Mapping of SBM Curvature CSV file fields onto the stores that they populate. |
PublisherUtils.buildVectorInterpolatedAndBaseTupleCurvatureMaps | - publisherDataStructures- publisherDataStructures2- context- parameterRetriever |
Shift Down Risk Weights and Sensitivities
The PublisherUtils methods used for Shift Down Risk Weights and Sensitivities are described in the table below:
Method | Parameters | Description |
---|---|---|
PublisherUtils.buildVectorSensitivityAndCurrencyMaps | - tuples - publisherDataStructures2 - shiftDownIndexes - context |
These build 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 RiskWeight -> Sensitivity. The key fields for vector creation and the vector fields themselves are shown in Mapping of SBM Curvature CSV file fields onto the stores that they populate. |
PublisherUtils.buildVectorInterpolatedAndBaseTupleCurvatureMaps | - publisherDataStructures - publisherDataStructures2 - context - parameterRetriever |
Interpolation
PublisherUtils interpolation methods
Interpolation is performed for the two sets separately, using linear interpolation and a predefined set of risk weights.
Normalization
Curvature-relevant stores
The stores that are relevant for Curvature are:
Stores |
---|
TradeBase Store |
Curvature Store |
RiskFactorDescription Store |
UnderlyingDescription Store |
FXBuckets Store |
GIRRBuckets Store |
Mapping of SBM Curvature CSV file fields onto the stores that they populate
Field from CSV file OR ColumnCalculator (if the CSV file field is null) |
TradeBase Store |
Curvature Store |
RiskFactor Description Store |
Underlying Description Store | FXBuckets Store |
GIRRBuckets Store |
Key Fields for Vector Creation |
---|---|---|---|---|---|---|---|
AsOfDate | (AsOfDate) | (AsOfDate) | (AsOfDate) | (AsOfDate) | (AsOfDate) | (AsOfDate) | |
TradeId | (TradeId) | (TradeId) | |||||
RiskClass | (Risk Class) | (Risk Class) | (Risk Class) | (Risk Class) | |||
RiskMeasure | (Risk Measure) | (Risk Measure) | (Risk Measure) | ||||
RiskFactor OR RiskFactor ColumnCalculator |
(RiskFactor) | (RiskFactor) | (RiskFactor) | (RiskFactor) | |||
Shift_Up_PV | (Shift_Up_PV) | ||||||
Shift_Down_PV | (Shift_Down_PV) | ||||||
CurvatureCcy | (Ccy) | ||||||
RiskWeight | (RiskWeight) | ||||||
PVApplied | (PVApplied) | ||||||
Type | (RiskFactorType) | (GIRR Curve Type) | |||||
GIRRCcy | (GIRR Ccy) | (Bucket) | |||||
Underlying | (Underlying) | (Underlying) | (Bucket) | (Curve) | |||
CSRQuality | (CSRQuality) | ||||||
CSRSector | (CSRSector) | ||||||
EquityEconomy | (EquityEconomy) | ||||||
EquityMarketCap | (EquityMarketCap) | ||||||
EquitySector | (EquitySector) | ||||||
CmtyLocation | (CmtyLocation) | ||||||
FXCounterCurrency | (FXCounterCurrency) | ||||||
ALWAYS UnderlyingFxCcy ColumnCalculator | (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 |
|
ACurvaturePublisher (with risk-class-specific implementations defining the context) | ACurvaturePublisher applies vectorization/interpolation according to rules described in the specific sections on vectorization/interpolation. ACurvaturePublisher 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). |