Sub topic 7
Override rules and automatic high-risk outcomes
This chapter assumes you know what a weighted scorecard is, can read short Python functions, and understand what a politically exposed person (PEP) and a sanctions match are. The previous chapters built the score. Here you add rules that can overrule it.
Why a score is not enough
A weighted average blends factors. That blending can hide a risk that should never be diluted. Take a customer who is a PEP but has a simple product, a domestic address and a face-to-face channel. The low scores on three factors can pull the total into the Medium band. Most programs do not accept that outcome.
An override rule is a condition that sets or limits the rating no matter what the numbers say. Overrides are usually driven by law, regulation or the institution's own risk appetite.
Two kinds of override
- Floor override. The rating cannot fall below a minimum. A PEP is rated High even if the score says Medium.
- Route override. The customer is not rated through the normal path. A sanctions match goes to compliance for a decision. It is not rated Low, Medium or High and then processed.
Keep the two apart. A floor changes the rating. A route changes the process. A confirmed sanctions match usually means the relationship cannot go ahead until compliance decides. A rating label is the wrong output for that case.
Overrides in code
The function below runs the sanctions check first, then scores the customer, then applies the PEP floor. It reuses the weights and bands from the scorecard chapter.
WEIGHTS = {"customer": 0.30, "geography": 0.30, "product": 0.25, "channel": 0.15}
def weighted_score(factors):
return sum(WEIGHTS[name] * factors[name] for name in WEIGHTS)
def band(score):
if score < 2.5:
return "Low"
if score < 3.5:
return "Medium"
return "High"
def assign_rating(factors, is_pep=False, sanctions_match=False):
if sanctions_match:
return "Escalate" # route override: compliance decides
rating = band(weighted_score(factors))
if is_pep:
rating = "High" # floor override
return rating
factors = {"customer": 2, "geography": 4, "product": 3, "channel": 2}
print(assign_rating(factors)) # Medium
print(assign_rating(factors, is_pep=True)) # High
print(assign_rating(factors, sanctions_match=True)) # EscalateThe same customer gets three different outcomes. The numeric score stays 2.85 in all three cases.
Common errors
- Wrong order. If the PEP floor runs before the sanctions check, a sanctioned PEP is rated High and processed. Put route overrides first.
- Lowering a rating. An override should raise a rating or stop the process. A rule that lowers a rating needs separate approval and a documented rationale.
- Silent overrides. Store the reason with the result. An auditor must see that the score was 2.85 and that the High rating came from the PEP rule. Recording only "High" hides this.
- Too many rules. Each override bypasses the model. If many customers are overridden, the scorecard is probably miscalibrated. Track the override rate and review it.
- Stale trigger data. A rule is only as good as the PEP and sanctions data behind it. A customer who became a PEP last month is missed if the screening list is old.
A better return value
A function that returns only a label cannot show why. This version returns the rating and the reasons.
def assign_rating_with_reasons(factors, is_pep=False, sanctions_match=False):
score = round(weighted_score(factors), 2)
if sanctions_match:
return {"rating": "Escalate", "score": score, "reasons": ["sanctions match"]}
rating = band(score)
reasons = [f"score {score} -> {rating}"]
if is_pep and rating != "High":
rating = "High"
reasons.append("PEP floor applied")
return {"rating": rating, "score": score, "reasons": reasons}
print(assign_rating_with_reasons(
{"customer": 2, "geography": 4, "product": 3, "channel": 2}, is_pep=True))This prints a dictionary with rating High, score 2.85, and two reasons: the banded result and the PEP floor.
Exercise
A customer scores 1.9 (Low) and has a sanctions match. A developer's code checks is_pep first, then sanctions, and returns "Low" when neither flag overrides the band. What should happen to this customer, and which override type applies?
Show answer
The customer should be escalated to compliance, not rated Low. This is a route override. The sanctions check must run before any rating is returned, and the reason should be stored with the result.
Exercise
Why should the system record both the numeric score and the override reason?
Show answer
The score shows what the model calculated, and the reason shows why the final rating differs. Without both, an auditor cannot tell whether the rating came from the model or from a rule, and the institution cannot measure how often overrides replace the model.