I have a porfolio of mortgage loans where each loan has a number of attributes attr1, attr2, .., attrN.

I would like to analyze the portfolio credit risk concentration (see below) using these attributes, but instead of providing as input which attributes to use to calculate the percentages, I'm looking for an algorithm that will find these attributes for me.

So the input is the portfolio + a list of all the loan attributes, and the output is the list of attributes that comprise the largest concentration.

One way to achieve this is to calculate the concentration of all the attribute combinations, but that's overkilling. Is there a better way?


Portfolio credit risk concentration:

Let's say you have N loans. Each loan has three attributes related to the person that borrowed the money: (1) loan type, (2) Zip code, (3) Customer Segment.

Loan type values: Personal, Residential, Auto, etc. Customer segment values: Retail, Business, Corporate, etc.

Let's say that if you take Loan type = Personal and Customer segment = Retail, you get 80% of the loans. That's the concentration, and the number of attributes used was two.

What I'm looking for is an algorithm that will give me the largest concentration, without knowing beforehand which attributes and values to use. Note that in real scenarios you may have up to 100 attributes.

UPDATE 2 - Example

As mentioned above, there are loans with attributes. Each loan is a record in the data set, and each record has three attributes/fields: (1) loan type, (2) Zip code, (3) Customer Segment. Let us say that I have the following set of loans:

Loan #  Loan Type  Zip code  Customer Segment
1       Personal   12000     Retail   
2       Personal   12000     Retail 
3       Auto       13000     Retail
4       Auto       14000     Retail
5       Direct     12000     Business
6       Auto       13000     Retail   
7       Direct     12000     Corporate 
8       Material   14000     Corporate
9       Personal   13000     Retail
10      Material   13000     Business

Now, to calculate a concentration, I need to find loans that have the same attributes. For example, loan 1 and 2 attributes are Personal/12000/Retail. Since there are 10 loans, the two loans that I selected comprise 20% of the loans. Therefore, I can say that Personal/12000/Retail has a concentration of 20% of the loan portfolio.

I don't need to use all the attributes. For example, loans 3, 4 & 6 are Auto/Retail (omitting the zip code). Therefore, I can say that Auto/Retail has a concentration of 3/10 or 33.33%.

What I'm looking for is an algorithm that will give me the highest concentration in a set of records (loans in the example) and also that will find out automatically the attributes used in the concentration.

  • $\begingroup$ What is a "portfolio credit risk concentration"? Is it a number? $\endgroup$ – jbowman Oct 27 '18 at 17:30
  • $\begingroup$ See added update $\endgroup$ – ps0604 Oct 28 '18 at 15:00
  • $\begingroup$ "portfolio + a list of attributes?" So you have a dataset with something like "payed back loan/ did not pay back loan" and you want to find a good set of attributes that lets you predict this credit risk for future customers? $\endgroup$ – mlvalidated Nov 1 '18 at 11:45
  • $\begingroup$ No, I don't want to predict anything. The dataset consists of an amount (the amount owed by the client) and other attributes such as client code, expiration date, etc. The amount shouldn't be used to calculate the concentration. The transactions (such as customer payed back installment) are not considered in this exercise. $\endgroup$ – ps0604 Nov 1 '18 at 13:11
  • $\begingroup$ Why not use all attributes? $\endgroup$ – Jay Schyler Raadt Nov 1 '18 at 17:38

A structure coefficient is often used in canonical correlation analysis to describe relationships between synthetic variables and observed variables, but these structure coefficients can be used in multiple regression as well (Coureville & Thompson, 2001). The structure coefficient, $r_s$, is the ratio of the correlation coefficient, $r$, to the multiple correlation coefficient, $R$. Thus, squaring the numerator and denominator yields


which is the unique variance explained by a variable in a multiple regression model.

This concept is similar to commonality, which is used in all possible subsets (APS) regression (Kraha et al, 2012). By reviewing the structure coefficients and the commonalities, you can find which variables explain the most variance. Thus, you will be able to "find the largest concentration" of variance explained. See Nimon's yhat for doing APS and getting structure coefficients in R.

  • $\begingroup$ Sorry, it's difficult for me to apply your answer to my question. Can you provide an example? $\endgroup$ – ps0604 Nov 3 '18 at 22:37
  • 1
    $\begingroup$ Could you provide a reproducible example of your problem first? $\endgroup$ – Jay Schyler Raadt Nov 4 '18 at 11:30
  • $\begingroup$ Added an example $\endgroup$ – ps0604 Nov 8 '18 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.