Sub topic 16
Tuning and Validating Monitoring Controls
This chapter assumes you know what transaction monitoring scenarios are, how alerts are triaged, and how a customer risk rating drives monitoring intensity. It also assumes basic Python. The goal is to show how an institution decides whether its monitoring rules work, and how it changes them safely.
Why monitoring rules need tuning
A monitoring rule is a hypothesis: "activity that looks like this is worth a human's attention." The hypothesis can be wrong in two ways.
- A false positive is an alert on activity that turns out to be legitimate. Too many of them swamp analysts and hide real cases.
- A false negative is activity that should have raised an alert but did not. These are harder to see, because nothing records them.
Tuning is the controlled adjustment of a rule's thresholds, segments, or logic to change the balance between these two errors. Validation is the independent check that the rule does what it is designed to do and that the design is sound for the institution's risks. Tuning changes the control. Validation tests it.
Customer behaviour, products, and criminal typologies change over time. A rule set that was reasonable at launch drifts out of line, so tuning is a recurring activity and not a one-off project.
Where tuning sits in the control cycle
The loop shows the main discipline: no change goes live because one analyst thinks it is sensible. It is measured, tested, challenged by someone independent, and approved.
What to measure
Tuning starts with outcome data from alert handling. For each rule, you need at least these figures.
| Measure | Definition | What it tells you |
|---|---|---|
| Alert volume | Number of alerts per period | Workload and stability over time |
| Escalation rate | Alerts escalated for investigation or reporting, divided by alerts | How often the rule finds something worth acting on |
| Report conversion | Alerts leading to a suspicious activity report, divided by alerts | Precision against the strongest outcome |
| Average handling time | Analyst time per alert | Cost of the rule |
| Closure reasons | Why alerts were closed without action | Whether a rule is catching a known harmless pattern |
A rule with a very low escalation rate over a long period is a candidate for refinement. A rule with a high rate may be well tuned, or it may be too narrow and miss related activity. Neither number is conclusive alone.
The following code computes these figures from a list of closed alerts.
from collections import defaultdict
# Each alert: (rule_id, outcome) where outcome is "closed", "escalated", or "reported"
alerts = [
("high_volume", "closed"), ("high_volume", "closed"), ("high_volume", "closed"),
("high_volume", "escalated"), ("high_volume", "reported"),
("rapid_movement", "closed"), ("rapid_movement", "closed"),
("rapid_movement", "closed"), ("rapid_movement", "closed"),
("rapid_movement", "closed"),
]
counts = defaultdict(lambda: {"total": 0, "escalated": 0, "reported": 0})
for rule_id, outcome in alerts:
counts[rule_id]["total"] += 1
if outcome in ("escalated", "reported"):
counts[rule_id]["escalated"] += 1
if outcome == "reported":
counts[rule_id]["reported"] += 1
for rule_id, c in counts.items():
escalation_rate = c["escalated"] / c["total"]
report_rate = c["reported"] / c["total"]
print(f"{rule_id}: alerts={c['total']}, escalation={escalation_rate:.0%}, reports={report_rate:.0%}")The output is high_volume: alerts=5, escalation=40%, reports=20% and rapid_movement: alerts=5, escalation=0%, reports=0%. The second rule produced work and no results in this sample, so it needs review. Five alerts is far too few to conclude anything. Real analysis needs enough volume for the rates to be stable.
Above-the-line and below-the-line testing
You cannot judge a threshold using only the alerts it produced. Those are the cases above the threshold. To learn whether the threshold is in the right place, you also look at activity just below it.
- Above-the-line testing reviews a sample of generated alerts to see how many were useful.
- Below-the-line testing takes a sample of activity that did not alert, especially near the threshold, and has analysts review it as if it had alerted. If real suspicious activity appears there, the threshold is too high.
Below-the-line testing is the main way to find false negatives. It needs a sampling method that is documented and repeatable, so a validator can reproduce it.
The next code sketch shows the idea with a simple threshold sweep. It reports how many alerts each candidate multiplier would generate on historical monthly inflows, relative to the expected amounts in customer profiles.
# (expected_monthly_inflow, actual_inflow) for historical customer-months
history = [
(5000, 4200), (5000, 9800), (5000, 13500), (2000, 2100),
(2000, 4500), (8000, 8200), (8000, 17000), (3000, 3300),
]
for multiplier in (1.5, 2.0, 2.5, 3.0):
alerts = sum(1 for expected, actual in history if actual > expected * multiplier)
print(f"multiplier {multiplier}: {alerts} alerts of {len(history)} customer-months")This prints 5, 4, 3, and 1 alerts for the four multipliers. The sweep shows volume only. To choose, you must also know which of those cases were genuinely suspicious, which is why the sweep is paired with reviewed samples and not used on its own.
Segmentation
One threshold for all customers fits nobody well. A student account and a trading company have very different normal behaviour. Segmentation groups customers with similar expected behaviour, such as by customer type, product, geography, or risk rating, and sets thresholds per group.
Segmentation is a common tuning lever because it often cuts false positives without raising false negatives. It also adds complexity. Each segment needs enough data to set a threshold, and small segments tend to produce unstable results. Customers must also be assigned to segments correctly, so the quality of the underlying customer data directly limits the quality of the tuning.
Validation
Validation answers a different question from tuning: is the control well designed, correctly implemented, and still fit for purpose? A typical validation covers four areas.
- Conceptual soundness. Do the scenarios cover the institution's identified risks, such as its products, customer types, and countries? Is each threshold backed by a documented rationale?
- Data integrity. Does the rule receive complete and accurate data? Missing transaction types, wrong currency conversions, or dropped feeds silently disable rules.
- Implementation testing. Does the code or configuration behave as the specification says? Teams often test with crafted records that should and should not trigger.
- Outcome analysis. Do the alert results, including below-the-line samples, support the current settings?
Validation should be performed by people independent of those who built or tuned the rule. In smaller institutions this may be an external reviewer or a separate function. The independence requirement matters more than the title of the team.
Implementation test example
A boundary test checks that a rule fires exactly where the specification says it should.
def volume_deviation_alert(expected: float, actual: float, multiplier: float = 2.0) -> bool:
return actual > expected * multiplier
cases = [
(5000.0, 10000.0, False), # exactly at the threshold: strictly greater required
(5000.0, 10000.01, True), # just above
(5000.0, 0.0, False), # no activity
(0.0, 1.0, True), # no expected inflow in profile: any inflow alerts
]
for expected, actual, want in cases:
got = volume_deviation_alert(expected, actual)
status = "ok" if got == want else "FAIL"
print(f"{status}: expected={expected}, actual={actual}, alert={got}")The last case shows an edge worth deciding on purpose. A profile with an expected inflow of zero makes every inflow an alert. That may be correct, or it may flood analysts with alerts for new or dormant accounts. The specification should state the intended behaviour, and the test should lock it in.
Change control
Every change to a rule needs a record that lets a reviewer, auditor, or regulator reconstruct what happened and why.
- The old and new settings.
- The reason, with the supporting data.
- The test results on historical data, including the alert volume change.
- The names of the person who proposed it, the validator, and the approver.
- The date it went live.
Keep the record for as long as your retention policy requires. Also keep the ability to roll back. A change that looks good in testing can behave differently on live data.
Common errors
- Tuning to a volume target. Cutting alerts to fit staffing, with no risk analysis, creates blind spots.
- Reviewing only alerts. Without below-the-line testing, false negatives stay invisible.
- Tuning on too little data. Small samples produce rates that change from month to month.
- No independence. The person who tuned the rule validates their own work.
- Ignoring data defects. A rule that appears to perform poorly may be fed bad data. Tuning the threshold will not fix a broken feed.
- Missing documentation. An undocumented change cannot be defended later, even if it was correct.
- Setting and forgetting. New products, countries, or typologies are not covered by old rules.
Exercises
Exercise
A rule generated 400 alerts last quarter, and only 2 were escalated. An analyst proposes doubling the threshold, which would cut volume by about 70%. What evidence should you collect before approving the change?
Show answer
First, review what the 2 escalated cases looked like and check whether they would still alert at the doubled threshold. If they would not, the change could remove the rule's value. Second, run below-the-line testing on activity between the old and new thresholds to look for suspicious cases that would now be missed. Third, check closure reasons for a known harmless pattern that segmentation could remove instead of a blanket increase. Fourth, test the change on historical data and record the volume impact. Finally, have an independent validator review the analysis and record the approval before deployment.
Exercise
Why can a threshold sweep that reports only alert counts not tell you the best threshold?
Show answer
Alert counts show workload but not quality. You need to know which alerts, and which activity just below each candidate threshold, were actually suspicious. Without reviewed outcomes you cannot measure how many real cases a higher threshold would lose, so you could cut false positives and false negatives together without noticing.
Exercise
A validator finds that a monitoring rule has produced no alerts for six months. List two possible explanations and one check for each.
Show answer
One explanation is a data defect, such as a dropped transaction feed or a changed field format. Check by comparing the rule's input record counts with the source system's totals. Another is a threshold set so high, or a segment so narrow, that no activity can meet it. Check by testing the rule on crafted records and running below-the-line sampling on near-threshold activity.