Sub topic 4
Turning each factor into a score
This chapter assumes you know what the four factor categories are (customer, geography, product, channel). It also assumes you have a high-level grasp of KYC and can read simple Python. Here you will see how to turn raw customer facts into comparable factor scores. The next chapter covers weighting and combining them.
Why a common scale is needed
Raw KYC data comes in different forms. A country is a name. A product is a type. A customer's occupation is free text. A model cannot add these together. Each factor must first be converted to a score on the same scale.
The scale used in this tutorial runs from 1 (low risk) to 5 (high risk). Five levels are common, but three-level scales also exist. A wider scale separates customers more finely. A narrower scale is easier to apply consistently.
Mapping values to scores
The usual method is a lookup table. A written policy assigns each possible value of a factor to a score. Each score has a short rationale that a reviewer can read.
| Factor | Customer value | Score | Rationale |
|---|---|---|---|
| Customer | Salaried employee, verified income | 1 | Transparent source of funds |
| Customer | Cash-intensive small business | 4 | Cash makes the source of funds harder to verify |
| Geography | Domestic residence and activity | 1 | Well-understood local risks |
| Geography | Country on a high-risk list | 5 | Weak controls or elevated threat |
| Product | Basic savings account | 2 | Limited functionality |
| Product | International wire services | 4 | Cross-border movement of value |
| Channel | Face-to-face onboarding | 1 | Identity checked in person |
| Channel | Non-face-to-face via intermediary | 3 | Reliance on a third party |
The example scores are illustrative. A real institution bases its scores on its own risk assessment and local regulation.
Handling several values for one factor
A customer often has more than one value in a category. A person may hold three products, or do business in four countries. You must choose a rule and apply it every time. Common rules are:
- Highest value: score the factor by its riskiest value. This is cautious but can push many customers to the top.
- Average: this smooths the result but can hide one serious exposure.
- Weighted by activity: the riskiest value counts only when it carries a meaningful share of activity.
Whatever you pick, write it down. Unwritten rules lead to inconsistent ratings.
A scoring function
The code below turns a customer's attributes into factor scores. It uses the highest-value rule for countries and products. It also treats unknown values as high risk, which is a deliberate choice discussed below.
GEOGRAPHY_SCORES = {"domestic": 1, "standard": 2, "elevated": 4, "high_risk_list": 5}
PRODUCT_SCORES = {"savings": 2, "current": 2, "wire": 4, "trade_finance": 5}
UNKNOWN_SCORE = 5 # missing or unmapped data is treated as high risk
def score_geography(countries):
"""countries is a list of risk categories; the riskiest one sets the score."""
if not countries:
return UNKNOWN_SCORE
return max(GEOGRAPHY_SCORES.get(c, UNKNOWN_SCORE) for c in countries)
def score_product(products):
if not products:
return UNKNOWN_SCORE
return max(PRODUCT_SCORES.get(p, UNKNOWN_SCORE) for p in products)
print(score_geography(["domestic", "elevated"])) # 4
print(score_product(["savings", "wire"])) # 4
print(score_product(["crypto_exchange"])) # 5 (unmapped, so unknown)Common errors
- Defaulting missing data to low risk. This rewards incomplete files. Treat gaps as high risk, or route them for data remediation.
- Scores with no rationale. Without a written reason, you cannot defend a score to an examiner.
- Too many levels. If staff cannot tell a 3 from a 4, the extra precision is noise.
- Stale lookup tables. Country and product risk change over time, so review the tables on a schedule.
Exercise
A customer holds a savings account and a trade finance facility, and the product table scores them 2 and 5. Using the highest-value rule, what is the product score? Name one drawback of this rule.
Show answer
The product score is 5. A drawback is that it can push many customers with one risky product to the top of the scale, even when that product carries a small share of their activity. A weighted-by-activity rule avoids this.
Exercise
Why does the code score an unmapped product such as "crypto_exchange" as 5 instead of 1?
Show answer
An unmapped value means the institution has not assessed that risk. Scoring it low would hide a possibly high exposure. Scoring it 5 is cautious and forces someone to add the product to the table.