Credit Risk can be defined as the risk of bankruptcy/financial distress where debtors cannot pay what they owe. This risk is constant and unrelenting and companies should endeavour to ascribe accurate measures of potential default including in circumstances where credit is advanced in the form of goods being sold without receiving immediate payment. Credit risk measurement is important for companies making decisions regarding where, when and who to lend to and to determine what risks are being undertaken? Credit risk is also important for financial institutions where liquidity is generally supplied to keep trade flowing. Altman Z scores were an early form of systematised calibration of risk factors. Altman (1968) developed one of the earlier forms of the following scoring system and today many companies focus on how
In following series of videos I follow Loeffler and Posch's text where tune the appropriate weights for Altman Z above using OLS and Logit regression. See R code below.
# Code from Probit and Logit Models in R# using Loeffler and Posch#mydata<- read.csv("CreditRiskf.csv")attach(mydata)# Define variablesY <- cbind(Default)X <- cbind(WC.TA, RE.TA, EBIT.TA, ME.TL, S.TA)# Descriptive statisticssummary(Y)summary(X)table(Y)table(Y)/sum(table(Y))# Regression coefficientsolsreg <- lm(Y ~ X)summary(olsreg)# Logit model coefficientslogit<- glm(Y ~ X, family=binomial (link = "logit"))summary(logit) # Logit model odds ratiosexp(logit$coefficients)# Probit model coefficientsprobit<- glm(Y ~ X, family=binomial (link="probit"))summary(probit)# Regression marginal effectscoef(olsreg)# Logit model average marginal effectsLogitScalar <- mean(dlogis(predict(logit, type = "link")))LogitScalar * coef(logit)# Probit model average marginal effectsProbitScalar <- mean(dnorm(predict(probit, type = "link")))ProbitScalar * coef(probit)# Regression predicted probabilitiespolsreg<- predict(olsreg)summary(polsreg)# Logit model predicted probabilitiesplogit<- predict(logit, type="response")summary(plogit)# Probit model predicted probabilitiespprobit<- predict(probit, type="response")summary(pprobit)# Percent correctly predicted valuestable(true = Y, pred = round(fitted(probit)))table(true = Y, pred = round(fitted(logit))) # McFadden's Pseudo R-squaredprobit0<-update(probit, formula= Y ~ 1)McFadden<- 1-as.vector(logLik(probit)/logLik(probit0))McFadden