> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TRADE_ATTRIBUTES

The TRADE\_ATTRIBUTES table contains the fields describing attributes of the trades.

| Column Name | Type | Not Null | Cube Field | Default Value[^1] | Description |
| - | - | - | - | - | - |
| AS\_OF\_DATE | DATE | Y | | | Timestamp (at close of business) for the data. |
| TRADE\_KEY | STRING | Y | | N/A | Unique Trade (or Position) ID. |
| BOOK | STRING | Y | [Books](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/booking.md) | N/A | The book to map the trade to (must match the node in the Book Hierarchy). |
| LEGAL\_ENTITY | STRING | Y | [Legal Entities](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/organization.md) | N/A | Legal Entity to map the trade to (must match the node in the Legal Entity Hierarchy). |
| COUNTERPARTY\_ID | STRING | Y | [CounterpartyIds](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/counterparties.md) | N/A | Counterparty to map the trade to (must match the node in the Counterparty Hierarchy). |
| NOTIONAL | DOUBLE | | | | Notional of the trade/position. |
| NOTIONAL\_CCY | STRING | Y | [NotionalCurrencies](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/currencies.md) | N/A | Currency of the notional trade. |
| TRADER | STRING | Y | [Traders](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/tradeattributes.md) | N/A | Trader who performed the trade. |
| SALES | STRING | Y | [Sales](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/tradeattributes.md) | N/A | Salesperson who performed the sale of the trade (if applicable). |
| INSTRUMENT\_CLASS | STRING | Y | [InstrumentClasses](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/instruments.md) | N/A | Highest level of instrument classification. |
| INSTRUMENT\_TYPE | STRING | Y | [InstrumentTypes](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/instruments.md) | N/A | Main instrument classification. |
| INSTRUMENT\_SUB\_TYPE | STRING | Y | [InstrumentTypes](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/instruments.md) | N/A | Sub-level of instrument classification. |
| TRADE\_DATE | DATE | Y | [TradeDates](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/tradeattributes.md) | 1970-01-01 | Date of the execution of the trade. |
| TRADE\_MATURITY\_DATE | DATE | Y | [TradeMaturityDates](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/tradeattributes.md) | 1970-01-01 | Maturity date of the trade. |
| VAR\_INCLUSION\_TYPE | STRING | Y | | R | Defines on what basis to include the VaR of this trade: <ul><li>'R' for repricing</li><li>'S' for sensitivity,</li></ul> |
| TRADE\_SOURCE | STRING | Y | TradeSources | N/A | Identifier of the source system the trade was executed in. |
| TRADE\_STATUS | STRING | Y | TradeStatuses | LIVE | Status representing the step in the trade lifecycle. |
| ORIGINAL\_NOTIONAL | DOUBLE | Y | OriginalNotional | | Represents the notional at trade date. |

## Unique Key

| Columns |
| - |
| AS\_OF\_DATE |
| TRADE\_KEY |

## Incoming Joins

| Source Table | Source Columns | Target Columns |
| - | - | - |
| [TRADEPNLS](https://docs.activeviam.com/solutions/market-risk/6.0/database/tradepnls.md) | AS\_OF\_DATE TRADE\_KEY | AS\_OF\_DATE TRADE\_KEY |
| [TRADE\_SENSITIVITIES](https://docs.activeviam.com/solutions/market-risk/6.0/database/trade_sensitivities.md) | AS\_OF\_DATE TRADE\_KEY | AS\_OF\_DATE TRADE\_KEY |
| [PNL](https://docs.activeviam.com/solutions/market-risk/6.0/database/pnl.md) | AS\_OF\_DATE TRADE\_KEY | AS\_OF\_DATE TRADE\_KEY |

## Outgoing Joins

| Target Table | Source Columns | Target Columns |
| - | - | - |
| [LEGAL\_ENTITY\_HIERARCHY](https://docs.activeviam.com/solutions/market-risk/6.0/database/legal_entity_hierarchy.md) | AS\_OF\_DATE LEGAL\_ENTITY | AS\_OF\_DATE LEGAL\_ENTITY |
| [COUNTERPARTY\_HIERARCHY](https://docs.activeviam.com/solutions/market-risk/6.0/database/counterparty_hierarchy.md) | AS\_OF\_DATE COUNTERPARTY\_ID | AS\_OF\_DATE COUNTERPARTY\_ID |
| [BOOK\_HIERARCHY](https://docs.activeviam.com/solutions/market-risk/6.0/database/book_hierarchy.md) | AS\_OF\_DATE BOOK | AS\_OF\_DATE BOOK |
| [COUNTERPARTIES](https://docs.activeviam.com/solutions/market-risk/6.0/database/counterparties.md) | AS\_OF\_DATE COUNTERPARTY\_ID | AS\_OF\_DATE COUNTERPARTY\_ID |

***

[^1]: If the default value is marked as empty, it means that the default value is 'null' for nullable fields, and that a value needs to be explicitly set for non-nullable fields.
