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

# What is the Netting Set Analytics framework?

> How the netting-set analytics framework turns raw Mark-to-Future vectors into exposure metrics through a gross-to-netted-to-collateralized waterfall.

The netting-set analytics framework is a shared Java library that implements the counterparty-exposure engine used across Atoti exposure cubes. It provides every component required to transform raw Mark-to-Future (MtF) simulation vectors into exposure metrics (PFE, EE, ENE, ES) through a configurable gross-to-netted-to-collateralized waterfall.

## What is the netting-set analytics framework?

The framework is a shared library of the Atoti Enterprise Risk Suite. It sits between the Atoti Server cube layer and the raw MtF data loaded by the Data Loading Component (DLC). Its responsibilities are:

* **Database tables and joins.** It defines the `MarkToFuture`, `SimulationDates`, `NettingAgreements`, `IndependentAmounts`, and `FxScenarios` tables, and the joins that connect them to the common `TradeAttributes` table.
* **Dimensions.** It provides the `Simulation Dates`, `Netting`, `Is Included In Break Date`, `Collateral`, and `Netting-Analytics Trade Attributes` dimensions.
* **Exposure measure families.** It provides gross, netted, and collateralized exposure vector families, each with bank-side and counterparty-side variants.
* **Exposure metrics.** It computes `PFE`, `EE`, `ENE`, and `ES` scalars plus the `PFE Scenario Index` and `PFE Scenario Name` diagnostic measures from any exposure vector family.
* **Collateral algorithms.** It provides two built-in algorithms: `Bilateral CSA` and `Unilateral (Bank) CSA`.
* **Inframarginal and incremental contribution measures.** It decomposes netting-set-level exposure into per-trade inframarginal exposure vectors and metrics (hidden intermediates), and the visible incremental contribution of each trade.
* **Simulated cashflow measures.** It computes cumulative cashflow vectors used in gross and collateralized exposure calculations.
* **Query-time services.** It provides netting-agreement lookup, simulation-date navigation, FX rate lookup, and cashflow retrieval.

## What is Mark-to-Future (MtF)?

Mark-to-Future is a Monte-Carlo simulation approach to counterparty credit risk. A risk engine runs a large number of scenarios (typically hundreds to thousands) for each trade, computing the hypothetical mark-to-market value of the trade at a set of future time points under each scenario. The result for a single trade is stored as a vector of doubles: one element per scenario.

The netting-set analytics framework takes these pre-computed MtF vectors as input. It does not run the simulation itself. Its role is to aggregate the vectors across trades and netting sets, subtract collateral, and extract the statistical summary measures that risk managers need.

## How does the framework fit in the common layer?

The netting-set analytics framework is a shared library of the Atoti Enterprise Risk Suite. It builds on the common layer, which provides the universal building blocks (trade attributes, counterparties, AsOfDate, generic data-loading, common dimensions, and common measures) that all solutions share. The netting-set analytics framework extends those universal blocks with the exposure-specific tables, dimensions, and measure families described in this documentation.

For the universal common layer, see the [Atoti Enterprise Risk Suite common documentation](../../../common/introduction/overview).

## Related pages

* [Exposure concepts](./exposure-concepts)
* [Data model](../developer-guide/database/database-model)
* [Common layer overview](../../../common/introduction/overview)
