> ## 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_MAPPING

The TRADE\_MAPPING store maps trades to books, desks and legal entities.

| Column Name   | Type   | Not Null | Cube Field                               | Description                                                                           |
| ------------- | ------ | -------- | ---------------------------------------- | ------------------------------------------------------------------------------------- |
| AS\_OF\_DATE  | DATE   | Y        |                                          | Timestamp (at close of business) for the data.                                        |
| TRADE\_KEY    | STRING | Y        |                                          | Unique Trade (or Position) ID.                                                        |
| BOOK          | STRING | Y        | [Books](../cube/books)                   | The book to map the trade to (must match the node in the Book Hierarchy).             |
| LEGAL\_ENTITY | STRING | Y        | [Legal Entities](../cube/legal-entities) | Legal Entity to map the trade to (must match the node in the Legal Entity Hierarchy). |
| TRADE\_DATE   | DATE   |          | [TradeDates](../cube/tradedates)         | The date on which the trade took place.                                               |

## Unique Key

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

## Incoming Joins

| Source Table                         | Source Columns               | Target Columns               | Cube                      |
| ------------------------------------ | ---------------------------- | ---------------------------- | ------------------------- |
| [SASENSITIVITIES](./sasensitivities) | AS\_OF\_DATE<br />TRADE\_KEY | AS\_OF\_DATE<br />TRADE\_KEY | StandardisedApproachCube  |
| [IMATRADES](./imatrades)             | AS\_OF\_DATE<br />TRADE\_KEY | AS\_OF\_DATE<br />TRADE\_KEY | InternalModelApproachCube |

## Outgoing Joins

| Target Table                                           | Source Columns                  | Target Columns                  |
| ------------------------------------------------------ | ------------------------------- | ------------------------------- |
| [BOOK\_DESCRIPTON](./book_description)                 | AS\_OF\_DATE<br />BOOK          | AS\_OF\_DATE<br />BOOK          |
| [BOOK\_HIERARCHY](./book_hierarchy)                    | AS\_OF\_DATE<br />BOOK          | AS\_OF\_DATE<br />BOOK          |
| [LEGAL\_ENTITY\_HIERARCHY](./legal_entity_hierarchy)   | AS\_OF\_DATE<br />LEGAL\_ENTITY | AS\_OF\_DATE<br />LEGAL\_ENTITY |
| [LEGAL\_ENTITY\_ATTRIBUTES](./legal_entity_attributes) | AS\_OF\_DATE<br />LEGAL\_ENTITY | AS\_OF\_DATE<br />LEGAL\_ENTITY |
