Main Content

Create `esbacktest`

object to run suite of table-based
expected shortfall (ES) backtests by Acerbi and Szekely

The general workflow is:

Load or generate the data for the ES backtesting analysis.

Create an

`esbacktest`

object. For more information, see Create esbacktest and Properties.Use the

`summary`

function to generate a summary report for the number of observations, expected, and observed average severity ratio.Use the

`runtests`

function to run all tests at once.For additional test details, run the following individual tests:

`unconditionalNormal`

— Unconditional ES backtest assuming returns distribution is normal`unconditionalT`

— Unconditional ES backtest assuming returns distribution is`t`

For more information, see Overview of Expected Shortfall Backtesting.

creates an `ebt`

= esbacktest(`PortfolioData`

,`VaRData`

,`ESData`

)`esbacktest`

(`ebt`

) object
using portfolio outcomes data and corresponding value-at-risk (VaR) and ES
data. The `ebt`

object has the following properties:

PortfolioData —

`NumRows`

-by-`1`

numeric array containing a copy of the`PortfolioData`

VaRData —

`NumRows`

-by-`NumVaRs`

numeric array containing a copy of the`VaRData`

ESData —

`NumRows`

-by-`NumVaRs`

numeric array containing a copy of the`ESData`

PortfolioID — String containing the

`PortfolioID`

VaRID —

`1`

-by-`NumVaRs`

string vector containing the`VaRID`

s for the corresponding columns in`VaRData`

VaRLevel —

`1`

-by-`NumVaRs`

numeric array containing the`VaRLevel`

s for the corresponding columns in`VaRData`

**Note**

Test results from esbacktest are only approximate since no distribution information is passed as input. When distribution information is available, use esbacktestbysim; in particular, the minimally biased test is recommended (see

`minBiasAbsolute`

and`minBiasRelative`

).The simulation of critical values assumes a mean of 0 for the underlying distribution. The critical values are sensitive to the mean of the underlying distribution. If the ES prediction is based on distributions with means significantly away from 0, the critical values in

`esbacktest`

will be unreliable.The required input arguments for

`PortfolioData`

,`VaRData`

, and`ESData`

must all be in the same units. These arguments can be expressed as returns or as profits and losses. There are no validations in the`esbacktest`

object regarding the units of these arguments.If there are missing values (

`NaN`

s) in`PortfolioData`

,`VaRData`

, and`ESData`

, the row of data is discarded before applying the tests. Therefore, a different number of observations are reported for models with a different number of missing values. The reported number of observations equals the original number of rows minus the number of missing values. To determine if there are discarded rows, use the`'Missing'`

column of the`summary`

report.Because the critical values are precomputed, only certain numbers of observations, VaR levels, and test levels are supported.

The number of observations (number of rows in the data minus the number of missing values) must be from 200 through 5000.

The

`VaRLevel`

input argument must be between`0.90`

and`0.999`

; the default is`0.95`

.The

`TestLevel`

(test confidence level) input argument for the`runtests`

,`unconditionalNormal`

, and`unconditionalT`

functions must be between`0.5`

and`0.9999`

; the default is`0.95`

.

sets Properties using name-value
pairs and any of the arguments in the previous syntax. For example,
`ebt`

= esbacktest(___,`Name,Value`

)```
ebt =
esbacktest(PortfolioData,VaRData,ESData,'VaRID','TotalVaR','VaRLevel',.999)
```

.
You can specify multiple name-value pairs as optional name-value pair
arguments.

`summary` | Basic expected shortfall (ES) report on failures and severity |

`runtests` | Run all expected shortfall (ES) backtests for `esbacktest`
object |

`unconditionalNormal` | Unconditional expected shortfall (ES) backtest by Acerbi-Szekely with critical values for normal distributions |

`unconditionalT` | Unconditional expected shortfall (ES) backtest by Acerbi-Szekely with
critical values for t distributions |

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

[2] Basel Committee on Banking Supervision. *"Minimum Capital
Requirements for Market Risk".* January, 2016 (https://www.bis.org/bcbs/publ/d352.pdf).

`esbacktestbysim`

| `runtests`

| `summary`

| `table`

| `timetable`

| `unconditionalNormal`

| `unconditionalT`

| `varbacktest`