主要内容

tl

Traffic light test for value-at-risk (VaR) backtesting

Description

example

测试结果= tl(VBT)生成价值风险(VAR)进行回测的交通信号灯(TL)测试。

Examples

collapse all

Create avarbacktest目的。

loadVaRBacktestDatavbt = varbackTest(EquityIndex,Normal95)
VBT= varbacktest with properties: PortfolioData: [1043x1 double] VaRData: [1043x1 double] PortfolioID: "Portfolio" VaRID: "VaR" VaRLevel: 0.9500

生成tl测试结果。

testResults = tl(vbt)
testResults =1×9表PortfolioID VaRID VaRLevel TL Probability TypeI Increase Observations Failures ___________ _____ ________ _____ ___________ _______ ________ ____________ ________ "Portfolio" "VaR" 0.95 green 0.77913 0.26396 0 1043 57

Use thevarbacktest具有名称值对参数的构造函数来创建一个varbacktest目的。

loadVaRBacktestDatavbt = varbackTest(EquityIndex,。。。[常规95常规99历史95历史99 EWMA95 EWMA99],,。。。“投资组合”,'Equity',。。。'VaRID',{“正常95”'Normal99''Historical95''历史99''EWMA95''ewma99'},,。。。'VaRLevel',[0.95 0.99 0.95 0.99 0.95 0.99])
VBT= varbacktest with properties: PortfolioData: [1043x1 double] VaRData: [1043x6 double] PortfolioID: "Equity" VaRID: ["Normal95" "Normal99" "Historical95" ... ] VaRLevel: [0.9500 0.9900 0.9500 0.9900 0.9500 0.9900]

生成tl测试结果。

testResults = tl(vbt)
testResults =6×9 tablePortfolioID VaRID VaRLevel TL Probability TypeI Increase Observations Failures ___________ ______________ ________ ______ ___________ _________ ________ ____________ ________ "Equity" "Normal95" 0.95 green 0.77913 0.26396 0 1043 57 "Equity" "Normal99" 0.99 yellow 0.97991 0.03686 0.26582 1043 17 "Equity" "Historical95"0.95 green 0.85155 0.18232 0 1043 59 "Equity" "Historical99" 0.99 green 0.74996 0.35269 0 1043 12 "Equity" "EWMA95" 0.95 green 0.85155 0.18232 0 1043 59 "Equity" "EWMA99" 0.99 yellow 0.99952 0.0011122 0.43511 1043 22

Input Arguments

collapse all

varbacktest(VBT) object, contains a copy of the given data (thePortfolioDataVarDataproperties) and all combinations of portfolio ID, VaR ID, and VaR levels to be tested. For more information on creating avarbacktestobject, seevarbacktest

Output Arguments

collapse all

tl测试结果作为表返回,该表对应于要测试的投资组合ID,VAR ID和VAR级别的所有组合。这些列对应于以下信息:

  • “投资组合”- 给定数据的投资组合ID

  • 'VaRID'— VaR ID for each of the VaR data columns provided

  • 'VaRLevel'- 相应的VAR数据列的VAR级别

  • 'TL'- 类别的分类(序数)数组green,yellow, 和redthat indicate the result of the traffic lighttltest

  • '可能性'— Cumulative probability of observing up to the corresponding number of failures

  • 'typei'— Probability of observing the corresponding number of failures or more if the model is correct

  • '增加'- 增加缩放系数

  • 'Observations'— Number of observations

  • 'Failures'- 失败数量

More About

collapse all

交通灯测试

Thetlfunction performs Basel's traffic light test, also known as three-zone test. Basel's methodology can be applied to any number of time periods and VaR confidence levels, as explained in算法

巴塞尔委员会报告说,以250个时间段内的三个区域的表格为例,VAR置信度为0.99。巴塞尔报告的表中表缩放系数的增加具有一些临时调整(舍入等),在巴塞尔文档中未明确描述。下表比较了250个时期和0.99%VAR置信度的情况下,比较了巴塞尔文档中报告的缩放系数的增加,以及TL检验报告的因子的增加。

Failures Increase Basel Increase TL
0 Green 0 0
1 Green 0 0
2 Green 0 0
3 Green 0 0
4 Green 0 0
5 Yellow 0.40 0.3982
6 Yellow 0.50 0.5295
7 Yellow 0.65 0.6520
8 Yellow 0.75 0.7680
9 Yellow 0.85 0.8791
10 Red 1 1

Thetl函数计算按照巴塞尔文档中描述的方法的缩放系数(请参阅参考),并在算法section. Thetlfunction does not apply any ad-hoc adjustments.

算法

交通灯测试基于二项式分布。认为N是观察的数量,p= 1 -VARLEVELis the probability of observing a failure if the model is correct, andxis the number of failures.

The test computes the cumulative probability of observing up toxfailures, reported in the'可能性'column,

P r o b a b i l i t y = P r o b a b i l i t y ( X x | N , p ) = F ( x | N , p )

where F ( x | N , p ) 是带有参数的二项式变量的累积分布Np, withp= 1 -VARLEVEL。这三个区域是根据此累积概率定义的:

  • Green: F ( x | N , p ) 0.95

  • Yellow:0.95< F ( x | N , p ) 0.9999

  • 红色的:0.9999< F ( x | N , p )

The probability of a Type-I error, reported in the'typei'列,是 T y p e I = T y p e I ( x | N , p ) = 1 F ( X x | N , p )

如果模型正确,则这种概率对应于错误拒绝模型的概率。ProbabilityTypeI不要总结1,它们超过1,恰好有可能x失败。

The increase in scaling factor, reported in the'增加'列,总是0为了greenzone and always1为了redzone. For theyellowzone, it is an adjustment based on the relative difference between the assumed VaR confidence level (VARLEVEL)和观察到的置信度(x/N), whereN是观察的数量和xis the number of failures. To find the increase under the assumption of a normal distribution, compute the critical valuesZassumedzObserved

The increase to the baseline scaling factor is given by

I n c r e a s e = B a s e l i n e × ( z A s s u m e d z O b s e r v e d 1 )

with the restriction that the increase cannot be negative or greater than1。The baseline scaling factor in the Basel rules is 3.

Thetlfunction computes the scaling factor following this methodology, which is also described in the Basel document (see参考). Thetlfunction does not apply any ad-hoc adjustments.

参考

[1]巴塞尔银行监督委员会,使用“回测”的监管框架以及内部模型的市场风险资本需求。January, 1996,https://www.bis.org/publ/bcbs22.htm

Version History

Introduced in R2016b