Documentation

# unconditionalT

Unconditional expected shortfall (ES) backtest of Acerbi-Szekely with critical values for t distributions

## Syntax

``TestResults = unconditionalT(ebt)``
``TestResults = unconditionalT(ebt,Name,Value)``

## Description

example

````TestResults = unconditionalT(ebt)` runs the unconditional expected shortfall (ES) backtest of Acerbi-Szekely (2014) using precomputed critical values and assuming that the returns distribution is t with 3 degrees of freedom.```

example

````TestResults = unconditionalT(ebt,Name,Value)` adds an optional name-value pair argument for `TestLevel`. ```

## Examples

collapse all

Create an `esbacktest` object.

```load ESBacktestData ebt = esbacktest(Returns,VaRModel1,ESModel1,'VaRLevel',VaRLevel)```
```ebt = esbacktest with properties: PortfolioData: [1966x1 double] VaRData: [1966x1 double] ESData: [1966x1 double] PortfolioID: "Portfolio" VaRID: "VaR" VaRLevel: 0.9750 ```

Generate the `TestResults` report for the unconditional `t` ES backtest that assumes the returns distribution is `t` with 3 degrees of freedom.

`TestResults = unconditionalT(ebt,'TestLevel',0.99)`
```TestResults=1×9 table PortfolioID VaRID VaRLevel UnconditionalT PValue TestStatistic CriticalValue Observations TestLevel ___________ _____ ________ ______________ ________ _____________ _____________ ____________ _________ "Portfolio" "VaR" 0.975 accept 0.018566 -0.38265 -0.42986 1966 0.99 ```

## Input Arguments

collapse all

`esbacktest` (`ebt`) object, which contains a copy of the given data (the `PortfolioData`, `VarData`, and `ESData` properties) and all combinations of portfolio ID, VaR ID, and VaR levels to be tested. For more information on creating an `esbacktest` object, see `esbacktest`.

### Name-Value Pair Arguments

Specify optional comma-separated pairs of `Name,Value` arguments. `Name` is the argument name and `Value` is the corresponding value. `Name` must appear inside quotes. You can specify several name and value pair arguments in any order as `Name1,Value1,...,NameN,ValueN`.

Example: ```TestResults = unconditionalT(ebt,'TestLevel',0.99)```

Test confidence level, specified as the comma-separated pair consisting of `'TestLevel'` and a numeric value between `0.5` and `0.9999`.

Data Types: `double`

## Output Arguments

collapse all

Results, returned as a table where the rows correspond to all combinations of portfolio ID, VaR ID, and VaR levels to be tested. The columns correspond to the following information:

• `'PortfolioID'` — Portfolio ID for the given data.

• `'VaRID'` — VaR ID for each of the VaR data columns provided.

• `'VaRLevel'` — VaR level for the corresponding VaR data column.

• `'UnconditionalT'`— Categorical array with categories 'accept' and 'reject' indicating the result of the unconditional t test.

• `'PValue'`— P-value of the unconditional t test, interpolated from the precomputed critical values under the assumption that the returns follow a standard normal distribution.

### Note

p-values < `0.0001` are truncated to the minimum (`0.0001`) and p-values > `0.5` are displayed as a maximum (`0.5`).

• `'TestStatistic'`— Unconditional t test statistic.

• `'CriticalValue'`— Precomputed critical value for the corresponding test level and number of observations. Critical values are obtained under the assumption that the returns follow a t distribution with 3 degrees of freedom.

• `'Observations'`— Number of observations.

• `'TestLevel'`— Test confidence level.

### Note

For the test results, the terms `accept` and `reject` are used for convenience. Technically, a test does not accept a model; rather, a test fails to reject it.

collapse all

### Unconditional Test by Acerbi and Szekely

The unconditional test (also known as the second Acerbi-Szekely test) scales the losses by the corresponding ES value.

The unconditional test statistic is based on the unconditional relationship

`$E{S}_{t}=-{E}_{t}\left[\frac{{X}_{t}{I}_{t}}{{p}_{VaR}}\right]$`

where

`X`t is the portfolio outcome, that is, the portfolio return or portfolio profit and loss for period t.

`P`VaR is the probability of VaR failure defined as 1-VaR level.

`ES`t is the estimated expected shortfall for period t.

`I`t is the VaR failure indicator on period t with a value of 1 if `X`t < -VaR, and 0 otherwise.

The unconditional test statistic is defined as:

The critical values for the unconditional test statistic, which form the basis for table-based tests, are stable across a range of distributions. The `esbacktest` class runs the unconditional test against precomputed critical values under two distributional assumptions: normal distribution (thin tails) using `unconditionalNormal` and t distribution with 3 degrees of freedom (heavy tails) using `unconditionalT`.

## References

[1] Acerbi, C., and B. Szekely. Backtesting Expected Shortfall. MSCI Inc. December, 2014.