Banking and financial services
Identify dormant and declining accounts from transaction activity and prioritise relationship outreach. Vertiq models client behaviour, not market prices.
Data mapping
- Entity
- account or client
- Group
- branch or advisor
- Profile
- generic; configure time windows with verticals.register
Supported analyses
- Will this account record a credit transaction within 60 days?
predict_event(target="CREDIT", window_days=60)
Reference implementation
from datetime import datetime, timedelta
from vertiq import plugins, rules
from vertiq.mapping import Mapping, apply, repair
from vertiq.tasks import predict_event, predict_value
# rows: the source export as a list of dicts, e.g. list(csv.DictReader(open("export.csv")))
mapping = Mapping.parse({"entity": "Account No", "time": "Value Date", "type": "Txn Type", "value": "Amount", "group": "Branch", "attrs": ["Product", "Channel"], "date_format": "%d.%m.%Y"})
m, notes = repair(mapping, rows) # validates column names, value types and date format against the rows
ds, problems = apply(m, rows) # rows that fail to load are reported, not imputed
@plugins.feature("banking")
def debit_activity(entity, before, cut): # receives only events recorded before the cutoff
return {"debits_90": sum(1 for e in before if e.type == "DEBIT"
and e.at >= cut - timedelta(days=90))}
task = predict_event(ds, target="CREDIT", window_days=60, pack="banking")
print(task.status, task.report()) # "trained" only if the model outperformed the baseline on held-out entities
if task.status == "trained":
print(task.score("AC-204118")) # probability with contributing factors
flags = rules.run(ds, [
rules.repeat(1, type="REVERSAL"), # two reversals on one account in a day, for review
])
print(flags["summary"])
This code is executed by the test suite (tests/test_guides.py) against generated records with these column names.
Recommended plugin
debit_activity: A sustained increase in withdrawals often precedes account closure.
Validation rules
rules.repeat(1, type="REVERSAL"): two reversals on one account in a day, for review
Implementation notes
- Vertiq does not provide investment advice or trading signals.
- Regulated decisions remain with authorised staff. Scores are used to prioritise review and outreach.
Validation
- Portfolio tables in the Vertiq LM mapping evaluation
- Every deployment: the evaluation gate measures each model on the organisation's own held-out records before promotion.