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

# Creating dynamic maturities

> Guide to creating custom dynamic maturity bucket structures in Atoti Market Risk, covering the application.yaml properties and the procedure for adding new entries to the DynamicTenors, DynamicMaturities, and DynamicMoneyness CSV files.

The Dynamic Bucketing feature in Atoti Market Risk re-buckets sensitivities according to predefined structures defined by the following configuration and data files:

| File | Location |
| - | - |
| [application.yaml](https://docs.activeviam.com/solutions/market-risk/6.0/properties/property-files/application-yaml.md) (contains the properties that correspond to each type of data) | mr-application\src\main\resources |
| DynamicTenors.csv, DynamicMaturities.csv, DynamicMoneyness.csv | mr-application\src\test\resources\data |

## Points to note

For the Tenors and Maturities, the number of days is taken into account
for each tenor/maturity. For Moneyness, the shift from the strike price
is taken into account for each moneyness label (see step-by-step
procedure below).

## Step-by-step procedure

1. In the [application.yaml](https://docs.activeviam.com/solutions/market-risk/6.0/properties/property-files/application-yaml.md) file, add the property that
   corresponds to the type of data that you want to update:
   `mr.bucketing.sets.tenors`, `mr.bucketing.sets.maturities` or
   `mr.bucketing.sets.moneyness`.
2. Add the name of the bucket structure that you want to create in the
   relevant property, for example: `mr.bucketing.sets.tenors` `= DEFAULT,REDUCED,DECADE,CUSTOM_BUCKET_STRUCTURE`
3. In the relevant csv file **DynamicTenors.csv**,
   **DynamicMaturities.csv** or **DynamicMoneyness.csv**, add the
   entries that correspond to your new bucket structure.
   **Example:**
   TenorLabels,NumberOfDays,SensitivityName,TenorSet
   10Y,3600,Delta,CUSTOM\_BUCKET\_STRUCTURE
   20Y,7200,Delta,CUSTOM\_BUCKET\_STRUCTURE

### Note on values

| Field | Value |
| - | - |
| `TenorSet` | Defines the bucket structure. The value must be the same as the one defined in the [application.yaml](https://docs.activeviam.com/solutions/market-risk/6.0/properties/property-files/application-yaml.md) file in step 1. and will be used in the [DynamicTenors](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/dynamicbucketing.md), the [DynamicMaturities](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/dynamicbucketing.md) or the [DynamicMoneyness](https://docs.activeviam.com/solutions/market-risk/6.0/cube/dimensions/dynamicbucketing.md) analysis hierarchy, depending on the name of the file you modified (DynamicTenors.csv, DynamicMaturities.csv or DynamicMoneyness.csv respectively). |
| `NumberOfDays` (or `Shift` in the case of moneyness) | Specifies the number of days (or the percentage from the strike price in the case of moneyness) that is used to perform a linear interpolation between tenors. |
| `SensitivityName` | If no value is specified, the bucket structure can be applied to all sensitivities. |
