building the scorecard…

Quantum · project 03 · credit risk

Turning a loan application into points

A credit scorecard is the oldest working model in banking: slice every question on the application form into bins, weigh each bin by how much it separates the people who repay from the people who don't, and add up the points. This page builds one end to end on 1,000 real German loan applications — and then tries hard to prove it doesn't work.

01The book

1,000 applications, and a cost of being wrong that isn't symmetric

Every scorecard starts with a portfolio whose outcome is already known. This one is the Statlog German Credit file: real applications, each labelled good (repaid) or bad (defaulted). The split is what makes the problem interesting — and so is the dataset's own cost matrix.

The asymmetry that drives everything Lending to someone who defaults costs five times what turning away a good customer costs. That single ratio, not accuracy, decides where the approval line ends up — and it is why a model with a great AUC can still lose money at the wrong cutoff.

02Coarse classing

Every answer becomes a bin, every bin becomes a weight

Raw answers are useless to a linear model: "purpose = radio/TV" isn't a number, and "duration = 47 months" isn't linear in risk. So each characteristic is coarse-classed into a handful of bins, and each bin is replaced by its Weight of Evidence:

WOE = ln( % of all goods in this bin ÷ % of all bads in this bin )

Positive WOE means the bin is safer than the book average, negative means riskier. Numeric characteristics are binned so the bad rate moves in one direction only — a scorecard that says risk rises, then falls, then rises again with loan size is one no credit officer will sign.

03Information Value

Which questions on the form are actually worth asking

Summing a characteristic's bins into one number gives its Information Value — how much the whole question separates good from bad. The industry rule of thumb: under 0.02 is noise, 0.1–0.3 is a useful predictor, and above 0.5 you should go and check the data isn't leaking the answer.

Two characteristics are excluded on purpose

04The model

Logistic regression, forward stepwise, and a sign rule

The WOE-transformed characteristics go into a logistic regression on the probability of going bad. Variables enter one at a time, keep only if they stay significant, and must carry a negative coefficient: with this WOE convention, safer evidence has to push the score up. A positive coefficient means the multivariate fit has inverted the characteristic's meaning, and it is thrown out no matter how significant it is.

05The scorecard

From log-odds to points a branch can add up by hand

The regression outputs log-odds. A scorecard outputs points, calibrated so that a fixed number of points always means the same thing: here points doubles the odds of repaying, and points is defined as odds of good to one bad.

Every bin's points come out of the same identity, so the characteristics simply add up: points = −(β·WOE + α/n) × factor + offset/n.

06Underwriting

Score an applicant

This is what the model is for. Fill in an application and the scorecard adds it up exactly the way the printed table above says it will — no hidden layer, no black box, and every point traceable to one answer.

Application

Presets load a real record from the holdout sample.

07Validation

Now try to prove it doesn't work

Thirty percent of the applications were held out before anything was binned. Everything below is measured on that holdout — and, because 700 training rows is a small book, also across 25 resamples that rebuild the entire pipeline from scratch each time.

Score distributions on the holdout

The gap between these two curves is the whole product.

Calibration by score band

Discrimination ranks people; calibration says whether the predicted default rate is the truth. Pricing needs both.

Challengers

A scorecard is chosen for interpretability. The fair question is what that choice costs against models with no such constraint.

08The cutoff

Where to draw the line, and what it costs to draw it wrong

A score is not a decision. The decision is a cutoff, and under a 5:1 cost matrix it sits far higher than intuition suggests. Drag the line and watch the trade: approve more, earn more volume, buy more defaults.

09Fairness

Not using an attribute is not the same as not acting on it

Sex and nationality never enter the model. That is necessary and it is not sufficient: other characteristics can proxy for them, and the only way to know is to measure outcomes for the groups you refused to score. The classic test is the four-fifths rule — if one group's approval rate falls below 80% of another's, that is an adverse-impact flag worth explaining.