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

# Dimensions

> The counterparty-exposure dimensions the framework provides, including Simulation Dates, Netting, Is Included In Break Date, Collateral, Collateral Algorithm, Currency, and Currencies.

The netting-set analytics framework provides a set of dimensions specific to counterparty-exposure analytics. Consuming cubes select the dimensions they need and add them to their cube alongside the universal common dimensions.

For the universal common dimensions (AsOfDate, Trade Attributes, Counterparties, Scenarios, Confidence Level), see the [common dimensions documentation](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/common/developer-guide/cube/dimensions.md).

## What dimensions does the framework provide?

| Dimension | Source table | Description |
| - | - | - |
| Simulation Dates | `SimulationDates` | Exposes future time points in the MtF simulation grid. |
| Netting | `MasterAgreements` | Groups trades by master agreement (netting set) for netting aggregation. |
| Is Included In Break Date | Derived | Flags whether a trade contributes to the exposure aggregate at the current time point, based on its break date. |
| Collateral | `IndependentAmounts` | Provides levels for independent amount currency and maturity. |
| Collateral Algorithm | None | Lists the collateral algorithms. The selected member decides which algorithm the collateralized measures use. |
| Currency | `MarkToFuture` | Native currency of the trade mark-to-future. |
| Currencies | None | Display currency that the amounts are expressed in. |
| NettingAnalyticsTradeAttributes | `TradeAttributes` | The Break Date and CSA ID levels of each trade, in a dimension separate from Trade Attributes. |

## What is the Simulation Dates dimension?

The Simulation Dates dimension exposes one hierarchy: `Time Point`. Each member of this hierarchy is a future simulation date present in the `SimulationDates` table.

* **Hierarchy:** `Time Point`
* **Level:** `Time Point` (type: `TIME_DAYS`)
* **Source field:** `SimulationDates.TimePoint`

Filtering on a specific time point restricts all exposure measures to that single horizon. Exposure profiles are built by querying the cube across all time-point members.

## What is the Netting dimension?

The Netting dimension groups trades by master agreement. A master agreement is the netting set: the cube nets the exposures of its trades together, and floors the netted value once per master agreement, when the master agreement nets.

| Hierarchy and level | Source field | Description |
| - | - | - |
| `Master Agreement ID` | `MasterAgreements.MasterAgreementId` | Identifier of the master agreement, the level at which exposures are netted. |
| `Master Agreement Name` | `MasterAgreements.MasterAgreementName` | Name of the master agreement. |
| `Master Agreement Type` | `MasterAgreements.MasterAgreementType` | Type of the master agreement. |
| `Netted` | `MasterAgreements.Netted` | Whether the exposures under the master agreement are netted. |

A query at the `Master Agreement ID` level aggregates the mark-to-future (MtF) vectors of all trades of the master agreement before computing the netted exposure. A master agreement whose `Netted` value is `false` does not net: each of its trades counts on its own.

## What is the Is Included In Break Date dimension?

This is a derived dimension. It contains no direct database field. Instead, it evaluates a predicate on two other levels: `Break Date` (from the NettingAnalyticsTradeAttributes dimension) and `Time Point` (from Simulation Dates).

* **Hierarchy:** `Included In Break Date`
* **Level:** `Included In Break Date`
* **Members:** `true` and `false`, whatever the data holds.
* **Derivation logic:** A trade is included (`true`) if its break date is not set, or if the current time point is before the break date.

The break-date measure variants use this level as a filter. When the cube evaluates a break-date-aware measure, it excludes trades whose break date falls before the current time point.

## What is the Collateral dimension?

The Collateral dimension drives the `IndependentAmounts` join. It provides two hierarchies for filtering and grouping independent-amount data.

* **Hierarchy:** `Independent Amount Currency` / Level: `Independent Amount Currency`
* **Hierarchy:** `Independent Amount Maturity` / Level: `Independent Amount Maturity`
* **Source fields:** `IndependentAmounts.IndependentAmountCurrency`, `IndependentAmounts.IndependentAmountMaturity`

These levels are referenced by the `ISpecificLevels` interface in the public API. See [Public API](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/libs/netting-set-analytics/reference/public-api.md).

## What is the Collateral Algorithm dimension?

The Collateral Algorithm dimension lists the collateral algorithms of the cube. It has no source table: its members are the built-in algorithms and the ones that the application adds.

* **Hierarchy:** `Collateral Algorithm`, a slicing hierarchy
* **Level:** `Collateral Algorithm`
* **Members:** `Bilateral CSA`, `Unilateral (Bank) CSA`, and the algorithms that the application adds.
* **Default member:** the algorithm named by the `collateral.default-evaluator` property.

A query that selects a member evaluates the collateralized measures with that algorithm. See [Collateral algorithms](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/libs/netting-set-analytics/developer-guide/cube/collateral-evaluator-framework.md#how-is-an-algorithm-selected).

## What is the Currency dimension?

The Currency dimension exposes the native currency of the trade mark-to-future.

* **Hierarchy:** `Currency` / Level: `Currency`
* **Source field:** `MarkToFuture.Currency`
* **Folder:** `MTF Currency`

This level is referenced by the `ISpecificLevels` interface in the public API. See [Public API](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/libs/netting-set-analytics/reference/public-api.md).

## What is the Currencies dimension?

The Currencies dimension holds the currency that the amounts are expressed in.

* **Hierarchy:** `Display Currency` (slicing hierarchy) / Level: `Display Currency`
* **Folder:** `Display Currency`
* **Default member:** the `default-currency` property of the cube, `EUR` by default

A query that does not select a display currency returns amounts in the default currency. This level is referenced by `INettingSetAnalyticsLevels.fx()` in the public API. See [Public API](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/libs/netting-set-analytics/reference/public-api.md).

## What is the NettingAnalyticsTradeAttributes dimension?

This dimension holds two framework-specific hierarchies, read from the `TradeAttributes` table. It is separate from the Trade Attributes dimension, so MDX addresses its levels as `[NettingAnalyticsTradeAttributes].[CSA ID]`. Its hierarchies are in the Collateral Trade Attributes folder.

* **Hierarchy:** `Break Date` / Level: `Break Date` (the optional break date per trade). Source field: `TradeAttributes.BreakDate`.
* **Hierarchy:** `CSA ID` / Level: `CSA ID`, the identifier of the credit support annex (CSA) that collateralizes the trade. Source field: `TradeAttributes.CSAId`. Trades without a CSA have the member `N/A`.
* **Folder:** `Collateral Trade Attributes`

The `CSA ID` level is the level of everything that deals with collateral: the CSA parameters, the collateral balance, and the selection of the collateral algorithm. See [Collateral algorithms](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/libs/netting-set-analytics/developer-guide/cube/collateral-evaluator-framework.md).

## Related pages

* [Common dimensions](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/common/developer-guide/cube/dimensions.md)
* [Data model](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/libs/netting-set-analytics/developer-guide/database/database-model.md)
* [Public API](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/libs/netting-set-analytics/reference/public-api.md)
* [Exposure measures](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/libs/netting-set-analytics/developer-guide/cube/exposure-measures.md)
