← FRTBTrace overview

FRTBTrace · How it works

Type the question, then trace capital through the whole formula

Marginal impact, removal effect, accounting share, historical origin and hedge choice are different questions about the same capital number. FRTBTrace answers each one exactly against one full FRTB-IMA calculation, on (observation date, trade) positions.

Part 1 · The idea

1Why not one attribution vector?

Under the internal-models approach of the Fundamental Review of the Trading Book (FRTB-IMA), market-risk capital is set for a bank’s approved trading desks as a whole. The rules do not say how that number should be split across trades, yet risk managers, capital planners and validators ask for exactly that. The obvious answer is to compute one vector per trade, usually a gradient (Euler) allocation or one of the published FRTB allocation rules, and to use it wherever a trade-level number is needed.

That vector is then asked several different questions. A desk report needs numbers that add up to capital. A what-if screen needs the change in capital if a trade is removed. A pre-trade check needs the local sensitivity. An audit needs to know where the capital came from. These answers coincide only in special cases, and FRTB is rarely one: its expected-shortfall, stress-ratio, history and standardised-approach layers are nonsmooth, and part of today’s charge is computed from books held weeks earlier.

One attribution vector, or the question typed firstAbove: one per-trade vector is reused for a desk report, a removal what-if and a trade ranking. Below: five typed questions, marginal, removal, accounting, origin and hedge choice, each with its own answer; only accounting and origin add up to capital.The usual way: one attribution vector for every useOne vectorper trade, e.g. agradient allocationDesk reportWhat if we remove it?Which trades matter?Each use asks a different question, so one set of numbers fits at most one of them.FRTBTrace: type the question firstMarginalwhat moves K?need not add upRemovalK without trade i?need not add upAccountingK split by tradeadds up to KOriginK by (date, trade)adds up to KHedge choicelowest K?a ranking
One attribution vector, or the question typed firstAbove: one per-trade vector is reused for a desk report, a removal what-if and a trade ranking. Below: five typed questions, marginal, removal, accounting, origin and hedge choice, each with its own answer; only accounting and origin add up to capital.The usual way: one attribution vector for every useOne vectorper trade, e.g. agradient allocationDesk reportWhat if we remove it?Which trades matter?Each use asks a different question, so one set of numbers fits at most one of them.FRTBTrace: type the question firstMarginalwhat moves K?need not add upRemovalK without trade i?need not add upAccountingK split by tradeadds up to KOriginK by (date, trade)adds up to KHedge choicelowest K?a ranking
Figure 1. One vector for every use, or the question typed first. FRTBTrace names the question before it computes anything, and each answer says whether it may be added up.

So FRTBTrace starts from the question. It distinguishes five of them, evaluates all five against one deterministic calculation of the full capital formula, and returns with each answer what it may be used for.

The ingredients are known. Euler and Aumann–Shapley allocation for homogeneous risk measures, the fact that removal effects do not add up, and allocation at points where the risk measure has a kink are standard results in capital allocation. What FRTBTrace adds is exact, node-by-node propagation through the whole internal-models calculation, including the history maxima and averages, the stress-ratio floor, the amber surcharge and the comparison with standardised capital; a ledger over (observation date, trade) rather than over today’s trades; the exact frozen remainder that separates the two; and answers that state their question, with an explicit outcome when there is no answer.

2Five questions

Marginal

Which trades move K locally today?

A gradient on today’s book. At a tie it is a set, not one vector.

Adds up to K: not in general

Removal

What happens to K if trade i goes?

A finite counterfactual, answered by revaluing the book without the trade.

Adds up to K: not in general

Accounting

How should K be split over current trades or desks?

A declared remap of the origin ledger onto today’s trades.

Adds up to K: yes

Origin

Which (date, trade) positions generated K?

The ledger from the reverse pass, one entry per stored date and trade.

Adds up to K: yes

Hedge choice

Which candidate action gives the lowest K?

A ranking of candidate actions by exact revaluation.

A ranking, not a sum

The questions are not five estimates of one hidden quantity. Using a marginal vector as a desk report gives numbers that need not add up; using an accounting share as a removal estimate gives a number that is not the what-if effect; and looking only at today’s book misses the capital that stored history generates. Coalition values (Shapley values over trades) are a sixth candidate, but on these books many of the sub-book capitals they need do not exist, so they have no answer.

3Ties and history

Two features of the formula pull the questions apart. The first is ties. Take capital K=max(w1,w2), which is itself a two-scenario expected shortfall, at w=(1,1). Removing either trade leaves K=1, so both removal effects are zero and their sum is zero, not one. The local marginal is the whole segment between (1,0) and (0,1). An accounting ledger can still add up to K, but only by declaring how the tie is split.

Two trades, one tie Illustrative

Two trades at a tie, illustrativeAt K = max(w1, w2) with w1 = w2 = 1: the marginal is a set, removal effects are zero, and a tie-weighted ledger adds up to K.At the tie w₁ = w₂ = 1, K = max(w₁, w₂) = 1Marginala set: the segmentfrom (1, 0) to (0, 1)Removal effects0.00 and 0.00sum 0.00, not KAccounting ledger0.50 and 0.50 (λ = ½)sum 1.00 = KTwo trades, one tie. The removal effects are both zero and do not add up to K; the marginal is not unique;a ledger with a declared tie weight λ adds up to K. Illustrative toy.
Move trade 2 off the tie and the marginal becomes one gradient; at the tie it is a set, the removal effects stop adding up, and the ledger needs a declared tie weight λ. FRTBTrace flags such points instead of returning one vector as if it were unique.

The second is history. FRTB compares recent charges with moving averages of past charges (60 daily and 12 weekly observations). When an averaged branch is active, part of today’s capital is generated by books held on earlier dates. Differentiating only today’s positions cannot reach that part; at smooth points its size is exact, and we call it the frozen remainder:

w⊤∇wK=K−∑s<T−1xs⊤∇xsK⏟frozen remainder

Here xs is the book held on stored date s and w=xT−1 is today’s book. A sensitivity to today’s book can be numerically correct and still leave most of the capital unexplained.

4The method in one picture

FRTBTrace writes the full capital calculation as a graph. Expected shortfall is evaluated on blocks for each risk class, factor set and liquidity horizon, aggregated over horizons, scaled by a floored stress ratio and combined into the internal-models charge; non-modellable and default-risk charges are added; history enters through maxima against moving averages; and the result is compared with standardised-approach capital.

The FRTB-IMA capital graphExpected-shortfall blocks aggregate over liquidity horizons, pass through the floored stress ratio and the internal-models charge, with the non-modellable charge, on each stored date; history maxima compare the latest values with moving averages; default risk enters through a quantile and its own history; the final layer compares with standardised capital. Nonsmooth nodes are shaded.Evaluated on each stored date’s bookES blocksdual weights qLiquidity horizonsE = (Σ aⱼeⱼ²)^½Stress ratioS·max(1, F/R)Non-modellableN, stress chargesIMCC + NI = ½G₀ + ½ΣG꜀Default risk99.9% quantile dMarket historymax(latest, 1.5·avg₆₀)Default historymax(latest, avg₁₂w)Final capitalmin{J+H+C_U, Z} + (J−B)₊Standardised approachB, C_U, Z (stand-in)nonsmooth node
The FRTB-IMA capital graphThe capital graph from expected-shortfall blocks to capital K, top to bottom; nonsmooth nodes shaded.ES blocks → liquidity horizonsdual weights q; E = (Σ aⱼeⱼ²)^½Stress ratioG = S·max(1, F/R)IMCC + non-modellableI = ½G₀ + ½ΣG꜀, plus NHistory maximamax(latest, 1.5·avg₆₀); default: avg₁₂wFinal capital Kmin{J+H+C_U, Z} + (J−B)₊Default risk and SA capital join at the history and final layers. Shaded: nonsmooth.
Figure 2. The FRTB-IMA capital graph. Shaded nodes can be nondifferentiable. The nodes inside the dashed box are evaluated on each stored date’s book and feed the history maxima.
  • One forward passCapital K is evaluated once, and every nonsmooth node records its active branch: whether the stress-ratio floor binds, which history branch is selected, which side of the final minimum is active.
  • One reverse passAllocation vectors flow back through every node by local Euler rules: dual weights at each expected shortfall, the active branch at floors and maxima, the active default-quantile scenario.
  • Typed answersThe origin ledger lands on (date, trade) positions and adds up to K; removal and hedge choice are exact revaluations; at a tie, one valid marginal point is returned and flagged.

5Where it runs

Exact engine tested

A deterministic finance tool, not an AI model

Evaluates capital before and after an action, with every node value and branch state, and returns the typed answer with its reconciliation check. Ties are detected at relative tolerance 10−12. The benchmark protocol and result schema give each answer one of 6 outcomes: answered, no answer on this book, not applicable, declines, fails, or not run; the engine itself does not yet emit them, and the command-line prototype returns 4 of them.

Agent tool interface Proposed

A contract for financial AI agents

Every answer states its question and use; only additive ledgers may be grouped into desk views; undefined and out-of-scope cases are explicit, never silent zeros; approximations fail closed. A command-line prototype exists; the message schema and escalation workflow are not implemented.

Part 2 · The evidence

Tested so far synthetic benchmark

  • All five questions on 60 pre-registered books, with ties flagged
  • Ledgers add up to the engine’s capital on every book
  • The origin ledger against finite differences of capital, all 80,640 positions of the smooth main books
  • Tie answers against independently built sets on 36 kink books
  • Six published allocators and a numerical Euler control on the same books

Not yet Coming soon

  • Bank-style portfolios and real desk groupings
  • A second, independent implementation of capital
  • Timing and scaling
  • An agent-in-the-loop study

6A pre-registered benchmark

The benchmark has 60 books fixed before any method was run. There are 42 small tie books of 10–14 trades, 36 of them built to sit on one kink each and 6 smooth controls, and 18 main books of 96 trades: three draws of each of six portfolio types (ordinary, nonlinear, tail-difficult, regulatory near-tie, history-heavy, and held-out, a generator from a different rule family fixed once and never tuned). Each main book has 24 modellable factors, 256 current and 256 stressed scenarios per expected-shortfall block, 60 daily and 12 weekly stored observations, and a default law of 20,500 scenarios on 20 obligors.

The validation is deliberately asymmetric. For removal, origin, hedge choice and the smooth marginal, the engine’s own output defines the benchmark reference, so agreement with it proves nothing and is not counted. The evidence instead comes from checks that do not read the engine’s allocation: reconciliation, a separate chain-rule implementation, finite differences of the forward capital, and tie sets built independently.

7Results: capital on past dates

Past-date capital

14 smooth main books

61%

median share of capital on past observation dates; range 21–99%.

Ledger adds up

All 60 books

5.6 × 10⁻¹⁶

largest relative gap to the engine’s capital on the tie books; 4.3 × 10⁻¹⁶ on the main books.

Origin ledger vs finite differences

80,640 (date, trade) positions

80,630

agree within 10−8 at relative step 10−6; median per-book maximum error 1.7 × 10⁻¹⁰.

Capital on past observation dates, per main bookHorizontal bars for the 18 main books in six portfolio types: on the 14 smooth books, 21% to 99% of capital sits on past observation dates, median 61%. Books at a tie carry no share.Share of capital K on past observation datesOrdinaryOrdinary, draw 1: 72.1% of K = 105.39 on past dates72%Ordinary, draw 2: 56.8% of K = 127.56 on past dates57%Ordinary, draw 3: 49.0% of K = 76.42 on past dates49%NonlinearNonlinear, draw 1: 48.8% of K = 95.42 on past dates49%Nonlinear, draw 2: 57.7% of K = 94.27 on past dates58%Nonlinear, draw 3: 56.0% of K = 79.59 on past dates56%Tail-difficultTail-difficult, draw 1: 91.9% of K = 454.17 on past dates92%Tail-difficult, draw 2: 64.3% of K = 352.53 on past dates64%Tail-difficult, draw 3: 75.1% of K = 311.01 on past dates75%History-heavyHistory-heavy, draw 1: 98.6% of K = 67.88 on past dates99%History-heavy, draw 2: 95.3% of K = 84.37 on past dates95%History-heavy, draw 3: 94.0% of K = 107.54 on past dates94%Held-outHeld-out, draw 1: 47.5% of K = 97.29 on past dates47%Held-out, draw 2: 21.0% of K = 93.62 on past dates21%at a tie: no reference answerRegulatory near-tieat a tie: no reference answerat a tie: no reference answerat a tie: no reference answermedian 61%0%50%100%
Capital on past observation dates, per main bookHorizontal bars for the 18 main books in six portfolio types: on the 14 smooth books, 21% to 99% of capital sits on past observation dates, median 61%. Books at a tie carry no share.Share of capital K on past observation datesOrdinaryOrdinary, draw 1: 72.1% of K = 105.39 on past dates72%Ordinary, draw 2: 56.8% of K = 127.56 on past dates57%Ordinary, draw 3: 49.0% of K = 76.42 on past dates49%NonlinearNonlinear, draw 1: 48.8% of K = 95.42 on past dates49%Nonlinear, draw 2: 57.7% of K = 94.27 on past dates58%Nonlinear, draw 3: 56.0% of K = 79.59 on past dates56%Tail-difficultTail-difficult, draw 1: 91.9% of K = 454.17 on past dates92%Tail-difficult, draw 2: 64.3% of K = 352.53 on past dates64%Tail-difficult, draw 3: 75.1% of K = 311.01 on past dates75%History-heavyHistory-heavy, draw 1: 98.6% of K = 67.88 on past dates99%History-heavy, draw 2: 95.3% of K = 84.37 on past dates95%History-heavy, draw 3: 94.0% of K = 107.54 on past dates94%Held-outHeld-out, draw 1: 47.5% of K = 97.29 on past dates47%Held-out, draw 2: 21.0% of K = 93.62 on past dates21%at a tie: no reference answerRegulatory near-tieat a tie: no reference answerat a tie: no reference answerat a tie: no reference answermedian 61%0%50%100%
Figure 3. Capital on past observation dates, per main book. The frozen remainder as a share of K. The history-heavy books, with larger past perturbations and a smaller current book, sit highest. The four books at a tie have no reference answer, which is not a zero. Descriptive: the share is valid where an averaged history branch is active, and it is not a method comparison.

The finite-difference check differentiates the forward capital without reading the engine’s allocation, so it tests the reverse pass through stored history directly. It was run after the benchmark, on the smooth main books rebuilt from their frozen seeds. The 10 positions outside 10−8 straddle a branch change: one one-sided difference agrees and the other does not, and at step 10−7 all 10 agree within 1.4 × 10⁻⁹. On the same books a separate chain-rule implementation matches the engine’s marginal to 2.9 × 10⁻¹⁸, and central differences of K match it to 1.9 × 10⁻⁶.

8Results: ties

For the 36 books built on a kink, the reference is the set of marginals that can actually be realised, constructed without reading the engine’s allocation or its tie convention: the benchmark forces the tied branches through the graph and probes 26 generic nearby books per case. Every nearby gradient lies in the reference set, every vertex of the set is observed, and the engine’s flagged representative lies within normalised distance 1.5 × 10⁻¹⁶ of the set. The representative is therefore a valid marginal point; the engine does not yet list the complete set.

Being close is not enough at a tie. Numerical Euler returns a point within 8.0 × 10⁻⁶ of the set but does not report that the marginal is non-unique. Marginal measures return points at median distance 0.20 (maximum 0.65), and Li–Xing, on the 8 kink books where it answers, at median distance 0.19.

9What other methods answer

We implemented six published allocation rules from their source equations, plus a numerical Euler control, and ran them on the same books. Each answers at most 2 of the five questions. Most gaps are structural rather than numerical: single-trade FRTB capitals are often undefined, Li–Xing does not extend through an active stress-ratio floor, and marginal measures cover only part of the graph. Removal and hedge choice are revaluations and the origin ledger is our own construct, so an uncovered column is not a failure of the published method.

Which of the five questions each method answersTwo heat maps, main books and tie books: rows are six published allocators, a numerical Euler control and FRTBTrace; columns are the five questions. Each established method answers at most 2 of the five; FRTBTrace answers every question that has an answer.18 main booksMarginalRemovalAccountingOriginHedge choiceEuler (gradient)Euler (gradient), Marginal: 14 of 14 books answered14/14Euler (gradient), Removal: 0 of 18 books answered—Euler (gradient), Accounting: 0 of 18 books answered—Euler (gradient), Origin: 0 of 18 books answered—Euler (gradient), Hedge choice: 0 of 18 books answered—Numerical EulerNumerical Euler, Marginal: 14 of 14 books answered14/14Numerical Euler, Removal: 0 of 18 books answered—Numerical Euler, Accounting: 0 of 18 books answered—Numerical Euler, Origin: 0 of 18 books answered—Numerical Euler, Hedge choice: 0 of 18 books answered—IncrementalIncremental, Marginal: 0 of 14 books answered—Incremental, Removal: 0 of 18 books answered—Incremental, Accounting: 18 of 18 books answered18/18Incremental, Origin: 0 of 18 books answered—Incremental, Hedge choice: 0 of 18 books answered—Activity-basedActivity-based, Marginal: 0 of 14 books answered—Activity-based, Removal: 0 of 18 books answered—Activity-based, Accounting: 0 of 18 books answered—Activity-based, Origin: 0 of 18 books answered—Activity-based, Hedge choice: 0 of 18 books answered—Li–Xing 1Li–Xing 1, Marginal: 1 of 14 books answered1/14Li–Xing 1, Removal: 0 of 18 books answered—Li–Xing 1, Accounting: 1 of 18 books answered1/18Li–Xing 1, Origin: 0 of 18 books answered—Li–Xing 1, Hedge choice: 0 of 18 books answered—Li–Xing 2Li–Xing 2, Marginal: 1 of 14 books answered1/14Li–Xing 2, Removal: 0 of 18 books answered—Li–Xing 2, Accounting: 1 of 18 books answered1/18Li–Xing 2, Origin: 0 of 18 books answered—Li–Xing 2, Hedge choice: 0 of 18 books answered—Marginal measuresMarginal measures, Marginal: 14 of 14 books answered14/14Marginal measures, Removal: 0 of 18 books answered—Marginal measures, Accounting: 0 of 18 books answered—Marginal measures, Origin: 0 of 18 books answered—Marginal measures, Hedge choice: 0 of 18 books answered—FRTBTraceFRTBTrace, Marginal: 14 of 14 books answered (the reference is this engine itself)14/14 ref.FRTBTrace, Removal: 18 of 18 books answered (the reference is this engine itself)18/18 ref.FRTBTrace, Accounting: 18 of 18 books answered18/18FRTBTrace, Origin: 18 of 18 books answered (the reference is this engine itself)18/18 ref.FRTBTrace, Hedge choice: 18 of 18 books answered (the reference is this engine itself)18/18 ref.42 tie booksMarginalRemovalAccountingOriginHedge choiceEuler (gradient)Euler (gradient), Marginal: 6 of 42 books answered6/42Euler (gradient), Removal: 0 of 42 books answered—Euler (gradient), Accounting: 0 of 42 books answered—Euler (gradient), Origin: 0 of 42 books answered—Euler (gradient), Hedge choice: no book has an answernoneNumerical EulerNumerical Euler, Marginal: 42 of 42 books answered42/42Numerical Euler, Removal: 0 of 42 books answered—Numerical Euler, Accounting: 0 of 42 books answered—Numerical Euler, Origin: 0 of 42 books answered—Numerical Euler, Hedge choice: no book has an answernoneIncrementalIncremental, Marginal: 0 of 42 books answered—Incremental, Removal: 0 of 42 books answered—Incremental, Accounting: 42 of 42 books answered42/42Incremental, Origin: 0 of 42 books answered—Incremental, Hedge choice: no book has an answernoneActivity-basedActivity-based, Marginal: 0 of 42 books answered—Activity-based, Removal: 0 of 42 books answered—Activity-based, Accounting: 0 of 42 books answered—Activity-based, Origin: 0 of 42 books answered—Activity-based, Hedge choice: no book has an answernoneLi–Xing 1Li–Xing 1, Marginal: 9 of 42 books answered9/42Li–Xing 1, Removal: 0 of 42 books answered—Li–Xing 1, Accounting: 9 of 42 books answered9/42Li–Xing 1, Origin: 0 of 42 books answered—Li–Xing 1, Hedge choice: no book has an answernoneLi–Xing 2Li–Xing 2, Marginal: 9 of 42 books answered9/42Li–Xing 2, Removal: 0 of 42 books answered—Li–Xing 2, Accounting: 9 of 42 books answered9/42Li–Xing 2, Origin: 0 of 42 books answered—Li–Xing 2, Hedge choice: no book has an answernoneMarginal measuresMarginal measures, Marginal: 42 of 42 books answered42/42Marginal measures, Removal: 0 of 42 books answered—Marginal measures, Accounting: 0 of 42 books answered—Marginal measures, Origin: 0 of 42 books answered—Marginal measures, Hedge choice: no book has an answernoneFRTBTraceFRTBTrace, Marginal: 42 of 42 books answered42/42FRTBTrace, Removal: 42 of 42 books answered (the reference is this engine itself)42/42 ref.FRTBTrace, Accounting: 42 of 42 books answered42/42FRTBTrace, Origin: 42 of 42 books answered (the reference is this engine itself)42/42 ref.FRTBTrace, Hedge choice: no book has an answernoneCell: books answered / books where the question has an answer. — not applicable (structural, not a numerical failure). none: no book has an answer.Hatched: the benchmark reference is this engine’s own answer, so agreement is automatic.
Which of the five questions each method answersHeat maps for main and tie books; each established method answers at most two of the five questions.18 main booksMarginalRemovalAccount.OriginHedgeEuler (gradient)Euler (gradient), Marginal: 14 of 14 books answered14/14Euler (gradient), Removal: 0 of 18 books answered—Euler (gradient), Accounting: 0 of 18 books answered—Euler (gradient), Origin: 0 of 18 books answered—Euler (gradient), Hedge choice: 0 of 18 books answered—Numerical EulerNumerical Euler, Marginal: 14 of 14 books answered14/14Numerical Euler, Removal: 0 of 18 books answered—Numerical Euler, Accounting: 0 of 18 books answered—Numerical Euler, Origin: 0 of 18 books answered—Numerical Euler, Hedge choice: 0 of 18 books answered—IncrementalIncremental, Marginal: 0 of 14 books answered—Incremental, Removal: 0 of 18 books answered—Incremental, Accounting: 18 of 18 books answered18/18Incremental, Origin: 0 of 18 books answered—Incremental, Hedge choice: 0 of 18 books answered—Activity-basedActivity-based, Marginal: 0 of 14 books answered—Activity-based, Removal: 0 of 18 books answered—Activity-based, Accounting: 0 of 18 books answered—Activity-based, Origin: 0 of 18 books answered—Activity-based, Hedge choice: 0 of 18 books answered—Li–Xing 1Li–Xing 1, Marginal: 1 of 14 books answered1/14Li–Xing 1, Removal: 0 of 18 books answered—Li–Xing 1, Accounting: 1 of 18 books answered1/18Li–Xing 1, Origin: 0 of 18 books answered—Li–Xing 1, Hedge choice: 0 of 18 books answered—Li–Xing 2Li–Xing 2, Marginal: 1 of 14 books answered1/14Li–Xing 2, Removal: 0 of 18 books answered—Li–Xing 2, Accounting: 1 of 18 books answered1/18Li–Xing 2, Origin: 0 of 18 books answered—Li–Xing 2, Hedge choice: 0 of 18 books answered—Marginal measuresMarginal measures, Marginal: 14 of 14 books answered14/14Marginal measures, Removal: 0 of 18 books answered—Marginal measures, Accounting: 0 of 18 books answered—Marginal measures, Origin: 0 of 18 books answered—Marginal measures, Hedge choice: 0 of 18 books answered—FRTBTraceFRTBTrace, Marginal: 14 of 14 books answered (the reference is this engine itself)14/14FRTBTrace, Removal: 18 of 18 books answered (the reference is this engine itself)18/18FRTBTrace, Accounting: 18 of 18 books answered18/18FRTBTrace, Origin: 18 of 18 books answered (the reference is this engine itself)18/18FRTBTrace, Hedge choice: 18 of 18 books answered (the reference is this engine itself)18/1842 tie booksMarginalRemovalAccount.OriginHedgeEuler (gradient)Euler (gradient), Marginal: 6 of 42 books answered6/42Euler (gradient), Removal: 0 of 42 books answered—Euler (gradient), Accounting: 0 of 42 books answered—Euler (gradient), Origin: 0 of 42 books answered—Euler (gradient), Hedge choice: no book has an answernoneNumerical EulerNumerical Euler, Marginal: 42 of 42 books answered42/42Numerical Euler, Removal: 0 of 42 books answered—Numerical Euler, Accounting: 0 of 42 books answered—Numerical Euler, Origin: 0 of 42 books answered—Numerical Euler, Hedge choice: no book has an answernoneIncrementalIncremental, Marginal: 0 of 42 books answered—Incremental, Removal: 0 of 42 books answered—Incremental, Accounting: 42 of 42 books answered42/42Incremental, Origin: 0 of 42 books answered—Incremental, Hedge choice: no book has an answernoneActivity-basedActivity-based, Marginal: 0 of 42 books answered—Activity-based, Removal: 0 of 42 books answered—Activity-based, Accounting: 0 of 42 books answered—Activity-based, Origin: 0 of 42 books answered—Activity-based, Hedge choice: no book has an answernoneLi–Xing 1Li–Xing 1, Marginal: 9 of 42 books answered9/42Li–Xing 1, Removal: 0 of 42 books answered—Li–Xing 1, Accounting: 9 of 42 books answered9/42Li–Xing 1, Origin: 0 of 42 books answered—Li–Xing 1, Hedge choice: no book has an answernoneLi–Xing 2Li–Xing 2, Marginal: 9 of 42 books answered9/42Li–Xing 2, Removal: 0 of 42 books answered—Li–Xing 2, Accounting: 9 of 42 books answered9/42Li–Xing 2, Origin: 0 of 42 books answered—Li–Xing 2, Hedge choice: no book has an answernoneMarginal measuresMarginal measures, Marginal: 42 of 42 books answered42/42Marginal measures, Removal: 0 of 42 books answered—Marginal measures, Accounting: 0 of 42 books answered—Marginal measures, Origin: 0 of 42 books answered—Marginal measures, Hedge choice: no book has an answernoneFRTBTraceFRTBTrace, Marginal: 42 of 42 books answered42/42FRTBTrace, Removal: 42 of 42 books answered (the reference is this engine itself)42/42FRTBTrace, Accounting: 42 of 42 books answered42/42FRTBTrace, Origin: 42 of 42 books answered (the reference is this engine itself)42/42FRTBTrace, Hedge choice: no book has an answernoneBooks answered / books with an answer.— not applicable; none: no book has an answer.Hatched: the reference is this engine itself.
Figure 4. Which questions each method answers. Books answered over books where the question has an answer. Shading shows coverage, not accuracy. On the main books, 14 of 18 have a marginal reference; on the tie books no hedge-choice question has an answer, because every tie book has a candidate outside capital’s domain.

The comparison is about the interface, not a ranking of accuracy. Only incremental allocation supplies a full-capital ledger on every main book, and none of the established methods says which question its vector answers. On the smooth main books, marginal measures differ from the exact marginal by up to 0.50 (median 0.083).

10One book, audited

One ordinary main book shows why the type of an answer matters. Its capital is 105.39. The origin ledger puts 75.98 (72.1%) on past dates, so today’s-book sensitivities account for 29.41. Removal effects and candidate actions can still be answered by revaluation, but Shapley values over trades have no answer: 77 of the 96 single-trade capitals they need are unavailable.

Audit record for one main bookCapital after each of eight candidate actions on one main book; removing one random subset gives the lowest capital, 92.48. Below, the current capital 105.39 split into 75.98 on past dates and the rest on today.Capital K after each candidate action (library 1 of 40)1. keep the current bookkeep the current book: K = 105.39105.392. halve the largest positionhalve the largest position: K = 105.38105.383. remove a random subset of tradesremove a random subset of trades: K = 96.3796.374. remove a random subset of tradesremove a random subset of trades: K = 103.53103.535. remove a random subset of tradesremove a random subset of trades: K = 92.4892.486. scale a random subset by 1.5scale a random subset by 1.5: K = 110.69110.697. scale a random subset by 1.5scale a random subset by 1.5: K = 115.83115.838. scale the current book by 1.02scale the current book by 1.02: K = 107.05107.0580100120Current book: K = 105.39, of which 75.98 (72.1%) on past datespast datestoday 29.41
Audit record for one main bookCapital after each of eight candidate actions on one main book; removing one random subset gives the lowest capital, 92.48. Below, the current capital 105.39 split into 75.98 on past dates and the rest on today.Capital K after each candidate action (library 1 of 40)1. keep the current bookkeep the current book: K = 105.39105.392. halve the largest positionhalve the largest position: K = 105.38105.383. remove a random subset of tradesremove a random subset of trades: K = 96.3796.374. remove a random subset of tradesremove a random subset of trades: K = 103.53103.535. remove a random subset of tradesremove a random subset of trades: K = 92.4892.486. scale a random subset by 1.5scale a random subset by 1.5: K = 110.69110.697. scale a random subset by 1.5scale a random subset by 1.5: K = 115.83115.838. scale the current book by 1.02scale the current book by 1.02: K = 107.05107.0580100120Current book: K = 105.39, of which 75.98 (72.1%) on past datespast datestoday 29.41
Figure 5. Audit record for one main book. Exact capital after each of 8 candidate actions in one of the book’s 40 action libraries; removing one random subset gives the unique lowest capital, 92.48. These are answers to different audit questions, not competing estimates of one attribution vector.

11Certified selective repricing specialist

On books whose options belong to a convex single-factor class, a certified approximation can reprice only the tail scenarios it cannot bound and still return the exact engine’s answer. Of 12 option books, 6 are in that class (American options at low volatility and at high nonlinearity); the basket and barrier books are declared not applicable. On all 6, the certified output matches the exact engine’s marginal and origin allocations within 2.2 × 10⁻¹⁶, bit for bit on 1. This is a specialist result: it says nothing about speed, and it covers no removal or hedge-choice question.

12Limitations and what didn’t work

Scope

  • Synthetic books. Every book is synthetic, with at most 96 trades on 24 factors, so nothing is shown about bank-size portfolios. The non-modellable and default charges come from declared synthetic models, standardised-approach capital is a homogeneous stand-in with exact Euler allocations rather than the regulatory formula, and the multiplier on the averaged internal-models charge is fixed at 1.5 (no backtesting add-on).
  • Exact, but relative to a choice. The ledger is exact relative to the implemented calculation and its allocation rule, up to double-precision rounding. It is not a regulatorily prescribed attribution. Adding up to K is an accounting property, not a test of faithfulness: the amber surcharge contains a zero-sum term whose omission leaves every total unchanged while changing desk subtotals.
  • Groupings. Re-summing into desk, product or risk-class views is proved for declared remaps, but only the identity remap (each past position mapped to its current trade) has been exercised.

What the evidence does not show

  • What the past-date share measures. A frozen remainder exists only while an averaged history branch binds, and one binds on all 14 smooth main books. The share therefore describes that regime and the synthetic generator (the history-heavy type was built so that the averaged branches dominate), not a typical bank. No sensitivity analysis over the multiplier or the history process has been run.
  • No second implementation of capital. Reconciliation is checked against the engine’s own K. For removal, origin, hedge choice and the smooth marginal, the benchmark reference is the engine itself, so its answers there agree by construction (hatched in Figure 4) and are not wins.
  • Ties. At a tie the engine returns one flagged valid representative chosen by a declared convention; it does not enumerate the complete marginal set of the whole graph, and the realisable set is built only on the small tie books, by the benchmark. One returned element does not represent all valid alternatives. Its default-risk and stress-charge nodes can list realisable vertices, but on one audited book it declines some single-trade capitals at its default-risk enumeration limit.
  • No speed claim. No authoritative timing was obtained, so nothing is claimed about speed or scaling, for the exact engine or for certified repricing.
  • Approximations. The certified repricing certifier has not had the adversarial review the tool contract requires and lacks an explicit pricer-error term. A separate adaptive certified approximation accumulated 4 distinct failure modes across 3 rounds of review by language models and was never run on the benchmark; it is not a result.
  • An exploratory agent prototype. 12 fresh runs of one language model (Claude Opus 5.5) answered questions on 9 calibration books, half with the engine and half with conventional bump-and-revalue tools. They passed 94 of 94 items with the engine and 76 of 94 without. The whole gap is the 18 desk-accounting items, which the conventional tools cannot answer uniquely by design, so it is not evidence of a capability gain. The agents proposed and executed no trades, and no deployed agent was evaluated.
  • Shapley values are never computed. “No answer” for coalition values rests on the benchmark’s domain convention, under which most single-trade sub-books have no defined capital. A different convention for small sub-books, for example extending capital below its domain, would give values; none has been computed.

Implementation and reproducibility

  • Private code. The implementation and result files are held in a private repository and are not released.
  • After the benchmark. The finite-difference check of the origin ledger was run after the benchmark, on books rebuilt from the frozen seeds (rebuilt capital within 1.4 × 10⁻¹⁴ of the frozen values). At the larger step 10−4, many more entries exceed 10−8, because a branch change falls inside the step.

13What comes next

These directions come from the papers’ own priorities for validation; none has been run.

  1. An independent check of capital

    A second implementation of K, so that agreement is no longer self-referenced, and the complete set of realisable marginals at ties rather than one representative.

  2. Real books and desk views

    Bank-style portfolios with real management remaps and groupings, reviewed error accounting for any approximation, and backtests of expected-shortfall contributions over time.

  3. Agents in the loop

    The typed answers, outcome codes and guarantees exposed through a tool protocol, and a full agent-in-the-loop study with timing and scaling measured.

Part 3 · Technical details

14The capital formula

Expected shortfall at β=0.025 of the loss vector z=Lw, with scenario weights p and caps cs=ps/β, in its primal and dual forms:

ρ(z)=minτ{τ+β−1∑sps(zs−τ)+} ρ(z)=max{q⊤z:0≤q≤c, 1⊤q=1}

Blocks ec,v,j for risk class c, factor set v and liquidity horizon j aggregate as Ec,v=(∑jajec,v,j2)1/2 with a=(1,1,2,2,6). The floored stress ratio and the internal-models charge are

Gc=Scmax(1,Fc/Rc) I=12G0+12∑c=15Gc

where Sc, Fc and Rc are Ec,v on the reduced stressed, full current and reduced current factor sets. With stress-charge groups ξ,η,ζ and correlation r=0.6, the non-modellable charge is N=‖ξ‖2+‖η‖2+ζ⊤Qζ with Q=(1−r2)Id+r211⊤. Default risk is the 99.9% quantile d of a finite law of default losses. History enters through

CA=max{It−1+Nt−1, 1.5I¯60+N¯60} CD=max{dlatest, d¯12w} J=CA+CD

and final capital is

K=min{J+H+CU, Z}+(J−B)+ H=U2V(B−J)+

where B, CU and Z are standardised-approach capitals for in-model, out-of-model and all desks, and U/(2V) is the amber coefficient.

15Node rules and identities

Allocations propagate node by node: Ab=∑jcbjAj over the children of node b, with coefficients that depend on node values but not on allocations. The rules are the dual weights w⊙L⊤q at each expected shortfall; ∑j(ajej/E)Aej at the horizons; at the stress ratio AS when F<R, FRAS+SRAF−SFR2AR when F>R, and a declared tie weight λ∈[0,1] between them at a tie; the active scenario row at the default quantile; and the active branch, or a declared tie weight, at every maximum, minimum and positive part.

  • Recursive reconciliation. On a finite directed acyclic graph, if every leaf allocation reconciles and every node rule satisfies the Euler condition ∑jcbjθjfj=θbfb, every node allocation reconciles. Under scenario linearity, positive homogeneity of degree one, a valid domain, homogeneous standardised-approach inputs with reconciling allocations, and stored history (assumptions A1–A5 of the papers), 1⊤AK=K, including at ties for any declared tie weights.
  • Re-summing. For any declared nonnegative remap P with 1⊤P=1⊤, and any grouping of the same kind, the remapped or grouped ledger still adds up to K.
  • Smooth points. Where every maximum, minimum, floor and quantile is strict and every expected-shortfall dual is unique, AK=x⊙∇K: the ledger is the gradient (Euler) allocation, and the frozen-remainder identity of section 3 gives today’s block exactly.
  • What does not add up. Removal effects need not sum to K; at ties only jointly realisable branch choices are valid marginal points, and independent local choices can add up to K while lying outside the true marginal set.

16Full tables

Main books

Portfolio typeSeedCapital KOn past datesShare of K
Ordinary94101105.3975.9872.1%
Ordinary94202127.5672.5056.8%
Ordinary9430376.4237.4449.0%
Nonlinear9410195.4246.6148.8%
Nonlinear9420294.2754.4357.7%
Nonlinear9430379.5944.5656.0%
Tail-difficult94101454.17417.2091.9%
Tail-difficult94202352.53226.7364.3%
Tail-difficult94303311.01233.6975.1%
History-heavy9410167.8866.9298.6%
History-heavy9420284.3780.4495.3%
History-heavy94303107.54101.1094.0%
Held-out9410197.2946.2047.5%
Held-out9420293.6219.6921.0%
Held-out9430399.76at a tie: no reference answer
Regulatory near-tie9410166.57at a tie: no reference answer
Regulatory near-tie9420284.15at a tie: no reference answer
Regulatory near-tie94303138.16at a tie: no reference answer

Questions answered, per method

Books answered over books with an answer, main books then tie books
MethodMarginalRemovalAccountingOriginHedge choice
Analytical Euler (gradient) allocation14/14 · 6/420/18 · 0/420/18 · 0/420/18 · 0/420/18 · no answer
Numerical Euler (central differences), a control14/14 · 42/420/18 · 0/420/18 · 0/420/18 · 0/420/18 · no answer
Balog et al. incremental allocation0/14 · 0/420/18 · 0/4218/18 · 42/420/18 · 0/420/18 · no answer
Activity-based allocation0/14 · 0/420/18 · 0/420/18 · 0/420/18 · 0/420/18 · no answer
Li–Xing Method 11/14 · 9/420/18 · 0/421/18 · 9/420/18 · 0/420/18 · no answer
Li–Xing Method 21/14 · 9/420/18 · 0/421/18 · 9/420/18 · 0/420/18 · no answer
Schulze marginal measures14/14 · 42/420/18 · 0/420/18 · 0/420/18 · 0/420/18 · no answer
FRTBTrace exact engine14/14 · 42/4218/18 · 42/4218/18 · 42/4218/18 · 42/4218/18 · no answer

Each cell: main books · tie books, books answered over books where the question has an answer. Coalition (Shapley) values have no answer on any book for any method and are left out.

17Reproducibility notes

Benchmark results are read from frozen result files by a script that checks each file’s SHA-256 hash.

Tie books
Core results, tier S: SHA-256 prefix 8747184b
Main books
Core results, tier M: 717cdf51
Option books
Certified selective repricing: 37d6d63e
Summary scores
4474986f
Finite-difference check
Summary 074389be, residual diagnosis 084b9c12; 14 books, 60 dates × 96 trades each
Source revision
Private repository, commit 61cba9e56a

Summary

18In brief

Design

Requests for a trade-level explanation of capital are sorted into five types before anything is computed. One forward and one reverse pass through the regulatory formula give a ledger indexed by stored date and trade, while what-if and action questions are revalued exactly.

Results

On 60 synthetic books the ledgers balance to the engine’s capital at the level of rounding error, and each established method covers no more than 2 of the five request types. On the typical smooth main book, 61% of the charge traces back to positions held on earlier dates.

Open questions

Whether the same holds on real bank portfolios, against an independent implementation of capital, and with the complete set of marginals at ties; and what it costs in time. Details are under Limitations and what didn’t work.

19Sources

Paper: Exact Trade-Level Attribution of FRTB-IMA Capital, arXiv 2609.32238, 26 September 2026. [arXiv]

Workshop papers, ICAIF 2026 (Milan, 14–15 November 2026), both accepted: Auditable FRTB Capital Explanations: A Tool Contract for Financial AI Agents (Yuhe Sui), Workshop on Responsible AI Operations for Finance; and What Post-hoc Attributions of FRTB-IMA Capital Answer (Yuhe Sui, Yingzhi Tang), Workshop on Interpretability and Alignment in Financial Models. ICAIF 2026 news →

The finite-difference check of the origin ledger and the agent prototype appear in the RAIOps4Fin paper, which is newer than the arXiv version; the agent prototype is exploratory.

Back to top ↑