Sub topic 3
The data a monitoring system needs
A monitoring system can only detect what its data lets it see. This chapter covers the inputs a rule engine reads before any scenario runs, and the data problems that cause missed activity or false alerts. It assumes you know the common transaction types (cash deposits, wires, card payments), have a basic idea of what money laundering is, and can read short Python functions.
Three families of input
A monitoring system combines three kinds of data. Each answers a different question.
| Input | Question it answers | Typical examples |
|---|---|---|
| Transactions | What happened? | Amount, currency, type, timestamp, channel, counterparty |
| Customer profile | Who is the customer? | Segment, occupation, country, account opening date, expected activity |
| Risk and reference data | How risky is this context? | Customer risk rating, high-risk country lists, watchlists, product risk |
The structuring rule from the Topic Spine needs only transactions: a cash deposit type, an amount, a timestamp and a customer ID. Most other scenarios need all three families. "Wire to a high-risk country that is out of line with expected activity" uses the transaction's counterparty country, a reference list of risky countries, and the expected activity recorded for the customer.
Transaction data
Transaction data is the stream of events the system monitors. Every record should carry a minimum set of fields:
- A unique transaction ID, so an alert can point to exact evidence.
- A customer or account identifier that links to the profile.
- A transaction type (cash deposit, domestic wire, international wire, card purchase, and so on).
- An amount and a currency.
- A timestamp, ideally separating the date the transaction happened from the date the bank booked it.
- Direction (debit or credit) and channel (branch, ATM, online).
- Counterparty details where they exist: name, account, bank, country.
Each field supports a specific kind of rule. Type and amount drive the structuring filter. Timestamps drive lookback windows. Counterparty country drives geographic rules. Direction lets a rule compare money in against money out, which is how pass-through activity is found.
Sources and why they differ
Transactions come from several systems: core banking, card processors, payment hubs and trade finance platforms. Each system has its own field names, code lists and timestamp conventions. One system may record a cash deposit as CASH_DEP and another as 01. A monitoring system therefore needs a mapping layer that translates every source into one common schema. If one source is missing from the feed, or maps to the wrong type, rules for that product silently stop working. No error appears.
Currency and time
Thresholds are written in one reporting currency. A rule that sums amounts across a window must first convert each amount at a defined exchange rate. Decide which rate applies: the rate on the transaction date, or a rate fixed for the day or month. Whichever you choose, apply it consistently, because it changes which transactions fall inside a band such as 8,000 to 10,000.
Time zones matter for the same reason. If one source stores local time and another stores UTC, a window of "7 days" is slightly different for each. Normalize every timestamp to one zone at load time.
Customer profile data
The customer profile is collected during onboarding and updated during periodic reviews. This process is called know your customer (KYC). Monitoring uses it for three purposes:
- Segmentation. The segment (retail, small business, corporate, and so on) selects which parameter set a scenario uses. The retail structuring example uses a lookback of 7 days and a minimum of 3 deposits. A cash-intensive business segment would use different values.
- Expected activity. Many institutions record the expected monthly volume or main sources of funds. A rule can compare actual activity with this declaration.
- Context for the analyst. Occupation, country, ownership structure and account age help a reviewer judge an alert.
Profile data changes over time, so the system has to decide which version a rule sees. If a customer moves from "retail" to "small business" in June, a rule running over January to June should apply the segment that was valid when each transaction occurred, or at least the current one by a documented choice. Systems that keep only the latest profile cannot reproduce an old alert exactly, which causes trouble during audits.
Risk ratings and reference data
The customer risk rating (for example low, medium or high) comes from a separate scoring process that weighs country, product, occupation and similar factors. Monitoring uses it in two ways. Higher-risk customers may receive stricter thresholds, and the rating may raise an alert's priority later in the process.
Reference data is the set of lists a rule looks up:
- High-risk or sanctioned jurisdictions.
- Watchlists such as sanctions and politically exposed persons (PEPs).
- Product or channel risk classifications.
- Currency exchange rates.
These lists change. A rule that reads a stale country list will miss newly designated jurisdictions, so each list needs an owner, an update schedule, and a version recorded with the alerts it influenced.
Joining the data: enrichment
Enrichment means attaching profile and reference fields to each transaction before rules run. The result is a wide record that a rule can read without further lookups. The next example validates records and then enriches the good ones.
REQUIRED = ("txn_id", "customer_id", "type", "amount", "currency", "timestamp")
def validate_transaction(txn, profiles):
"""Return a list of data problems; an empty list means the record is usable."""
problems = [f"missing {f}" for f in REQUIRED if txn.get(f) in (None, "")]
if problems:
return problems
if txn["amount"] <= 0:
problems.append("non-positive amount")
if txn["customer_id"] not in profiles:
problems.append("unknown customer")
return problems
def enrich(txn, profiles):
"""Attach segment and risk rating so rules need no further lookups."""
profile = profiles[txn["customer_id"]]
return {**txn, "segment": profile["segment"], "risk_rating": profile["risk_rating"]}
profiles = {"C1": {"segment": "retail", "risk_rating": "medium"}}
feed = [
{"txn_id": "t1", "customer_id": "C1", "type": "cash_deposit",
"amount": 9500, "currency": "USD", "timestamp": "2026-03-02T10:00:00"},
{"txn_id": "t2", "customer_id": "C1", "type": "cash_deposit",
"amount": 9200, "currency": "USD", "timestamp": None},
{"txn_id": "t3", "customer_id": "C9", "type": "cash_deposit",
"amount": 9800, "currency": "USD", "timestamp": "2026-03-03T09:00:00"},
]
usable, rejected = [], []
for txn in feed:
problems = validate_transaction(txn, profiles)
if problems:
rejected.append((txn["txn_id"], problems))
else:
usable.append(enrich(txn, profiles))
print([t["txn_id"] for t in usable])
print(rejected)
print(usable[0]["segment"], usable[0]["risk_rating"])
# ['t1']
# [('t2', ['missing timestamp']), ('t3', ['unknown customer'])]
# retail mediumThe two rejected records are the point of the example. Record t2 has no timestamp, so no window can place it. Record t3 belongs to a customer with no profile, so no segment can be chosen. A real system does not discard such records quietly. It writes them to an exception queue and reports the counts, because every rejected record is a transaction no rule evaluated.
Common data problems and their effects
| Problem | Effect on alerts |
|---|---|
| Missing source system or product | No alerts for that product. The gap goes unnoticed. |
| Wrong transaction type mapping | A cash deposit is treated as a transfer, so cash rules never see it. |
| Mixed time zones | Windows are shifted, so transactions drift in or out of a lookback period. |
| Unconverted currencies | Amounts compared against a threshold in the wrong unit. |
| Duplicate records | A count threshold such as `min_count` is reached early, producing false alerts. |
| Stale or missing profile | Wrong segment and thresholds. Accounts with no profile are skipped. |
| Late-arriving records | A batch run misses a transaction that is booked after the run. |
| Customer identity not unified | One person with several customer IDs looks like several low-activity customers. |
The last row deserves attention. Structuring and layering often spread activity across accounts. If the system keys on account ID rather than a unified customer ID, the combined behavior never accumulates in one window. Many institutions build a party key that links accounts, joint holders and related entities.
Data quality as a control
Because every detection depends on the data, institutions treat data quality as part of the monitoring control itself. Typical practices include:
- Completeness checks that compare source counts and totals with what the monitoring system loaded.
- Field-level validation of the kind shown above, with an exception queue and an owner for fixing rejects.
- Mapping reviews whenever a source system adds a product or changes a code list.
- Lineage documentation that traces each field used by a scenario back to its source, so an alert can be explained and reproduced.
What the next chapters build on
The rest of the tutorial assumes this layer works. Segmentation uses profile fields to choose parameters. Scenarios and thresholds use transaction fields. Rule evaluation uses timestamps, and alerts store the transaction IDs that triggered them. Each of those steps inherits the quality of the data described here.
Exercise
A bank loads cash deposits from its branch system, but a mapping change causes ATM deposits to arrive typed as "transfer". The structuring scenario still runs every night without errors. What happens to its alerts, and which control would catch the problem?
Show answer
The scenario filters on type "cash_deposit", so it never sees the ATM deposits. Customers who structure through ATMs produce no alerts, and the system gives no sign of failure. A daily reconciliation of record counts and amounts by transaction type between the source system and the monitoring system would reveal that the cash deposit volume is lower than the source reports. A review of the mapping after the change would also have caught it.
Exercise
Customer C5 deposits 6,000 EUR on Monday and 6,000 USD on Tuesday. A scenario sums deposits in a window and alerts at 12,000 in the reporting currency, USD. Why can the system fail to alert if it does not convert currency, and what must you decide when you add conversion?
Show answer
Without conversion, the amounts are added or compared as plain numbers, which ignores that the two currencies have different values. The total can land on the wrong side of the threshold. When you add conversion you must decide which exchange rate applies (the transaction date rate or a fixed daily or monthly rate) and apply it consistently, and you should record the rate used so the alert can be reproduced.