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

# TRADEPNLS_VECTOR

The TRADEPNLS\_VECTOR table contains the PnL vectors used as inputs for VaR and ES computations.

This table is created when using a database that does not [support native vector aggregation](https://docs.activeviam.com/engine/java-sdk/6.1/directquery/directquery-vectors.md#native-support).
If vector aggregation is supported, the PnL vector is stored as an array in the [TRADEPNLS](https://docs.activeviam.com/solutions/market-risk/6.0/database/tradepnls.md) table.

| Column Name | Type | Not Null | Cube Field | Description |
| - | - | - | - | - |
| VECTOR\_INDEX | INT | Y | | Index in the PnL vector. |
| AS\_OF\_DATE | DATE | Y | | Timestamp (at close of business) for the data. |
| TRADE\_KEY | STRING | Y | | The field contains the `tradeID` for full data or `Book#VaR Inclusion` for summary data. |
| SCENARIO\_SET | STRING | Y | [Scenario Sets](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/risk.md) | Name of the scenario set for the PnL vector. |
| CALCULATION\_ID | STRING | Y | [CalculationIds](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/risk.md) | Name of the PnL vector calculation run. There may be several runs per AsOfDate. |
| MARKET\_DATA\_SET | STRING | Y | This field is not currently used | The market data set that should be used when retrieving rates for FX conversion. |
| RISK\_FACTOR | STRING | Y | [Risk Factors](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/risk.md) | Underlying risk factor (may be more than one) of the risk class. |
| PNL\_VECTOR | DOUBLE | Y | | PnL value corresponding to the index. |

## Unique Key

| Columns |
| - |
| VECTOR\_INDEX |
| AS\_OF\_DATE |
| TRADE\_KEY |
| SCENARIO\_SET |
| CALCULATION\_ID |
| MARKET\_DATA\_SET |
| RISK\_FACTOR |

## Outgoing Joins

| Target Table | Source Columns | Target Columns |
| - | - | - |
| [TRADEPNLS](https://docs.activeviam.com/solutions/market-risk/6.0/database/tradepnls.md) | AS\_OF\_DATE TRADE\_KEY SCENARIO\_SET CALCULATION\_ID MARKET\_DATA\_SET RISK\_FACTOR  | AS\_OF\_DATE TRADE\_KEY SCENARIO\_SET CALCULATION\_ID MARKET\_DATA\_SET RISK\_FACTOR  |
