主要内容

pof

价值风险(VAR)进行回测的故障比例测试

Description

example

测试结果= pof(VBT)为价值风险(VAR)进行回测的失败比例(POF)测试。

example

测试结果= pof(VBT,Name,Value)adds an optional name-value pair argument for静态.

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

生成pof测试结果。

测试结果= pof(vbt,'TestLevel',0.99)
testResults =1×9表PortfolioID VaRID VaRLevel POF LRatioPOF PValuePOF Observations Failures TestLevel ___________ _____ ________ ______ _________ _________ ____________ ________ _________ "Portfolio" "VaR" 0.95 accept 0.46147 0.49694 1043 57 0.99

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]

生成poftest results using the静态optional input.

测试结果= pof(vbt,'TestLevel',0.90)
testResults =6×9 tablePortfolioID VaRID VaRLevel POF LRatioPOF PValuePOF Observations Failures TestLevel ___________ ______________ ________ ______ _________ _________ ____________ ________ _________ "Equity" "Normal95" 0.95 accept 0.46147 0.49694 1043 57 0.9 "Equity" "Normal99" 0.99 reject 3.5118 0.060933 1043 17 0.9 "Equity" "Historical95"0.95 accept 0.91023 0.34005 1043 59 0.9 "Equity" "Historical99" 0.99 accept 0.22768 0.63325 1043 12 0.9 "Equity" "EWMA95" 0.95 accept 0.91023 0.34005 1043 59 0.9 "Equity" "EWMA99" 0.99 reject 9.8298 0.0017171 1043 22 0.9

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.

Name-Value Arguments

将可选的参数对Name1=Value1,...,NameN=ValueN, whereNameis the argument name and价值是相应的值。名称值参数必须在其他参数之后出现,但是对的顺序并不重要。

Before R2021a, use commas to separate each name and value, and encloseNamein quotes.

例子:测试结果= pof(vbt,'TestLevel',0.99)

Test confidence level, specified as the comma-separated pair consisting of'TestLevel'和a numeric between01.

Data Types:double

Output Arguments

collapse all

poftest results, returned as a table where the rows correspond to all combinations of portfolio ID, VaR ID, and VaR level to be tested. The columns correspond to the following information:

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

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

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

  • 'pof'— Categorical array with the categoriesaccept拒绝that indicate the result of thepoftest

  • 'lratiopof'— Likelihood ratio of thepoftest

  • 'pvaluepof'- p值poftest

  • 'Observations'— Number of observations

  • 'Failures'- 失败数量

  • 'TestLevel'— Test confidence level

Note

Forpof测试结果,术语accept拒绝are used for convenience, technically apof测试不接受模型。相反,测试未能拒绝它。

More About

collapse all

Proportion of Failures (POF) Test

Thepoffunction performs Kupiec's proportion of failures test.

The POF test is a likelihood ratio test proposed by Kupiec (1995) to assess if the proportion of failures (number of failures divided by number of observations) is consistent with the VaR confidence level.

算法

可能性比(测试统计量)pof测试由

L R a t i o P O F = 2 log ( ( 1 p V a R ) N x p V a R x ( 1 x N ) N x ( x N ) x ) = 2 [ ( N x ) log ( N ( 1 p V a R ) N x ) + x log ( N p V a R x ) ]

whereN是观察的数量,x是失败的数量,并且pVaR= 1 -VARLEVEL. This test statistic is asymptotically distributed as a chi-square distribution with 1 degree of freedom. By the properties of the logarithm,

L R a t i o P O F = 2 N log ( 1 p V a r ) if x = 0。

L R a t i o P O F = 2 N log ( p V a r ) if x = N .

Thep- POF测试的价值是具有1度自由度的卡方分布超过似然比的概率LRatioPOF

P V a l u e P O F = 1 F ( L R a t i o P O F )

whereFis the cumulative distribution of a chi-square variable with 1 degree of freedom.

测试的结果是接受

P V a l u e P O F < F ( T e s t L e v e l )

和拒绝otherwise, whereFis the cumulative distribution of a chi-square variable with 1 degree of freedom.

参考

[1] Kupiec, P. "Techniques for Verifying the Accuracy of Risk Management Models."Journal of Derivatives.卷。3,1995,第73 - 84页。

Version History

Introduced in R2016b