esbacktestbysim
R2026bCreate 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
esbacktestbysimobject. For more information, see Create esbacktestbysim.Use the
summaryfunction to generate a summary report for the given data on the number of observations and the number of failures.Use the
runtestsfunction 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 object and simulates portfolio
outcome scenarios to compute critical values for these tests:
The ebts output has these properties:
PortfolioData —
NumRows-by-1numeric array containing a copy ofPortfolioDataVaRData —
NumRows-by-NumVaRsnumeric array containing a copy ofVaRDataESData —
NumRows-by-NumVaRsnumeric array containing a copy ofESDataDistribution — structure containing the model information. For example, if you specify
DistributionNameas"normal", thenDistributionhas a fieldName, with value"normal", as well as fieldsMeanandStandardDeviation, with values set to the corresponding inputs.PortfolioID — String containing
PortfolioIDVaRID —
1-by-NumVaRsstring vector containingVaRIDvalues for the corresponding columns inVaRDataVaRLevel —
1-by-NumVaRsnumeric array containingVaRLevelvalues for the corresponding columns inVaRData.
creates the object and simulates the scenarios for the vector
ebts = esbacktestbysim(PortfolioData,VaRData,ESData,pdObj)pdObj of probability distribution objects.
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=0.99).
You can specify multiple name-value pairs.
Note
The required input arguments for
PortfolioData,VaRData, andESDatamust all be in the same units. These arguments can be expressed as returns or as profits and losses. There are no validations in theesbacktestbysimobject regarding the units of these arguments.If there are rows in
PortfolioData,VaRData,ESData, orDistributionthat contain missing (NaN) values, then the function discards those rows of data before applying the tests. To determine if the function discarded rows, use theMissingcolumn of thesummaryreport.
Input Arguments
Name-Value Arguments
Properties
Object Functions
summary | Report on failures and severity for basic expected shortfall (ES) using simulations |
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 R2017bSee Also
summary | runtests | conditional | unconditional | quantile | simulate | minBiasRelative | minBiasAbsolute | esbacktest | table | timetable | varbacktest | esbacktestbyde