exceptions
Report exceptions in value-at-risk (VaR) or expected shortfall (ES) backtest objects
Since R2023b
Description
excTable = exceptions( returns a
formatted table or timetable of exceptions for a backtest object, where
btobj)btobj is either an esbacktest object (since R2024a) or a varbacktest object. An exception is a data point where -portfolioValue
> threshold*varValue. For example, if threshold=0, the table
of exceptions includes all dates where portfolioValue < 0, indicating
when losses occurred. A loss is defined as -portfolioValue for a given
point in time. The ratio Loss/VaR defines the severity ratio.
The output table includes columns corresponding to the following:
Time, Loss, VaR, and Severity Ratio for
varbacktestobjectsTime, Loss, VaR, Severity Ratio, Expected Shortfall, and Expected Severity Ratio for
esbacktestobjects
excTable = exceptions(
specifies additional output options using one or more name-value arguments. For example,
btobj,Name=Value)excTable = exceptions(btobj,SeverityThreshold=0) applies an exceptions
threshold to list only the dates where the portfolio shows a loss.