Main Content

Transprobgrouptals

Aggregate credit ratings information into fewer rating categories

description

例子

总计= transprobgrouptals(到tals,,,,groupingEdgesaggregates the credit ratings information stored in the到tals输入分为更少的等级类别,这些类别由groupingEdgesargument.

Examples

collapse all

Use historical credit rating input data fromdata_transprob。mat。Load input data from filedata_transprob。mat

加载data_transprob% Call TRANSPROB with two output arguments[transMat, sampleTotals] = transprob(data); transMat
transmat =8×893.1170 5.8428 0.8232 0.1763 0.0376 0.0012 0.0001 0.0017 1.6166 93.1518 4.3632 0.6602 0.1626 0.0055 0.0004 0.0396 0.1237 2.9003 92.2197 4.0756 0.5365 0.0661 0.0028 0.0753 0.0236 0.2312 5.0059 90.1846 3.7979 0.4733 0.0642 0.2193 0.0216 0.1134 0.6357 5.7960 88.9866 3.4497 0.2919 0.7050 0.0010 0.0062 0.1081 0.8697 7.3366 86.7215 2.5169 2.4399 0.0002 0.0011 0.0120 0.2582 1.4294 4.2898 81.2927 12.7167 0 0 0 0 0 0 0 100.0000

分为投资等级(评分1-4)和投机等级(评分5-7);注意,默认值是最后一个评分(编号8)。

边缘= [4 7 8];SampleTotalSgrp = Transprobgrouptals(SampleTotals,Edges);投资等级 /投机等级的过渡矩阵%transMatIGSG = transprobbytotals(sampleTotalsGrp)
transMatIGSG =3×398.5336 1.3608 0.1056 3.9155 92.9692 3.1153 0 0 100.0000

在投资等级和投机级级别获得1年,2年,3年,4年和5年违约概率。

defprob =zeros(2,5);为了t = 1:5 transMatTemp = transprobbytotals(sampleTotalsGrp,“透射互中”,,,,t); DefProb(:,t) = transMatTemp(1:2,3);结尾defProb
defprob =2×50.1056 0.2521 0.4359 0.6537 0.9027 3.1153 6.0157 8.7179 11.2373 13.5881

Input Arguments

collapse all

Total transitions observed, specified as a structure, or a struct array of length nTotals, with fields:

  • ptaltalsvec- 大小的稀疏向量1-by-n评分1

  • 总计- 大小的稀疏矩阵n评分1-by-n评分2n评分1n评分2

  • algorithm-A character vector with values'期间'or'cohort'

为了'期间'algorithm,总计((一世,,,,j)contains the total transitions observed out of rating一世评级j(所有的对角元素都是0)的总时间spent on rating一世一世s stored inptaltalsvec((一世)。For example, you have three rating categories, Investment Grade (IG),,,,Speculative Grade (SG)和默认(d),以及以下信息:

Total time spent IG SG D in rating: 4859.09 1503.36 1162.05 Transitions IG SG D out of (row) IG 0 89 7 into (column): SG 202 0 32 D 0 0 0
这n:
到tals.totalsVec = [4859.09 1503.36 1162.05] totals.totalsMat = [ 0 89 7 202 0 32 0 0 0] totals.algorithm = 'duration'

为了'cohort'algorithm,总计((一世,,,,j)contains the total transitions observed from rating一世评级j,,,,andptaltalsvec((一世)是评级的最初计数一世。For example, given the following information:

评级中的初始计数Ig SG D:4808 1572 1145从(ROW)IG 4721 80 7到(列)到(列):SG 193 1347 32 D 0 0 0 1145
这n:

totals.totalsvec = [4808 1572 1145] totals.totalsmat = [4721 80 7 193 1347 32 0 0 0 1145 Totals.algorithM ='cohort'

Common totals structures are the optional output arguments fromtransprob

  • sampleTotals- 一个汇总整个数据集的总计信息的单个结构。

  • 差不多-A struct array with the totals information at the ID level.

数据类型:struct|structure

将信用评级分为类别的指标,指定为数字阵列。

This table illustrates how to group a list of whole ratings into investment grade (IG)and speculative grade (SG)类别。原始列表中有八个评分。评分14IG,评分57SG,,,,and rating8一世s a category of its own. In this example, the array of grouping edges is[4 7 8]

原始评分:“ AAA”'aa''a'''bbb'|'bb''b''ccc'|'D'||相对顺序:(1)(2)(3)(4)|(5)(6)(7)|(8)||分组评分:'ig'|'SG'| 'D' | | Grouping edges: (4) | (7) | (8)

In general, ifgroupingEdges拥有kelementsedge1<edge2<...<edgek,评分1edge1(包含)分类为第一类,评分edge1+1edge2一世nthe second category, and so forth.

关于最后一个元素,edgek

  • Ifn评分1equalsn评分2, 然后edgekmust equaln评分1。This leads tokgroups, andn评分组1=nRATINGSGROUPED2=k

  • Ifn评分1<n评分2, 然后either:

    • edgekequalsn评分1,,,,一世nwhich case ratingsedgek+1,,,,。。。,,,,n评分2是treated as categories of their own. This results ink+((n评分2-edgek)组,与n评分组1=kandnRATINGSGROUPED2=k+((n评分2-edgek); or

    • edgekequalsn评分2,在这种情况下,必须有一个j边缘元素,edgej,,,,such thatedgejequalsn评分1。This leads tokgroups, andn评分组1=jandnRATINGSGROUPED2=k

数据类型:double

输出参数

collapse all

Aggregated information by categories, returned as a structure, or a struct array of lengthnTotals,,,,和fields:

  • ptaltalsvec- 大小的向量1-by-n评分组1

  • 总计- 大小的矩阵n评分组1-by-nRATINGSGROUPED2

  • algorithm- 角色向量,'期间'or'cohort'

n评分组1andnRATINGSGROUPED2是defined in the description ofgroupingEdges。每个结构都根据类别包含汇总信息,该信息基于相应结构中提供的信息到tals,,,,according to the grouping of ratings defined bygroupingEdgesand consistent with thealgorithm选择。

按照描述中的示例到tals输入,假设IGandSG被分成一个ND(未默认)类别,使用边缘[2 3]。为了'cohort'algorithm, the output is:

totalsGrouped.totalsVec = [6380 1145] totalsgrouped.totalsmat = [6341 39 0 1145] tostalsGrouped.algorithm ='cohort'
and for the'期间'algorithm:
总计。ptaltalsvec=[6362.45 1162.05] totalsGrouped.totalsMat = [0 39 0 0] totalsGrouped.algorithm = 'duration'

更多关于

collapse all

Cohort Estimation

队列algorithm estimates the transition probabilities based on a sequence of snapshots of credit ratings at regularly spaced points in time.

如果公司的信用等级在两个快照日期之间发生了两次变化,则中间评级被忽略了,只有初始和最终评级会影响估计值。有关更多信息,请参见“算法”部分transprob

duration Estimation

Unlike the队列algorithm, the期间algorithm estimates the transition probabilities based on the full credit ratings history, looking at the exact dates on which the credit rating migrations occur.

这种方法中没有快照的概念,即使公司的评级在短时间内两次变化,所有信用评级迁移也会影响估计。有关更多信息,请参见“算法”部分transprob

References

[1] Hanson,S.,T。Schuermann。“违约概率的置信区间。”银行与金融杂志。Vol. 30(8), Elsevier, August 2006, pp. 2281–2301.

[2] Löffler, G., P. N. Posch.使用Excel和VBA进行信用风险建模。英格兰西萨塞克斯郡:威利金融,2007年。

[3] Schuermann,T。“信用迁移矩阵”。在E. Melnick,B。Everitt(编辑)中,定量风险分析和评估百科全书。威利,2008年。

版本历史记录

Introduced in R2011b