Skip to content

Customer risk score model

ID MOD-039
System SD06
Repo bank-risk-platform
Build status Deployed
Deployed Yes
Last commit 9d80aab2956e9f4c952dbd7e8efe426167e0506f

XGBoost model scoring each customer's AML/financial crime risk on a 0–100 composite scale. Real-time path (60-second event-driven via Snowflake Stream + Task) and daily batch path (15-minute Dynamic Table) feed a unified v_current_scores view, with full score history maintained in an append-only table.

MOD-039 is a publisher only — it does not write directly into KYC or AML Postgres databases. Consuming domains subscribe to the bank.risk-platform/customer_risk_score_updated EventBridge event and maintain their own mirror tables:

  • bank-kyc (MOD-010)bank_kyc.party.risk_scores_mirror (see SD02 data model)
  • bank-aml (MOD-016/017)bank_aml.aml.risk_scores_mirror (see SD03 data model)

The XGBoost model ships with synthetic training data at V1. It is replaced with production data once 6 months of MOD-016/017 outcome flags accumulate via CDC (MOD-042).

Streamlit dashboard

MOD-039 ships a Streamlit page RISK_CUSTOMER.STREAMLIT_RISK_SCORE_DASHBOARD providing: - Customer risk score distribution histogram across the portfolio - Score band breakdown (low / medium / high / very high) with counts and % of portfolio - PSI vs. prior month and drift alert status - Geographic and product-type breakdowns

Consumed by MOD-171 (Risk Intelligence Dashboard) in the risk metrics overview and RAF summary. Consumed by MOD-172 (Operations & Model Intelligence Dashboard) in the model performance section. Cross-schema SELECT on RISK_CUSTOMER.* published views required for RISK_INTELLIGENCE_ROLE and OPERATIONS_ROLE.


Module dependencies

Depends on

Module Title Required? Contract Reason
MOD-042 CDC pipeline — Neon logical replication to S3 Iceberg Required Customer risk score model is trained in Snowflake on transaction and behaviour history from the CDC pipeline.
MOD-010 CDD tier assignment engine Required contract/dbt/ CDD profile data is a required input feature for the customer risk scoring model.
MOD-104 AWS shared infrastructure bootstrap Required MOD-104 provisions the S3 Iceberg bucket (Snowflake external tables), KMS key, and bank-risk-platform EventBridge bus ARN. Required before this module can be deployed.
MOD-102 Snowflake account configuration & governance Required Snowflake account and governance provisioned by MOD-102 must exist before this module can read or write Snowflake.
MOD-171 Risk Intelligence Dashboard Required Risk Intelligence Dashboard includes customer risk score distribution in its risk metrics overview and RAF summary.
MOD-172 Operations & Model Intelligence Dashboard Required Operations & Model Intelligence Dashboard includes customer risk model performance metrics in its model performance page.

Required by

Module Title As Contract
MOD-017 ML behavioural scoring model Optional enhancement
MOD-040 Churn & health score engine Hard dependency
MOD-077 Account dashboard & insight feed Optional enhancement
MOD-150 Risk management platform Hard dependency
MOD-153 Customer acceptance engine Optional enhancement
MOD-171 Risk Intelligence Dashboard Hard dependency
MOD-172 Operations & Model Intelligence Dashboard Hard dependency

Policies satisfied

Policy Title Mode How
AML-002 Customer Due Diligence (CDD) Policy AUTO CDD tier informed by live customer risk score — not a static assessment at onboarding
AML-005 Transaction Monitoring Policy AUTO High risk score customers subject to enhanced monitoring automatically — no manual watchlist
DT-005 Model Risk Management Policy LOG Risk score model in model inventory — validated against AML outcomes quarterly

Capabilities satisfied

Capability Title Mode How
CAP-063 Proactive financial insight engine AUTO Generates personalised financial insights from the customer's transaction history and delivers them via the app.
CAP-067 Idle cash detection AUTO Detects when savings balances are idle and surfaces a prompt to move funds into a higher-interest product.
CAP-012 Merchant name enrichment & logo AUTO Enriches raw merchant names from transaction data with clean display names and merchant logos using a merchant intelligence database.
CAP-013 Spend categorisation (auto + manual) AUTO Automatically classifies each transaction into a spend category (dining, transport, groceries, etc.) using the ML categorisation model; customers can override the assigned category.
CAP-055 KiwiSaver contribution visibility (NZ) AUTO Retrieves and displays KiwiSaver balance, contribution rate, and projected balance at retirement from the customer's KiwiSaver provider API — NZ customers only.

Part of SD06 — Snowflake Analytics & Risk Platform Compiled 2026-05-22 from source/entities/modules/MOD-039.yaml