All projects Project / Trade Ops

Breakpoint

A settlement break triage engine. Deterministic matching, LLM root-cause triage under forced tool use, and a T+1 stress test priced in CSDR penalties.

Status Shipped Year 2026 Stack Python 3.12 · Claude API · pytest
Instruction pairs5,000
Breaks detected350
Triage agreement100%
REAL RUN DATA · data/run_meta.json · claude-sonnet-5
OURS · TR00042 THEIRS · TH00042 ISIN NL0011821202 = ISIN NL0011821202 QUANTITY 33,700 = QUANTITY 33,700 SETTLE AMOUNT EUR 9,019,805.00 = SETTLE AMOUNT EUR 9,019,805.00 TRADE DATE 2026-08-03 TRADE DATE 2026-08-05 VALUE DATE 2026-08-05 = VALUE DATE 2026-08-05 SSI EUROCLEAR NL = SSI EUROCLEAR NL DETERMINISTIC DIFF · ONE OF 350 BREAKS IN 5,000 PAIRS · SEED 42 BRK-0002 · LATE ALLOCATION · EUR 9,019,805.00

The design rule

Breakpoint never asks the model whether two trades match. Matching is arithmetic: normalise both sides, compare field by field, apply a tolerance to cash. Code does that perfectly and repeatably, and when it reports 4,700 exact matches, that number is a fact anyone can recompute, not an opinion.

The model enters only after a break is proven, to do the one thing code is bad at: reading a messy discrepancy and arguing a root cause. It answers under forced tool use, so every reply is a schema-checked verdict with a confidence score and a drafted chaser email, and every verdict waits in a review queue for a human. Diagnosis is delegated. Truth is not.

Architecture

Five stages, one command. Four are deterministic Python; the fifth is a model under forced tool use. Each stage writes what the next one reads, and the last one writes the four JSON files this page loads.

01

Generate

A seeded synthetic settlement book: 5,000 instruction pairs, ours versus theirs, with 350 breaks planted across seven categories. The ground truth is known, so every later claim can be scored.

02

Match

A deterministic pass pairs the two sides: exact on reference and economics, fuzzy within tight tolerances, the rest unmatched. 4,700 exact, 250 fuzzy, 100 unmatched. No model is consulted.

03

Classify

Every break is categorised by rule from its field diff and priced in code: category, severity and cash exposure attached before any model sees it.

04

Triage

The only LLM stage. Claude argues a root cause under forced tool use: a schema-checked verdict with a confidence, a drafted chaser email and a next action. Every verdict lands in the review queue as pending_review, not as done.

05

Artifacts

One run writes four JSON files: breaks, triage, stress, run_meta. This page fetches them raw; the dashboard below is those files, unedited.

GENERATE MATCH CLASSIFY TRIAGE ARTIFACTS 5,000 PAIRS SEED 42 4,700 EXACT · 250 FUZZY 100 UNMATCHED 350 BREAKS 7 CATEGORIES 350 VERDICTS THE ONLY LLM STAGE 4 JSON FILES READ BY THIS PAGE ONE COMMAND · ONE SEEDED RUN · EVERY NUMBER ON THIS PAGE COMES FROM STAGE 05

The break queue

Every break from breaks.json with the model's verdict beside it. Severity and category are set deterministically; exposure is the cash at risk while the trade sits unsettled. Scored against the planted labels, the triage agreed on 350 of 350. The prompt includes the deterministic category, so read that 100% as consistency with the evidence in front of the model, not blind inference: its real work is the argued root cause and the chaser it drafts.

Breaks in the queue350
High severity295 / 350
Gross exposureEUR 1.65bn
Chasers drafted300

The T+1
stress test

The stress test replays the same 350 breaks under one changed assumption: the settlement window shrinks from two days to one. Resolution behaviour stays identical; only the deadline moves. Every break that needed exactly two days flips from settled to failed, and the CSDR penalty meter runs a day longer on everything that still fails.

127 of the 350 flip, and the penalty bill roughly triples. That is the whole project in one number: an operations queue that looks fine at T+2 is quietly carrying a T+1 problem.

Breaks that flip127
Fails, T+2 → T+170 → 197
CSDR penalties at T+2EUR 45,470.50
CSDR penalties at T+1EUR 140,064.95

Proof

38 tests pin the engine down: generation, matching, classification rules, penalty arithmetic, the CLI and the tool-use plumbing. The LLM is mocked in the suite, so it runs offline in under half a second. The artifacts this page reads come from one seeded run of the real thing.

$ pytest -q
......................................                                   [100%]
38 passed in 0.41s