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

# Context Values

> Reference for the context values available in the cube.

## Context Values

| Context Value      | Description                                                                                        |
| ------------------ | -------------------------------------------------------------------------------------------------- |
| ESConfidenceLevel  | ES confidence level for the generic ES measure                                                     |
| ETGConfidenceLevel | ETG confidence level for the generic ETG measure                                                   |
| PercentileBuckets  | Number of buckets for the empirical distribution charts                                            |
| ReferenceLevel     | Specifies the level at which the charge is calculated for capital allocation                       |
| ShiftPercentile    | The default percentile of market shifts when displayed by the `x Shift Vector Percentile` measures |
| VaEConfidenceLevel | VaE confidence level for the generic VaE measure                                                   |
| VaRConfidenceLevel | VaR confidence level for the generic VaR measure                                                   |
| VaRTimePeriod      | VaR time period                                                                                    |
| WeightedVaRLambda  | Parameter lambda for the exponentially weighted historical tail measures                           |

The confidence level context values (ESConfidenceLevel, ETGConfidenceLevel, VaEConfidenceLevel, VaRConfidenceLevel) can be used to override the default confidence level in their respective calculations.

## PercentileBuckets

Controls the number of buckets used by the distribution histograms. If a user changes it to, say, 10, the PnL values are re-bucketed and the distribution charts updated.

<Frame>
  <img src="https://mintcdn.com/activeviam/gaoX7QceXzVFVfYn/solutions/market-risk/6.0/images/percentilebuckets.gif?s=5fbf0dfe11bd5b28aaa371c1fb1d3a23" alt="PnL Distribution charts using the PercentileBuckets context value" width="1392" height="648" data-path="solutions/market-risk/6.0/images/percentilebuckets.gif" />
</Frame>

## ReferenceLevel

Specifies the cube level at which the capital charge is calculated. Defaults to "Enterprise" (top of house). All capital allocations are relative to the ReferenceLevel.

Labels in the selection list read as follows:

* `Desk@Desks` — the level "Desk" in the hierarchy **Desks**
* `Level 5@BookHierarchy` — level "Level 5" in the hierarchy **BookHierarchy**

Once a level is selected, capital charges are computed for the members of that level and allocated down to components according to the chosen capital allocation methodology.

Variations: `euler`, `pro_rata`, `incremental`.

<Frame>
  <img src="https://mintcdn.com/activeviam/gaoX7QceXzVFVfYn/solutions/market-risk/6.0/images/referencelevel.png?fit=max&auto=format&n=gaoX7QceXzVFVfYn&q=85&s=beba8c27d7f5a03cd9fdd3339cb1822e" alt="Reference Level Illustration" width="446" height="372" data-path="solutions/market-risk/6.0/images/referencelevel.png" />
</Frame>

## VaRTimePeriod

Works in conjunction with the `Liquidity Horizon` field in the [Scenario](../input-files/scenarios) input table. Scales VaR vectors to the specified time period using the Square Root of Time rule.

$VaR_{n\text{-days}} = VaR_{1\text{-day}} \cdot \sqrt{n}$

**Example:** If scenarios contain both 10-day and 1-day vectors and VaRTimePeriod is set to 1, the 10-day vectors are normalised to 1 day while the 1-day vectors are unchanged.

<Note>
  10-day VaR and 1-day VaR should not be aggregated — Liquidity Horizon should be used as a slicing hierarchy.
</Note>

## WeightedVaRLambda

Overrides the default value of the decay factor lambda used in the exponentially weighted historical simulation (WHS) approach. See [Weighted VaR](../calculations/whs).
