Sub topic 11
Testing whether the model works: calibration and back-testing
This chapter assumes you can read the weighted scorecard and override code from earlier chapters, and that you know what Low, Medium and High ratings control. Here you check whether those ratings are any good.
What validation asks
A scorecard can be consistent and still wrong. Validation asks three questions:
- Do the weights and thresholds put customers in sensible bands?
- Do higher bands actually contain more suspicious activity?
- Does a human reviewer agree with the rating when they re-do it from scratch?
Each question has its own test.
Calibration
Calibration means setting weights and band thresholds so the output matches your risk appetite and your customer base. Start with the distribution. Count how many customers land in each band.
- If 70% of customers are High, the model cannot separate risk and the team cannot review that many files.
- If 99% are Low, the thresholds are probably too lenient.
- If one factor alone decides the band, its weight is too large or its scale is too wide.
Test sensitivity too. Move one factor score by a point and see how many customers change band. Many customers sitting just below a threshold is a warning sign.
Back-testing
Back-testing compares past ratings with what happened afterward. Typical outcome measures are suspicious activity reports (SARs) filed, confirmed sanctions hits, and relationships exited for financial crime reasons. The basic expectation is that the rate of these outcomes rises from Low to Medium to High.
from collections import Counter
# (rating at onboarding, suspicious activity report filed within 12 months)
outcomes = (
[("Low", False)] * 396 + [("Low", True)] * 4
+ [("Medium", False)] * 288 + [("Medium", True)] * 12
+ [("High", False)] * 85 + [("High", True)] * 15
)
totals = Counter(rating for rating, _ in outcomes)
hits = Counter(rating for rating, sar in outcomes if sar)
previous = 0.0
for rating in ("Low", "Medium", "High"):
rate = hits[rating] / totals[rating]
print(f"{rating}: {totals[rating]} customers, {rate:.1%} with SAR")
assert rate >= previous, "ratings do not rank risk in order"
previous = rateThe output is 1.0% for Low, 4.0% for Medium and 15.0% for High. The bands rank risk in the right order. The assertion fails if a band ever ranks below the one under it.
Sampling rating outcomes
Back-testing needs outcome data that may be sparse. Sampling fills the gap. Draw a random sample from each band, plus extra cases from overrides and from customers near thresholds. An independent reviewer re-rates each case from the source documents. Then measure the agreement rate and read the disagreements, because they often point to bad data rather than a bad model.
Common errors
- Circular evidence. High-rated customers get closer monitoring, so they generate more alerts and SARs. Part of the High-band result comes from the extra scrutiny, not from the customer's true risk. Compare with a sample of lower-rated customers that was reviewed in the same way.
- Tiny samples. A band with two SARs says little. Report counts next to rates, and widen the time window if needed.
- Tuning on the test. If you adjust thresholds until the back-test looks good, you need fresh data to confirm the result.
- Ignoring false negatives. A SAR on a Low customer is the most useful case in the data. Review each one to find which factor missed the risk.
- No record of changes. Every tuning decision should be logged with its reason and approval, as covered in the governance chapter.
Exercise
A back-test shows these SAR rates in the next 12 months: Low 1.0%, Medium 3.0%, High 2.5%. Name two possible explanations and one next step.
Show answer
Possible explanations: the High band is over-inclusive, for example a heavy factor pushes low-risk customers into High, or the band sizes are small so the difference is noise. The High band may also include customers whose alerts are closed without a SAR because of strong controls. Next step: review the High-band customers who had no SAR, find which factors put them there, and recheck the weights and thresholds, then confirm with fresh data.