IMATRADES
The IMATRADES table is the base in the IMA Cube star schema. Each row in this table represents a fact in the IMA Cube.
The IMATRADES table contains vector fields. In databases that do not natively support vectors, the vector fields are stored as separate columns.
IMATRADES Table Fields
| Column Name | Type | Not Null | Cube Field | Description |
|---|---|---|---|---|
| DATA_SET | STRING | Y | Data Set | The data set to which the entry belongs. The following different values are possible:
|
| TRADE_KEY | STRING | Y | This field is for internal usage only | The field contains the tradeID for full data or Book#LegalEntity for summary data |
| TRADE_ID | STRING | Y | TradeId | The trade Id. |
| RISK_FACTOR | STRING | Y | RiskFactor | The risk-factor. Note: This is required for non-modellable risk-factors, and optional for modellable risk-factors. |
| RISK_CLASS | STRING | Y | RiskClass | The risk class, which will be one of the following:
|
| PL_LH | STRING | Y | Liquidity Horizon | The Liquidity Horizon in days: 10, 20, 40, 60 or 120 Note: For non-modellable risk-factors, this value should be blank (though it may be set to 10 without causing any problems). The list must contain all the referring horizons, for instance for a horizon of 40 you must specify “40;20;10”. |
| CCY | STRING | Y | Currency | The currency of the PnL vector entries. |
| BASE_PV | DOUBLE | Y | This field is a measure | The base PV. |
| AS_OF_DATE | DATE | Y | AsOfDate | Timestamp (at close of business) for the data. |
| Column Name | Type | Not Null | Cube Field | Description |
|---|---|---|---|---|
| DATA_SET | STRING | Y | Data Set | The data set to which the entry belongs. The following different values are possible:
|
| TRADE_KEY | STRING | Y | This field is for internal usage only | The field contains the tradeID for full data or Book#LegalEntity for summary data |
| TRADE_ID | STRING | Y | TradeId | The trade Id. |
| RISK_FACTOR | STRING | Y | RiskFactor | The risk-factor. Note: This is required for non-modellable risk-factors, and optional for modellable risk-factors. |
| RISK_CLASS | STRING | Y | RiskClass | The risk class, which will be one of the following:
|
| PL_LH | STRING | Y | Liquidity Horizon | The Liquidity Horizon in days: 10, 20, 40, 60 or 120 Note: For non-modellable risk-factors, this value should be blank (though it may be set to 10 without causing any problems). The list must contain all the referring horizons, for instance for a horizon of 40 you must specify “40;20;10”. |
| CCY | STRING | Y | Currency | The currency of the PnL vector entries. |
| BASE_PV | DOUBLE | Y | This field is a measure | The base PV. |
| PV | ARRAY(DOUBLE) | Y | This field is a measure | The PV vector calibrated for 12 months’ worth of data. The entries in this vector represent the PV for each scenario. The values are separated by a semi-colon. This vector may optionally represent the P&L vector by setting the base PV to zero. |
| AS_OF_DATE | DATE | Y | AsOfDate | Timestamp (at close of business) for the data. |
IMATRADES Unique Key
| Columns |
|---|
| DATA_SET |
| TRADE_KEY |
| RISK_FACTOR |
| RISK_CLASS |
| PL_LH |
| AS_OF_DATE |
| Columns |
|---|
| DATA_SET |
| TRADE_KEY |
| RISK_FACTOR |
| RISK_CLASS |
| PL_LH |
| AS_OF_DATE |
IMATRADES_VECTOR Table Fields
| Column Name | Type | Not Null |
|---|---|---|
| VECTOR_INDEX | INT | Y |
| DATA_SET | STRING | Y |
| TRADE_KEY | STRING | Y |
| TRADE_ID | STRING | Y |
| RISK_FACTOR | STRING | Y |
| RISK_CLASS | STRING | Y |
| PL_LH | STRING | Y |
| CCY | STRING | Y |
| BASE_PV | DOUBLE | Y |
| PV | DOUBLE | Y |
| AS_OF_DATE | DATE | Y |
No vector table is required when the database natively supports aggregation on vector types.
IMATRADES_VECTOR Unique Key
| Columns |
|---|
| VECTOR_INDEX |
| DATA_SET |
| TRADE_KEY |
| RISK_FACTOR |
| RISK_CLASS |
| PL_LH |
| AS_OF_DATE |
No vector table is required when the database natively supports aggregation on vector types.
Outgoing Joins
| Target Table | Source Columns | Target Columns |
|---|---|---|
| IMATRADES_VECTOR | DATA_SET TRADE_KEY RISK_FACTOR RISK_CLASS PL_LH AS_OF_DATE |
AS_OF_DATE BOOK |
| IMARISK_FACTORS | RISK_FACTOR RISK_CLASS AS_OF_DATE |
RISK_FACTOR RISK_CLASS AS_OF_DATE |
| TRADE_MAPPING | TRADE_KEY AS_OF_DATE |
TRADE_KEY AS_OF_DATE |
| Target Table | Source Columns | Target Columns |
|---|---|---|
| IMARISK_FACTORS | RISK_FACTOR RISK_CLASS AS_OF_DATE |
RISK_FACTOR RISK_CLASS AS_OF_DATE |
| TRADE_MAPPING | TRADE_KEY AS_OF_DATE |
TRADE_KEY AS_OF_DATE |