QRS research · Regulatory capital · Explainable finance
FRTBTrace
Exact trade-level attribution of FRTB-IMA capital
Trade-level explanations of FRTB market-risk capital, one question at a time.
The usual way to explain a bank’s FRTB market-risk capital trade by trade is to compute one attribution vector, typically a gradient or a published allocation rule, and use it for everything: desk reports, what-if screening, trade rankings. FRTBTrace separates the five questions that vector is asked to answer and computes each one exactly through the implemented internal-models calculation, keeping track of the past observation date each part of the capital comes from.
Details
Please help me understand FRTBTrace, a research project on exact trade-level attribution of FRTB-IMA capital.
Project page: https://qrsntu.org/projects/frtbtrace/
How it works: https://qrsntu.org/projects/frtbtrace/details/
Plain-text summary: https://qrsntu.org/projects/frtbtrace/summary.md
Paper (arXiv): https://arxiv.org/abs/2609.32238
Design
FRTBTrace attributes market-risk capital under the internal-models approach of the Fundamental Review of the Trading Book (FRTB-IMA) to individual trades. Instead of one attribution vector reused for every purpose, it types the question first: marginal impact, removal effect, accounting allocation, historical origin or hedge choice. The full capital calculation (expected shortfall, stress ratio, non-modellable and default-risk charges, history maxima, standardised-approach comparison) is written as a graph over (observation date, trade) positions. After one forward evaluation that records the active branch at every nonsmooth node, one reverse pass propagates allocations by local Euler rules, giving a ledger that adds up to the computed capital K under stated homogeneity assumptions. Removal and hedge-choice questions are answered by exact revaluation, and ties are flagged instead of being reported as a unique marginal.
Key results
- Synthetic, pre-registered benchmark of 60 books: 42 small tie books (36 built on a kink) and 18 main books of 96 trades.
- On the 14 smooth main books, 21-99% of capital (median 61%) sits on past observation dates, outside any sensitivity to today's book.
- The accounting and origin ledgers reconcile to the engine's own capital within relative error 5.6e-16 (tie books) and 4.3e-16 (main books).
- A finite-difference check of the origin ledger over all 80,640 (date, trade) positions of the smooth main books: 80,630 agree within 1e-8 at relative step 1e-6; the other 10 straddle a branch change and agree within 1.4e-9 at step 1e-7.
- Six published allocators and a numerical Euler control each answer at most 2 of the five questions; FRTBTrace answers every question the benchmark defines an answer for.
- After the benchmark, Shapley values over trades were computed under two declared conventions for sub-books outside the formula's domain: exactly on the tie books and from 1,000 permutation pairs on each main book, where the largest per-trade difference between the two conventions is a median 2.9% of K (sampled, so biased upward). On a synthetic book of 960 trades all five questions were answered, removal on every trade and hedge choice in every action library.
One attribution, step by step: evaluate capital once through the graph, record the active branch at each floor and maximum, carry the allocation back in one reverse pass, and read the ledger on (date, trade) positions.Capital K is evaluated once through the graph over stored books; one reverse pass carries the allocation back to every (date, trade) position, and the ledger adds up to K.Illustrative numbers; the benchmark’s main books have 96 trades and 60 stored dates.
FRTBTrace at a glance
The idea
Write the whole capital calculation as one graph over (observation date, trade) positions. A forward pass records which branch is active at every floor, maximum and minimum; one reverse pass then carries the allocation back to every position. The resulting ledger adds up to capital:
Sensitivities to today’s book miss exactly the part on past dates. Removal effects and hedge choices are answered by exact revaluation, and ties are flagged rather than hidden.
Experiments
Synthetic benchmark · 60 books tested
Capital on past dates, median
61%
Range, 14 smooth main books
21–99%
Ledger adds up to K, max error
5.6 × 10⁻¹⁶
Benchmark-defined questions answered
all · others ≤ 2 of five
Pre-registered: 42 small tie books and 18 main books of 96 trades, compared with six published allocators and a numerical Euler control.
After the benchmark: Shapley values over trades under two declared conventions, and every question answered on a synthetic book of 960 trades.
Bank portfolios Coming soon
Every book so far is synthetic. Real portfolios with real desk groupings, an independent implementation of capital and timing measurements come next.
Capital on past observation dates, per main book. On the 14 smooth main books, 21–99% of capital (median 61%) sits on books held on earlier dates, so no sensitivity to today’s positions can account for it. Books at a tie have no reference share. More results →