> ## 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/products/atoti/server/6.1.11/docs/directquery/directquery-vectors/#native-support).
If vector aggregation is supported, the PnL vector is stored as an array in the [TRADEPNLS](./tradepnls) table.

<table><thead><tr><th>Column Name</th><th>Type</th><th>Not Null</th><th>Cube Field</th><th>Description</th></tr></thead><tbody><tr><td>VECTOR\_INDEX</td><td>INT</td><td>Y</td><td /><td>Index in the PnL vector.</td></tr><tr><td>AS\_OF\_DATE</td><td>DATE</td><td>Y</td><td /><td>Timestamp (at close of business) for the data.</td></tr><tr><td>TRADE\_KEY</td><td>STRING</td><td>Y</td><td /><td>The field contains the <code>tradeID</code> for full data or <code>Book#VaR Inclusion</code> for summary data.</td></tr><tr><td>SCENARIO\_SET</td><td>STRING</td><td>Y</td><td><a href="../cube/dimensions/risk">Scenario Sets</a></td><td>Name of the scenario set for the PnL vector.</td></tr><tr><td>CALCULATION\_ID</td><td>STRING</td><td>Y</td><td><a href="../cube/dimensions/risk">CalculationIds</a></td><td>Name of the PnL vector calculation run. There may be several runs per AsOfDate.</td></tr><tr><td>MARKET\_DATA\_SET</td><td>STRING</td><td>Y</td><td>This field is not currently used</td><td>The market data set that should be used when retrieving rates for FX conversion.</td></tr><tr><td>RISK\_FACTOR</td><td>STRING</td><td>Y</td><td><a href="../cube/dimensions/risk">Risk Factors</a></td><td>Underlying risk factor (may be more than one) of the risk class.</td></tr><tr><td>PNL\_VECTOR</td><td>DOUBLE</td><td>Y</td><td /><td>PnL value corresponding to the index.</td></tr></tbody></table>

## Unique Key

<table><thead><tr><th>Columns</th></tr></thead><tbody><tr><td>VECTOR\_INDEX</td></tr><tr><td>AS\_OF\_DATE</td></tr><tr><td>TRADE\_KEY</td></tr><tr><td>SCENARIO\_SET</td></tr><tr><td>CALCULATION\_ID</td></tr><tr><td>MARKET\_DATA\_SET</td></tr><tr><td>RISK\_FACTOR</td></tr></tbody></table>

## Outgoing Joins

<table><thead><tr><th>Target Table</th><th>Source Columns</th><th>Target Columns</th></tr></thead><tbody><tr><td><a href="./tradepnls">TRADEPNLS</a></td><td>AS\_OF\_DATE<br />TRADE\_KEY<br />SCENARIO\_SET<br />CALCULATION\_ID<br />MARKET\_DATA\_SET<br />RISK\_FACTOR<br /></td><td>AS\_OF\_DATE<br />TRADE\_KEY<br />SCENARIO\_SET<br />CALCULATION\_ID<br />MARKET\_DATA\_SET<br />RISK\_FACTOR<br /></td></tr></tbody></table>
