Sub topic 12
How transaction monitoring turns patterns into alerts
This chapter assumes you know the red flags from earlier chapters: structuring, pass-through activity, and the idea of a customer's expected activity. It shows how a bank turns those patterns into automated alerts, and where those alerts go wrong.
From red flag to rule
A bank processes far too many transactions for people to read each one. Transaction monitoring is the automated screening of account activity against defined patterns. When activity matches a pattern, the system creates an alert. An alert is a prompt for a human to look at the activity. It is not a finding of wrongdoing.
Most monitoring starts with rules. A rule is a plain statement of a red flag, with numbers attached:
- Structuring: three or more cash deposits between 90% and 100% of the reporting threshold within three days.
- Pass-through: more than 95% of incoming funds leave the account within the review period.
- Cross-border: transfers to or from jurisdictions on the bank's high-risk list, above a set amount.
The numbers are parameters. Real values depend on the jurisdiction and the bank's risk policy, so they are set in configuration and not buried in code.
A rule in code
The function below turns the structuring flag into a check. It looks for deposits just under the threshold that cluster in a short window and together exceed the threshold.
from datetime import date
def structuring_alert(deposits, threshold=10_000, margin=0.10, window_days=3, min_count=3):
"""Return the first group of just-below-threshold cash deposits in a short window, or None.
deposits: list of (date, amount) tuples.
"""
near = sorted((d, a) for d, a in deposits if threshold * (1 - margin) <= a < threshold)
for i, (start, _) in enumerate(near):
window = [(d, a) for d, a in near[i:] if (d - start).days <= window_days]
if len(window) >= min_count and sum(a for _, a in window) >= threshold:
return window
return None
deposits = [
(date(2026, 3, 2), 9_400),
(date(2026, 3, 3), 9_700),
(date(2026, 3, 4), 9_200),
(date(2026, 3, 20), 1_500),
]
print(structuring_alert(deposits))The first three deposits fall in the 9,000 to 10,000 band within two days and total 28,300, so the function returns them. The 1,500 deposit is ignored.
The alert pipeline
Alerts pass through several stages before anything reaches a regulator.
The analyst review is where the earlier chapters apply. The analyst compares the alert with the customer's expected activity and due diligence file, then records the reasoning either way.
Tuning and common errors
Every rule trades missed activity against wasted effort. A low threshold catches more but floods analysts with false positives. A high one stays quiet but misses real cases. Common errors include:
- Applying one threshold to every customer. A cash-heavy restaurant and a salaried employee need different baselines.
- Copying thresholds from another bank or country without testing them on your own data.
- Never reviewing rules, so criminals who learn the limit simply stay under it.
- Closing alerts without a written reason, which leaves no evidence of the decision.
Banks test rules before release, often by running them over historical data. They also check results afterward: how many alerts led to escalation, and which rules produce only noise.
Exercise
A rule alerts on any account where more than 95% of incoming funds leave within the period. A payroll company's account triggers it every month. What should the analyst check first, and what should the bank consider changing?
Show answer
The analyst should compare the activity with the customer's expected activity. A payroll company receives funds from clients and pays them out to employees, so high pass-through is normal for it, and the alert is likely a false positive to close with a documented reason. The bank should consider tuning the rule, for example by using customer segments with different thresholds, so that expected behavior stops generating repeated alerts.