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

# Parameter sets

This page answers a number of key questions regarding parameter sets.

## What is a parameter set?

In the FRTB calculations, there are a considerable number of constants.
These include values such as weightings, the value of rho, the default
maturity scaling factor and so forth. The term
*parameter set* identifies a group of
constants. See the configuration file [FRTBParameters](https://docs.activeviam.com/solutions/frtb/6.0/configuration/frtbparameters.md).

## Why have multiple parameter sets?

Different regulators are expected to make changes to these values. By
defining a parameter set per regulator or reporting requirement, the
calculations can be re-run with different variations of the parameters, or
measures can be compared across different parameter sets.

## Must every constant be defined for every parameter set?

This is not required, as many regulators are expected to change only certain
parameters and fall back to another parameter set otherwise.

In the current implementation of the parameter set logic, a
parent-child relationship selects the fallback parameter set when a
parameter is missing for a specific parameter set. This parent-child
relationship is defined in the `ParameterSet.csv` file. In addition,
there is a start date column in all configuration files. A given
parameter will only be considered if the `as of date` passed in the
query is after the start date.

When defining the fallback logic, single value
parameters, such as *GIRR Delta different curve correlation*, are distinguished from lists
of parameters such as *GIRR major currencies* or *Commodity Delta
vertices*. The latter are best thought of as
vectors of parameters, since they can only be overridden all at once.

#### Example

The PRA may decide they want to use the exact same parameters as defined
by the EU but change the risk weight for the `0.5 vertex` of the *GIRR Delta sensitivities*. In this case, the **list** of GIRR Delta risk weights needs to be overridden.

This requires the following:

* Define two parameter sets, one called EU and another one called PRA.
  The EU parameter set to be the parent of the PRA parameter set.

* Add a new row to the `GIRR_Delta_Weightings.csv` file corresponding
  to all the vertices that are expected to exist when the PRA
  parameter set is selected.

  Adding only one row for the`  0.5 vertex  `with the new weight value
  would mean that under the PRA parameter set, retrieving the risk
  weight for any other vertex will return null.

In other words, falling back to the parent parameter set in the case of
a list of parameters only happens if none of the parameters in the list
are defined in the child parameter set.

The logic that is used to prioritize the parameter sets in the fallback
process can be customized, however the constraints explained above will
not change.

## Can a calculation run only for child-level parameter sets?

Calculations can be run for any parameter set that is defined at
any level of the parameter set hierarchy.

## How to choose the parameter set for a calculation

Parameter Set is a slicing hierarchy. The parameter set
to use can be chosen by either:

* Selecting the parameter set in the filters of the query

* Adding the hierarchy to the columns or rows and comparing the results
  for different parameter sets.

See [Parameter Sets What-If Widget](https://docs.activeviam.com/solutions/frtb/6.0/what-if/what-if-parameters-widget.md).

## What does a multi-regulator parameter set hierarchy look like?

An example parameter set could be as follows:

![Parameter Set example](https://mintcdn.com/activeviam/GtN3Ivwh2BS7cHwq/solutions/frtb/6.0/images/parameter_set_example.png?fit=max\&auto=format\&n=GtN3Ivwh2BS7cHwq\&q=85\&s=4c9edb1d9f31c234fbb0becc8c7ac56f)

 

The above example defines the following parameter sets:

* BCBS : The primary parameter set, which all other parameter sets
  fall back to

* JFSA : Variation of the BCBS parameter set

* FED: Variation of BCBS parameter set

* EU: Variation of the BCBS parameter set

* FINMA: Variation of the BCBS parameter set

* ACPR: Variation of the EU parameter set

* PRA: Variation of the EU parameter set

Example parameters loaded:

| Vertex | Risk Weight | Start Date | Parameter Set |
| - | - | - | - |
| 0.25 | 0.024 | 2016-06-01 | BCBS |
| 0.5 | 0.024 | 2016-06-01 | BCBS |
| 1 | 0.0225 | 2016-06-01 | BCBS |
| 2 | 0.0188 | 2016-06-01 | BCBS |
| 3 | 0.0173 | 2016-06-01 | BCBS |
| 5 | 0.015 | 2016-06-01 | BCBS |
| 10 | 0.015 | 2016-06-01 | BCBS |
| 15 | 0.015 | 2016-06-01 | BCBS |
| 20 | 0.015 | 2016-06-01 | BCBS |
| 30 | 0.015 | 2016-06-01 | BCBS |
| 0.25 | 0.0245 | 2016-06-01 | EU |
| 0.5 | 0.0245 | 2016-06-01 | EU |
| 1 | 0.0235 | 2016-06-01 | EU |
| 2 | 0.019 | 2016-06-01 | EU |
| 3 | 0.018 | 2016-06-01 | EU |
| 0.25 | 0.0265 | 2016-06-01 | PRA |
| 0.5 | 0.0265 | 2016-06-01 | PRA |
| 1 | 0.0275 | 2016-06-01 | PRA |
| 0.5 | 0.0255 | 2015-01-01 | ACPR |

Lookup results:

| Parameter Set | Run Date | Vertex | Risk Weight |
| - | - | - | - |
| BCBS | 2016-06-01 | 0.25 | 0.024 |
| BCBS | 2016-06-01 | 0.5 | 0.024 |
| BCBS | 2016-06-01 | 1 | 0.0225 |
| BCBS | 2016-06-01 | 2 | 0.0188 |
| BCBS | 2016-06-01 | 3 | 0.0173 |
| BCBS | 2016-06-01 | 5 | 0.015 |
| BCBS | 2016-06-01 | 10 | 0.015 |
| BCBS | 2016-06-01 | 15 | 0.015 |
| BCBS | 2016-06-01 | 20 | 0.015 |
| BCBS | 2016-06-01 | 30 | 0.015 |
| EU | 2016-06-01 | 0.25 | 0.0245 |
| EU | 2016-06-01 | 0.5 | 0.0245 |
| EU | 2016-06-01 | 1 | 0.0235 |
| EU | 2016-06-01 | 2 | 0.019 |
| EU | 2016-06-01 | 3 | 0.018 |
| PRA | 2016-06-01 | 0.25 | 0.0265 |
| PRA | 2016-06-01 | 0.5 | 0.0265 |
| PRA | 2016-06-01 | 1 | 0.0275 |
| ACPR | 2016-06-01 | 0.25 | 0.0245 |
| ACPR | 2016-06-01 | 0.5 | 0.0245 |
| ACPR | 2016-06-01 | 1 | 0.0235 |
| ACPR | 2016-06-01 | 2 | 0.019 |
| ACPR | 2016-06-01 | 3 | 0.018 |

In the table above, the BCBS, EU and PRA queries return the
values defined for the respective parameter sets. However, for
ACPR the as of date passed in (2016-06-01) is later than the start date
(2015-01-01), so the values defined for ACPR are ignored and the
calculation falls back to the parent parameter set.

## Do I need to define a parameter set for every run date?

Parameters are not expected to vary per run date, so this is not
required.

Any given parameter needs a start date. An entire parameter set does not
need to be re-defined for each start date, only the values
that change from that respective start date. However, it
still holds that a list of parameters can only be overridden together.

#### Example

This example shows how a parameter list behaves across run dates when a
new start date redefines that list. The BCBS parameter set has a full
list of risk weights from 2016-06-01, and a single 0.5 vertex weight is
redefined from 2018-03-15.

Parameter values loaded:

| Vertex | Risk Weight | Start Date | Parameter Set |
| - | - | - | - |
| 0.25 | 0.024 | 2016-06-01 | BCBS |
| 0.5 | 0.024 | 2016-06-01 | BCBS |
| 1 | 0.0225 | 2016-06-01 | BCBS |
| 2 | 0.0188 | 2016-06-01 | BCBS |
| 3 | 0.0173 | 2016-06-01 | BCBS |
| 5 | 0.015 | 2016-06-01 | BCBS |
| 10 | 0.015 | 2016-06-01 | BCBS |
| 15 | 0.015 | 2016-06-01 | BCBS |
| 20 | 0.015 | 2016-06-01 | BCBS |
| 30 | 0.015 | 2016-06-01 | BCBS |
| 0.5 | 0.03 | 2018-03-15 | BCBS |

Lookup results:

| Parameter Set | Run Date | Vertex | Risk Weight |
| - | - | - | - |
| BCBS | 2017-08-01 | 0.25 | 0.024 |
| BCBS | 2017-08-01 | 0.5 | 0.024 |
| BCBS | 2017-08-01 | 1 | 0.0225 |
| BCBS | 2017-08-01 | 2 | 0.0188 |
| BCBS | 2017-08-01 | 3 | 0.0173 |
| BCBS | 2017-08-01 | 5 | 0.015 |
| BCBS | 2017-08-01 | 10 | 0.015 |
| BCBS | 2017-08-01 | 15 | 0.015 |
| BCBS | 2017-08-01 | 20 | 0.015 |
| BCBS | 2017-08-01 | 30 | 0.015 |
| BCBS | 2018-04-12 | 0.25 | null |
| BCBS | 2018-04-12 | 0.5 | 0.03 |
| BCBS | 2018-04-12 | 1 | null |
| BCBS | 2018-04-12 | 2 | null |
| BCBS | 2018-04-12 | 3 | null |
| BCBS | 2018-04-12 | 5 | null |
| BCBS | 2018-04-12 | 10 | null |
| BCBS | 2018-04-12 | 15 | null |
| BCBS | 2018-04-12 | 20 | null |
| BCBS | 2018-04-12 | 30 | null |

In the above example, a query for the run date 2018-04-12 returns
results only for the vertex 0.5. As of
the date 2018-03-15, the list of risk weights is overridden, and
the new list defines a risk weight only for vertex 0.5.
