Risk bands
Optimal score binning and homogeneous risk groups for operationalizing credit decisions.
From scores to policy
A credit score tells you how risky an entity is. Risk bands tell you what to do about it.
Risk bands (also known as homogeneous risk groups) are score bins where entities within each group behave similarly, while groups are clearly distinct from each other. Unlike arbitrary deciles or fixed ranges, optimal risk bands are statistically optimized using both the model score and observed outcomes.
The method works for any score that ranks: a 0–1000 credit score, a PD, or an Avra RFM score, which ranks records without being a calibrated probability. The workflow is the same in every case:
Why risk bands matter
| Use case | How risk bands help |
|---|---|
| Policy cutoffs | Set clear approve, review, and decline thresholds aligned to observed outcomes |
| Pricing tiers | Map bins directly to interest rate or limit brackets |
| Portfolio monitoring | Track bin migration over time as an early warning system |
| Model validation | Verify bins remain separated as new data arrives |
Creating optimal bins
Start from an out-of-time backtest: each account’s score on its date, and whether it then defaulted by your definition. Use an optimal binning algorithm, which maximizes separation between groups. The optbinning library provides a robust implementation:
import pandas as pd
from optbinning import OptimalBinning
# One row per account from an out-of-time backtest: the score it had on its
# date, and whether it then defaulted (1) or not (0), by your definition.
df = pd.read_parquet("backtest.parquet") # columns: score, defaulted
scores = df["score"].to_numpy()
defaults = df["defaulted"].to_numpy()
# Create optimal bins from score and outcome
optb = OptimalBinning(
name="avra_score",
dtype="numerical",
monotonic_trend="descending", # higher scores, lower default rates
max_n_bins=8,
min_bin_size=0.05, # every bin holds at least 5% of accounts
)
optb.fit(scores, defaults)
# Get bin boundaries and statistics
print(optb.splits)
binning_table = optb.binning_table.build()
print(binning_table) # count, defaults, default rate, WoE, and IV per bin
The monotonic trend keeps default rates falling as scores rise, so no band sits out of order, and the minimum bin size keeps enough volume in each band to support a policy decision.
Alternative approaches
| Method | Description |
|---|---|
| Chi-squared binning | Merge adjacent bins until chi-squared threshold is met |
| Weight of Evidence (WoE) | Optimize bins for maximum information value |
| Equal-frequency quantiles | Starting point before optimization |
| Business-driven | Manual boundaries based on policy requirements |
Mapping bands to decisions
Each band carries the default rate observed in the backtest. Cutoffs on that rate turn bands into actions, and the same bands can index your pricing tiers and limit brackets. Continuing the example:
import numpy as np
# Each account's band (0 holds the lowest scores), and that band's default rate
df["band"] = optb.transform(scores, metric="indices")
df["band_rate"] = optb.transform(scores, metric="event_rate")
# Illustrative cutoffs: set yours from your losses, margins, and appetite
df["action"] = np.select(
[df["band_rate"] <= 0.02, df["band_rate"] <= 0.06],
["approve", "review"],
default="decline",
)
print(df.groupby(["band", "action"]).size())
In production, apply the same split points to new scores with optb.transform, and keep the fitted binning with the model version it was built on. When you move to a new version, rebuild and revalidate the bands. See Model versioning.
Evaluating risk band quality
What you want to see
Track default rates per bin over time. In well-constructed risk bands, default rates are distinct between adjacent bins, and each bin’s default rate stays consistent month-over-month. The bands also have a balanced distribution, with reasonable volume in each bin to support policy decisions.
Warning signs
When two bins’ default rates cross over time, risk distinction is breaking down, and the model may need recalibration. Concentration is a problem too: if 80% of entities fall in 2-3 bins, setting policy cutoffs becomes difficult, so consider adjusting bin boundaries or reviewing score distribution. Drift, a systematic movement of default rates within bins, signals model degradation. Monitor for gradual shifts that compound over time.
Monitoring over time
Plot default rates per bin across cohorts. A cohort’s default rate is only known once its outcome window has closed, so leave out recent cohorts that haven’t had time to default:
import matplotlib.pyplot as plt
import pandas as pd
# One row per account: the month it was scored, its band index, and whether
# it defaulted within the outcome window. Only cohorts whose window has closed.
cohorts = pd.read_parquet("cohorts.parquet") # columns: cohort_month, band, defaulted
# Each line represents a score bin
# X-axis: time (cohort month)
# Y-axis: realized default rate
rates = cohorts.pivot_table(
index="cohort_month", columns="band", values="defaulted", aggfunc="mean"
)
ax = rates.plot(marker="o")
ax.set_xlabel("Cohort Month")
ax.set_ylabel("Default Rate")
ax.set_title("Risk band stability over time")
plt.show()
# Band 0 holds the lowest scores, so each month's rates should fall from band
# to band. Flag the months where two bands crossed.
crossed = ~rates.apply(lambda row: row.dropna().is_monotonic_decreasing, axis=1)
print(rates[crossed])
A healthy pattern shows parallel lines that maintain separation over time. A concerning one has lines that converge, cross, or show systematic drift.