# delimit ;
* Exercise 10: classification of clients of a financial firm according
to risk tolerance;
use "C:\Users\AutoLogon\Desktop\clientrisk.dta", clear;
log using "C:\Users\AutoLogon\Desktop\exercise10.log", replace;
* First, we create our multinomial ordered variable;
generate riskprofile=0;
replace riskprofile=1 if conservador==1;
replace riskprofile=2 if moderado==1;
replace riskprofile=3 if agressivo==1;
* We start our descriptive statistics analysis by assessing the frequency distribution among the risk groups;
tabulate riskprofile;
* We can see that the majority of the clients is classified as moderate
investors.;
* Now, letÂ´s try to identify patterns according to the risk profile. To do that, we compute descriptive statistics by risk category using the
prefix "by". We need first to sort the variable riskprofile;
sort riskprofile;
by riskprofile: summarize derivatives fixedincome stocks cc_holdings;
* Clients with an aggressive profile tend to make more operations in the stock and derivative markets when compared to conservative and moderate ones. Clients in the moderate category have more fixed income products in their portfolio of investments.;
* Estimation of the multinomial ordered model.;
oprobit riskprofile derivatives fixedincome stocks cc_holdings;
* First of all, we should check if the model is well specified. The model is well specified if the confidence intervals of the cuts do not overlap. If there is overlap between the confidence intervals, we cannot assure (at a 95% confidence level) that the two cuts are distinct and therefore our model is not valid (i.e., the model is ill-specified).
In our case, the confidence intervals for cut1 and cut2 do not overlap. So our model is well specified and we can proceed with the analysis.
What to do if the intervals overlap? If there was an overlap, the model is ill-specified and we should reduce the number of categories until arrive in a number of categories where the invervals do not overlap.
Coefficient interpretation: we can only interpret the coefficient estimates for the extreme categories (in our case, riskprofile = 1 and riskprofile=3). The impact of a marginal variation in the explanatory variable on the probability of being classified as conservative should be interpreted with the opposite sign of the estimated coefficient. People that make a higher number of operations in the stock markets and in derivative markets have a lower probability of being classified as conservatives. On the other hand, the interpretation of the marginal impact of the explanatory variables on the highest category (in our case, category 3) follows the sign of the estimated coefficient: marginal increases in the number of operations in stock market or in derivative markets increases the probability of being an agressive investor.;
* In order to evaluate the magnitude of the marginal effects, we use the command margins;
margins, dydx(*) predict(outcome(1));
* We see that an additional operation in the derivative markets decreases the probability of being classified as conservative by 3.2 percentage points. Furthermore, an additional operation in the stock markets reduces the probability of being classified as conservative by 0.2 percentage points;
* To analyze other categories, we just need to specify the categorie we are interested in the outcome(.) option. For example, suppose we are interested in obtaining marginal effects for the moderate category;
margins, dydx(*) predict(outcome(2));
* We observe that one additional operation in derivative markets increases the probability of being classified as moderate by 0.96 percentage points. An additional operation in stock markets increases the probability by 0.07 percentage points.;
log close;