Sub topic 3
The KYC data that feeds a risk score
This chapter assumes you know what KYC (know your customer) and customer due diligence mean at a high level, and that you can read simple Python. A risk score can only be as good as the data behind it. Here you will see which KYC data fields feed each risk factor, which data problems distort scores, and how to make a scorer handle missing data safely.
From KYC fields to risk factors
The earlier chapter on factor categories named four groups: customer, geography, product and channel. Each group draws on specific data collected at onboarding or later.
| Factor | Typical KYC inputs | Example risk signal |
|---|---|---|
| Customer | Legal form, occupation, industry, ownership structure, source of funds | Cash-intensive business, layered ownership |
| Geography | Country of residence, incorporation, nationality, countries of operation | Jurisdiction on a high-risk list |
| Product | Account type, expected volumes and activity | Private banking, trade finance |
| Channel | Onboarding method, use of intermediaries | Non-face-to-face, introduced by a third party |
Some inputs come from the customer, such as occupation or expected activity. Others come from your own systems, such as the product opened. Others come from outside sources, such as company registries, sanctions lists and screening vendors. Each source has a different reliability, and your documentation should record which one fed each score.
Data quality problems that distort scores
Four problems appear most often.
- Missing values. A blank country field is not the same as a low-risk country.
- Stale values. An address or ownership record collected five years ago may no longer be true.
- Inconsistent formats. "UK", "United Kingdom" and "GB" are the same country, but a lookup table may recognise only one.
- Unverified self-declarations. Expected monthly turnover entered by the customer is a claim, not a fact, until you compare it with actual activity.
Any of these can lower a customer's score by accident. A scorer that silently treats a missing value as zero risk rewards the customers who give you the least information.
Handling missing data in code
Two common policies exist. The first is to assign a conservative default, often the highest score, so missing data pushes the rating up. The second is to refuse to rate the customer and send the record back for data remediation. The code below uses both: a missing factor gets a conservative score of 5, and the result lists which factors were defaulted so a reviewer can see it.
WEIGHTS = {"customer": 0.30, "geography": 0.30, "product": 0.25, "channel": 0.15}
MISSING_SCORE = 5 # conservative default: treat unknown as highest risk
COUNTRY_ALIASES = {"UK": "GB", "UNITED KINGDOM": "GB", "GB": "GB"}
def normalise_country(value):
"""Return an ISO-style code, or None if the value is blank or unknown."""
if not value:
return None
return COUNTRY_ALIASES.get(value.strip().upper())
def score_with_gaps(factors):
"""factors maps factor names to a score from 1 to 5, or None if unknown."""
defaulted = []
total = 0.0
for name, weight in WEIGHTS.items():
value = factors.get(name)
if value is None:
value = MISSING_SCORE
defaulted.append(name)
total += weight * value
return round(total, 2), defaulted
print(normalise_country(" uk ")) # GB
print(normalise_country("")) # None
complete = {"customer": 2, "geography": 4, "product": 3, "channel": 2}
partial = {"customer": 2, "geography": None, "product": 3, "channel": 2}
print(score_with_gaps(complete)) # (2.85, [])
print(score_with_gaps(partial)) # (2.55, ['geography'])The partial record scores 2.55 even with a conservative default for geography. That is lower than the complete record's 2.85 only because the complete record had a geography score of 4 and the default is applied as 5 on a different weight mix. The point is that the output is a sentence you can audit: "this score rests on a default for geography". Without that list, nobody can tell a measured score from a guessed one.
A data flow to keep in mind
Practical checks
- Keep a data dictionary that names each input, its source and its owner.
- Normalise values before lookup, and treat unmatched values as missing, not as low risk.
- Record which inputs were defaulted on every rating.
- Report missing-data rates by field. A sudden jump often means a broken feed.
Exercise
A scorer reads the country field and finds the value "Untied Kingdom" (a typo). The lookup table has no match, and the code returns a geography score of 1. What is wrong with this behaviour, and what should happen instead?
Show answer
An unmatched value was treated as low risk, so a data error lowered the score. The unmatched value should be treated as missing. It should receive the conservative default or be sent for remediation, and the record should be flagged so a reviewer can fix the typo.