| Contents | Index |
[prepData] = transprobprep(data)
[prepData] = transprobprep(data, Name,Value)
[prepData] = transprobprep(data) preprocesses credit ratings historical data (i.e., credit migration data) for the subsequent estimation of transition probabilities.
[prepData] = transprobprep(data, Name,Value) preprocesses credit ratings historical data (i.e., credit migration data) for the subsequent estimation of transition probabilities with additional options specified by one or more Name,Value pair arguments.
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.
Load input data from Data_TransProb.mat and display the first 10 rows. Here, the inputs are provided in string format.
load Data_TransProb
data(1:10,:)
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'
% Preprocess credit ratings data
prepData = transprobprep(data)
prepData =
idStart: [1506x1 double]
numericDates: [4315x1 double]
numericRatings: [4315x1 double]
ratingsLabels: {'AAA' 'AA' 'A' 'BBB' 'BB' 'B' 'CCC' 'D'}
% Estimate transition probabilities with default settings
transMat = transprob(prepData)
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.0000
% Estimate transition probabilities with 'cohort' algorithm
transMatCoh = transprob(prepData,'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.0000View 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 |