| Contents | Index |
[transMat, sampleTotals, idTotals] = transprob(data)
[transMat, sampleTotals, idTotals] = transprob(data,
Name,
Value)
[transMat, sampleTotals, idTotals] = transprob(data) constructs a transition matrix from historical data of credit ratings.
[transMat, sampleTotals, idTotals] = transprob(data, Name, Value) constructs a transition matrix from historical data of credit ratings with additional options specified by one or more Name, Value pair arguments.
data |
Using transprob to estimate transition probabilities given credit ratings historical data (i.e. credit migration data), the data input can be either of the following:
|
Specify optional comma-separated pairs of Name,Value arguments, where Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
The cohort algorithm estimates the transition probabilities based on a sequence of snapshots of credit ratings at regularly spaced points in time. If the credit rating of a company changes twice between two snapshot dates, the intermediate rating is overlooked and only the initial and final ratings influence the estimates.
Unlike the cohort method, the duration algorithm estimates the transition probabilities based on the full credit ratings history, looking at the exact dates on which the credit rating migrations occur. There is no concept of snapshots in this method, and all credit rating migrations influence the estimates, even when a company's rating changes twice within a short time.
Using historical credit rating input data from Data_TransProb.mat display the first ten rows and compute the transition matrix:
load Data_TransProb
data(1:10,:)
% Estimate transition probabilities with default settings
transMat = transprob(data)
ans =
'00010283' '10-Nov-1984' 'CCC'
'00010283' '12-May-1986' 'B'
'00010283' '29-Jun-1988' 'CCC'
'00010283' '12-Dec-1991' 'D'
'00013326' '09-Feb-1985' 'A'
'00013326' '24-Feb-1994' 'AA'
'00013326' '10-Nov-2000' 'BBB'
'00014413' '23-Dec-1982' 'B'
'00014413' '20-Apr-1988' 'BB'
'00014413' '16-Jan-1998' 'B'
transMat =
93.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.0000Using historical credit rating input data from Data_TransProb.mat, compute the transition matrix using the cohort algorithm:
load Data_TransProb
%Estimate transition probabilities with 'cohort' algorithm
transMatCoh = transprob(data,'algorithm','cohort')
transMatCoh =
93.1345 5.9335 0.7456 0.1553 0.0311 0 0 0
1.7359 92.9198 4.5446 0.6046 0.1560 0 0 0.0390
0.1268 2.9716 91.9913 4.3124 0.4711 0.0544 0 0.0725
0.0210 0.3785 5.0683 89.7792 4.0379 0.4627 0.0421 0.2103
0.0221 0.1105 0.6851 6.2320 88.3757 3.6464 0.2873 0.6409
0 0 0.0761 0.7230 7.9909 86.1872 2.7397 2.2831
0 0 0 0.3094 1.8561 4.5630 80.8971 12.3743
0 0 0 0 0 0 0 100.0000Using historical credit rating data with ratings investment grade ('IG'), speculative grade ('SG'), and default ('D'), from Data_TransProb.mat display the first ten rows and compute the transition matrix:
load Data_TransProb
dataIGSG(1:10,:)
transMatIGSG = transprob(dataIGSG,'labels',{'IG','SG','D'})
ans =
'00011253' '04-Apr-1983' 'IG'
'00012751' '17-Feb-1985' 'SG'
'00012751' '19-May-1986' 'D'
'00014690' '17-Jan-1983' 'IG'
'00012144' '21-Nov-1984' 'IG'
'00012144' '25-Mar-1992' 'SG'
'00012144' '07-May-1994' 'IG'
'00012144' '23-Jan-2000' 'SG'
'00012144' '20-Aug-2001' 'IG'
'00012937' '07-Feb-1984' 'IG'
transMatIGSG =
98.6719 1.2020 0.1261
3.5781 93.3318 3.0901
0 0 100.0000
Using historical credit rating data with numeric ratings for investment grade (1), speculative grade (2), and default (3), from Data_TransProb.mat display the first ten rows and compute the transition matrix:
load Data_TransProb
dataIGSGnum(1:10,:)
transMatIGSGnum = transprob(dataIGSGnum,'labels',{1,2,3})
ans =
'00011253' '04-Apr-1983' [1]
'00012751' '17-Feb-1985' [2]
'00012751' '19-May-1986' [3]
'00014690' '17-Jan-1983' [1]
'00012144' '21-Nov-1984' [1]
'00012144' '25-Mar-1992' [2]
'00012144' '07-May-1994' [1]
'00012144' '23-Jan-2000' [2]
'00012144' '20-Aug-2001' [1]
'00012937' '07-Feb-1984' [1]
transMatIGSGnum =
98.6719 1.2020 0.1261
3.5781 93.3318 3.0901
0 0 100.0000The algorithm first determines a sequence t0,...,tK of snapshot dates. The elapsed time, in years, between two consecutive snapshot dates tk-1 and tk is equal to 1 / ns, where ns is the number of snapshots per year. These K +1 dates determine K transition periods.
The algorithm computes
, the number of
transition periods in which obligor n starts at
rating i. These are added up over all obligors
to get Ni, the number of
obligors in the sample that start a period at rating i.
The number periods in which obligor n starts at
rating i and ends at rating j,
or migrates from i to j, denoted
by
, is also computed. These are
also added up to get
, the total number
of migrations from i to j in
the sample.
The estimate of the transition probability from i to j in
one period, denoted by
, is given by:
![]()
These probabilities are arranged in a one-period transition matrix P0, where the i,j entry in P0 is Pij.
If the number of snapshots per year ns is 4 (quarterly snapshots), the probabilities in P0 are 3-month (or 0.25-year) transition probabilities. You may, however, be interested in 1-year or 2-year transition probabilities. The latter time interval is called the transition interval, Δt , and it is used to convert P0 into the final transition matrix, P, according to the formula:
![]()
For example, if ns = 4 and Δt = 2, P contains the 2-year transition probabilities estimated from quarterly snapshots.
Note For the cohort algorithm, optional output arguments idTotals and sampleTotals from transprob contain the following information:
For efficiency, the vectors and matrices in idTotals are stored as sparse arrays. |
The algorithm computes
,
the total time that obligor n spends in rating i within
the estimation time window. These quantities are added up over all
obligors to get
, the total time
spent in rating i, collectively, by all obligors
in the sample. The algorithm also computes
, the number times that obligor n migrates
from rating i to rating j, with i not
equal to j, within the estimation time window.
And it also adds them up to get
, the total number
of migrations, by all obligors in the sample, from the rating i to j,
with i not equal to j.
To estimate the transition probabilities, the duration algorithm
first needs to compute a generator matrix
. Each off-diagonal entry of
this matrix is an estimate of the transition rate out of rating i into
rating j, and is given by:
![]()
The diagonal entries are computed as:
![]()
With the generator matrix and the transition interval Δt (e.g.,
Δt = 2 corresponds to
2-year transition probabilities), the transition matrix is obtained
as
, where exp denotes
matrix exponentiation (expm in
MATLAB).
Note For the duration algorithm, optional output arguments idTotals and sampleTotals from transprob contain the following information:
For efficiency, the vectors and matrices in idTotals are stored as sparse arrays. |
Hanson, S., T. Schuermann, "Confidence Intervals for Probabilities of Default," Journal of Banking & Finance, Elsevier, vol. 30(8), pages 2281-2301, August 2006.
Löffler, G., P. N. Posch, Credit Risk Modeling Using Excel and VBA, West Sussex, England: Wiley Finance, 2007.
Schuermann, T., "Credit Migration Matrices," in E. Melnick, B. Everitt (eds.), Encyclopedia of Quantitative Risk Analysis and Assessment, Wiley, 2008.
transprobbytotals | transprobprep
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |