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

# Configuration

> The framework configuration concerns (scenarios count, CSA defaults, rounding methods) and how each consuming cube surfaces them.

The netting-set analytics framework does not define its own Spring Boot configuration prefix. Instead, each consuming cube maps the framework's properties to its own cube-specific prefix. This page describes the framework-level configuration concerns and how they are surfaced by each consuming cube.

## What framework parameters need configuration?

The framework requires three types of configuration to function correctly:

| Concern | Description |
| - | - |
| Scenarios count | The total number of Monte-Carlo scenarios. Determines the length of all vector fields. Must be consistent across all tables in the same cube. |
| Collateral default algorithm | The name of the default member of the Collateral Algorithm hierarchy. |
| CSA parameter currency defaults | Default values for margin periods of risk, haircut, and CSA currency applied when `CollateralAgreements` rows omit these fields. They are fixed in the framework: no property changes them. |

## What are the CSA default values?

The following defaults apply to `CollateralAgreements` rows:

| Field | Default value |
| - | - |
| `BankMPOR` | `20` (days) |
| `CptyMPOR` | `20` (days) |
| `HaircutScaleFactor` | `1.0` |
| `CSAParamCurrency` | `"USD"` |

They take effect when a row does not provide an explicit value.

## How is the default collateral algorithm set?

The `default-evaluator` property names the default member of the Collateral Algorithm hierarchy. Its default is `Bilateral CSA`. Queries that do not select a member use this algorithm. The built-in algorithm names are `Bilateral CSA` and `Unilateral (Bank) CSA`. Both are available in the PFE and xVA cubes.

The value must be a built-in algorithm or an algorithm that the application adds through an `ICollateralConfigurer` bean. Otherwise the application fails at startup with an error that names the cube. There is no property that lists the algorithms. The configurer declares them. See [Collateral algorithms](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/libs/netting-set-analytics/developer-guide/cube/collateral-evaluator-framework.md) and [How to write your own collateral algorithm](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/libs/netting-set-analytics/developer-guide/cube/custom-collateral-algorithm.md).

## How are framework parameters surfaced by consuming cubes?

Each consuming cube defines its own Spring Boot configuration prefix and maps it to the framework's components.

### PFE cube

The PFE cube uses the prefix `atoti.solution.model.cubes.pfe`. The relevant framework parameters surface as:

| Property key | Type | Default | Description |
| - | - | - | - |
| `atoti.solution.model.cubes.pfe.scenarios.count` | `Integer` | `5` | Total number of Monte-Carlo scenarios. Sets the vector length for `MarkToFuture` and `FxScenarios`. |
| `atoti.solution.model.cubes.pfe.collateral.default-evaluator` | `String` | `"Bilateral CSA"` | Default member of the Collateral Algorithm hierarchy. |
| `atoti.solution.model.cubes.pfe.rounding-method` | `RoundingMethod` | `ROUND_EVEN` | Rounding method for PFE and ES quantile position. |
| `atoti.solution.model.cubes.pfe.currencies.currencies` | `Set<String>` | `[EUR, GBP, USD, JPY, CHF]` | Members of the Display Currency hierarchy. |
| `atoti.solution.model.cubes.pfe.currencies.default-currency` | `String` | `EUR` | Default display currency, and pivot currency for pairs with no quote. |
| `atoti.solution.model.cubes.pfe.additional-csa-parameters` | `List<CsaParameter>` | `[]` | Additional `CollateralAgreements` fields published as CSA parameter measures. Each entry pairs a `field-name` with a data `type`. See [PFE configuration properties](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/solutions/counterparty-credit-risk/pfe/reference/configuration-properties.md). |
| `atoti.solution.model.cubes.pfe.market-data-set.default-market-data-set` | `String` | `Official EOD` | Default member of the Market Data Set hierarchy. |
| `atoti.solution.model.cubes.pfe.market-data-set.market-data-sets` | `List<String>` | `[Official EOD]` | Members of the Market Data Set hierarchy. |

For the full PFE cube configuration reference, see [PFE cube configuration properties](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/solutions/counterparty-credit-risk/pfe/reference/configuration-properties.md).

### XVA cube

The XVA cube uses the prefix `atoti.solution.model.cubes.xva`. The relevant framework parameters surface as:

| Property key | Type | Default | Description |
| - | - | - | - |
| `atoti.solution.model.cubes.xva.scenarios.count` | `Integer` | `5` | Total number of Monte-Carlo scenarios. Sets the vector length for `MarkToFuture` and `FxScenarios`. |
| `atoti.solution.model.cubes.xva.collateral.default-evaluator` | `String` | `"Bilateral CSA"` | Default member of the Collateral Algorithm hierarchy. |
| `atoti.solution.model.cubes.xva.rounding-method` | `RoundingMethod` | `ROUND_EVEN` | Rounding method for PFE and ES quantile position. |
| `atoti.solution.model.cubes.xva.currencies.currencies` | `Set<String>` | `[EUR, GBP, USD, JPY, CHF]` | Members of the Display Currency hierarchy. |
| `atoti.solution.model.cubes.xva.currencies.default-currency` | `String` | `EUR` | Default display currency, and pivot currency for pairs with no quote. |
| `atoti.solution.model.cubes.xva.additional-csa-parameters` | `List<CsaParameter>` | `[]` | Additional `CollateralAgreements` fields published as CSA parameter measures. Each entry pairs a `field-name` with a data `type`. |
| `atoti.solution.model.cubes.xva.market-data-set.default-market-data-set` | `String` | `Official EOD` | Default member of the Market Data Set hierarchy. |
| `atoti.solution.model.cubes.xva.market-data-set.market-data-sets` | `List<String>` | `[Official EOD]` | Members of the Market Data Set hierarchy. |

For the full XVA cube configuration reference, see [XVA cube configuration properties](../../../solutions/xva/xva/reference/configuration-properties).

## What are the rounding methods?

The rounding method controls how the fractional quantile position is rounded to an integer when computing PFE, ES, and the PFE Scenario Index and Name. See the [common configuration properties reference](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/common/reference/configuration-properties.md#rounding) for the available rounding method values.

## Related pages

* [Collateral algorithms](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/libs/netting-set-analytics/developer-guide/cube/collateral-evaluator-framework.md)
* [How to write your own collateral algorithm](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/libs/netting-set-analytics/developer-guide/cube/custom-collateral-algorithm.md)
* [Exposure metrics](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/libs/netting-set-analytics/developer-guide/cube/exposure-metrics.md)
* [PFE cube configuration properties](https://docs.activeviam.com/solutions/enterprise-risk-suite/1.1/solutions/counterparty-credit-risk/pfe/reference/configuration-properties.md)
