Hello all,
I have tried to develop something through SAS PROC IML in order to calculate a Credit Rating Transition Matrix for a specific sample, considering the cohort and hazard rate approaches, and also some confidence levels using bootstrap. This website (https://analyticsrusers.blog/2017/08/15/use-r-to-easily-estimate-migration-matrices-with-rtransprob-...) provides some specific examples regarding the "RTransprob" package which contains a set of functions used to automate commonly used methods to estimate migration matrices used in credit risk analysis. I'd like to do the same, however, through SAS instead of R. I have a SAS dataset containing the following attributes: CustomerId,Date,Rating,RatingNum.
I'm sending as an attached files:
a) Input_RatingTransitionMatrix(3).txt = Text file containing the data used for calculating the transition matrices
b) Output_RatingTransitionMatrix(1).xlsx = Excel file that illustrates the final results provided by the specific R package
I would be so grateful if you are able to send me a code developed in SAS in order to achieve the same/or similar results.
Thanks in advance.
Rgs,
Raphael
> I would be so grateful if you are able to send me a code developed in SAS in order to achieve the same/or similar results.
I suspect you will need to do some preliminary work on this problem before we will be able to offer help. Typically, the OP will post a program and ask questions about parts of the code that are confusing or not working. We can then offer advice, discuss strategies, and propose ways to modify your code.
Do you know how to write a transition matrix? If not, start with
https://blogs.sas.com/content/iml/2016/07/07/markov-transition-matrices-sasiml.html
and
https://blogs.sas.com/content/iml/2016/07/13/absorbing-markov-chains-in-sas.html
There are also papers about Markov transition matrices in SAS by searching the conference proceedings at
markov transition matrix iml site:lexjansen.com
This forum is for writing SAS/IML programs, so that is why I assumed you wanted to write an IML program. SAS has a lot of functionality for econometric, forecasting, and credit risk. I don't know all the offerings., but others who have backgrounds in forecasting might be able to point you to other SAS products.
I will move this thread to the Forecasting and Econometrics community. Hopefully someone there will know how to perform this functionality in SAS.
Hello @raphaelchaves ,
In general you get very good (high quality) code examples in this communities site (and certainly from Rick), but you have to give a bit of a lead. Especially when there are so much methods and approaches to achieve "the same".
It is also quite a complex thing (although that is relative of course). Correcting code is then easier than coughing it up from scratch (I do not know if the latter sentence is proper English 🙄).
I'm not in finance consulting anymore (I was a lot before 2010 for Basel II) but I'm as good as sure the SAS solutions for Risk Management and Risk and Finance Analytics have built-in credit migration transition matrices. Maybe you can contact your local SAS office to find out.
Also have a look at the SSM procedure (for State Space Models ) in SAS/ETS. I think it should be able to do what you're looking for.
Kind regards,
Koen
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.