%% Create a Transition Matrix Using a Cell Array for Historical Data of Credit Ratings
% Using a MATLAB® table containing the historical credit rating cell array input data (dataCellFormat) from Data_TransProb.mat, estimate the transition probabilities with default settings.

load Data_TransProb
transMat = transprob(dataCellFormat)

%
% Using the historical credit rating cell array input data (dataCellFormat), compute the transition matrix using the cohort algorithm:

%Estimate transition probabilities with 'cohort' algorithm
transMatCoh = transprob(dataCellFormat,'algorithm','cohort')

% Copyright 2012 The MathWorks, Inc.