esbacktest
Create esbacktest
object to run suite of table-based
expected shortfall (ES) backtests by Acerbi and Szekely
Description
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 normalunconditionalT
— Unconditional ES backtest assuming returns distribution ist
For more information, see Overview of Expected Shortfall Backtesting.
Creation
Description
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 thePortfolioData
VaRData —
NumRows
-by-NumVaRs
numeric array containing a copy of theVaRData
ESData —
NumRows
-by-NumVaRs
numeric array containing a copy of theESData
PortfolioID — String containing the
PortfolioID
VaRID —
1
-by-NumVaRs
string vector containing theVaRID
s for the corresponding columns inVaRData
VaRLevel —
1
-by-NumVaRs
numeric array containing theVaRLevel
s for the corresponding columns inVaRData
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
andminBiasRelative
).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
, andESData
must all be in the same units. These arguments can be expressed as returns or as profits and losses. There are no validations in theesbacktest
object regarding the units of these arguments.If there are missing values (
NaN
s) inPortfolioData
,VaRData
, andESData
, 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 thesummary
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 between0.90
and0.999
; the default is0.95
.The
TestLevel
(test confidence level) input argument for theruntests
,unconditionalNormal
, andunconditionalT
functions must be between0.5
and0.9999
; the default is0.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.
Input Arguments
Properties
Object Functions
summary | Report on failures and severity for basic expected shortfall (ES) |
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 |
Examples
References
[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).
Version History
Introduced in R2017b
See Also
summary
| runtests
| unconditionalNormal
| unconditionalT
| esbacktestbysim
| table
| timetable
| varbacktest
Topics
- Expected Shortfall (ES) Backtesting Workflow with No Model Distribution Information
- Expected Shortfall Estimation and Backtesting
- Estimate Expected Shortfall for Asset Portfolios
- Estimate VaR for Equity Portfolio Using Parametric Methods
- Overview of Expected Shortfall Backtesting
- Comparison of ES Backtesting Methods