esbacktestbysim
Create esbacktestbysim
object to run simulation-based
suite of 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
esbacktestbysim
object. For more information, see Create esbacktestbysim.Use the
summary
function to generate a summary report for the given data on the number of observations and the number of failures.Use the
runtests
function to run all tests at once.For additional test details, run the following individual tests:
conditional
— Conditional test of Acerbi-Szekely (2014)unconditional
— Unconditional test of Acerbi-Szekely (2014)quantile
— Quantile test of Acerbi-Szekely (2014)minBiasAbsolute
— Minimally biased absolute test of Acerbi-Szekely (2017)minBiasRelative
— Minimally biased relative test of Acerbi-Szekely (2017)
For more information, see Overview of Expected Shortfall Backtesting.
Creation
Syntax
Description
creates an ebts
= esbacktestbysim(PortfolioData
,VaRData
,ESData
,DistributionName
)esbacktestbysim
(ebts
)
object and simulates portfolio outcome scenarios to compute critical values
for these tests:
The ebts
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
Distribution — Structure containing the model information, including model distribution name and distribution parameters. For example, for a normal distribution,
Distribution
has fields'Name'
,'Mean'
, and'StandardDeviation'
, with values set to the corresponding inputs.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
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 theesbacktestbysim
object regarding the units of these arguments.If there are missing values (
NaN
s) inPortfolioData
,VaRData
,ESData
, orDistribution
parameters data, 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.
sets Properties using
name-value pairs and any of the arguments in the previous syntax. For
example, ebts
= esbacktestbysim(___,Name,Value
)ebts =
esbacktestbysim(PortfolioData,VaRData,ESData,DistributionName,'VaRID','TotalVaR','VaRLevel',.99)
.
You can specify multiple name-value pairs.
Input Arguments
Properties
Object Functions
summary | Basic expected shortfall (ES) report on failures and severity |
runtests | Run all expected shortfall backtests (ES) for
esbacktestbysim object |
conditional | Conditional expected shortfall (ES) backtest by Acerbi and Szekely |
unconditional | Unconditional expected shortfall backtest by Acerbi and Szekely |
quantile | Quantile expected shortfall (ES) backtest by Acerbi and Szekely |
minBiasRelative | Minimally biased relative test for Expected Shortfall (ES) backtest by Acerbi-Szekely |
minBiasAbsolute | Minimally biased absolute test for Expected Shortfall (ES) backtest by Acerbi-Szekely |
simulate | Simulate expected shortfall (ES) test statistics |
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
| conditional
| unconditional
| quantile
| simulate
| minBiasRelative
| minBiasAbsolute
| esbacktest
| table
| timetable
| varbacktest
| esbacktestbyde