turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- Base SAS Programming
- /
- Create probability default from raw data

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-03-2016 08:45 PM

Dear All,

As a begginer user to SAS, I was wondering if you could please help me in the following question.

I have a raw data of S&P rating for one year horizon(beginning rating and ending rating) for 15,085 companies. I was wondering how can I calculate the probability of default (PD) from this data and later on do some other procedure such as confidence interval for the probability of defaults in SAS?

I greatly appreciate any help and comment.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Samz1

12-04-2016 04:32 AM

Your question is vague. Can you expand on your question please? Are you aiming for a predictive model or empirical calculation?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

12-04-2016 10:32 AM

Hi Reeza thanks for replying back to my post,

my goal is to use non-parametric bootstrap to generate 95% confidence intervals for __default rates__ for __each rating category.__

First of all, I believe that I have to generate default rates in my raw data, but I am not sure that should I do this step in excel before importing to SAS or am I able to do it in SAS? In my raw data I have the following;

PID: different companies ID, Rating2015_B: rating at the beggining of 2015, Ratinh2015_E: rating at the end of 2015.

I was thinking to create a column Rating2016_D that is for rating at the end of 2015 for those that went to defaults in excel.

Secondly, how can I create a variable called probability of defaults (PD) in SAS?

I know If my data would be smaller I could use (DATA, input, datalines) procedure but since my data has 15,085 observations I don't think that procedure is appropriate.

I would greatly appreciate any help and advice.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Samz1

12-04-2016 02:03 PM

The more lines the better to bring it into SAS.

Start off off with a PROC IMPORT to read in your data.

Then calculate your default variable using a data step.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Samz1

12-05-2016 10:31 AM

Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.

To provide example data follow instruction here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... to create data step code that you can post or attach as a text file. We can run the posted code to generate data to test code with and avoid multiple questions about things like variable types.