[{"step":0,"generation":0,"created_at":"2026-09-20T09:44:05.482Z","event":{"content":"New agent session \"balmy-sheep\" started at 2026-09-20T09:44:05Z. You are a sub-agent 1 level(s) below the run's root: main-agent → balmy-sheep.","marker":"new_session","type":"system"}},{"step":0,"generation":0,"created_at":"2026-09-20T09:44:05.486Z","event":{"content":"You are an expert AI Research Agent capable of reasoning, planning, and independently executing complex, long-horizon research tasks that may span hours or days. You are also a highly capable programmer, primarily proficient in Python. Your objective is to achieve the best possible outcomes under specific resource constraints (time and compute) by employing a rigorous, principled research methodology.\n\n**METHODOLOGY 1: WELL-DEFINED FOCUSED TASKS**\nWhen executing tasks with clear success criteria, strictly follow this linear pipeline:\n1. **Understand:** Gather context, define the goal, and review constraints.\n2. **Plan:** Formulate a step-by-step approach before writing any code.\n3. **Implement:** Prototype, write code and tests, fix test failures and lint errors.\n4. **Evaluate:** Experiment, debug, and analyze the results.\n5. **Conclude:** Document your findings and finalize the deliverable.\n\n**METHODOLOGY 2: OPEN-ENDED RESEARCH TASKS**\nWhen tackling open-ended research without strict \"success\" criteria, you must adhere to the following workflow practices:\n* **Context Gathering:** Always begin by absorbing the task definition and background knowledge. Deeply familiarize yourself with the relevant codebase, existing literature, and documentation.\n* **Literature Survey & Idea Generation:** Spawn parallel sub-agents to conduct a thorough survey of the state-of-the-art. Common sources include the Internet, available documentation, and codebase. Use these findings to generate a list of promising directions by adapting new research, combining existing ideas, or developing entirely novel approaches.\n* **Ambitious & Iterative Planning:** Formulate a dynamic, iterative research plan. Prioritize ambitious, high-impact, and novel research directions. Dedicate 80% of your effort to high-risk/high-reward exploration, falling back to incremental improvements for the final 20% of your time only if necessary.\n* **Parallel Exploration:** Select 3-5 most promising research directions and spawn parallel sub-agents (using 'link' workspace mode) to explore each as a focused task. Evaluate the outcomes, then iterate and build upon the strongest results from previous cycles. Keep your focus on the research scope and ambitious goal, be critical if the sub-agents want to abandon the task with half-baked results.\n* **Version Control Discipline:** Use VCS rigorously to manage important milestones. Prefer workspace-local VCS commits over changelists (CLs) unless explicitly instructed otherwise.\n* **State Management:** Continuously monitor and log your overall progress, the status of individual sub-tasks, and your alignment with the overarching project goals.\n* **Sub-agent Discipline:** Avoid delegating indefinitely. At 3+ levels deep, prefer doing the work yourself over sub-agent delegation.\n\n## Execution principles\n\n- **Maximize scope.** Be ambitious and exhaust the promising avenues before concluding something is impossible.\n- **Finish the task.** Don't stop early on a self-imposed constraint. Validate any \"this is blocked\" hypothesis before abandoning it. If your result falls short of the objective, close the gap rather than concluding with an acknowledgment of the shortfall.\n- **Stay sustainable.** Your speed produces a lot of code; to survive hundreds of iterations it must be clean, modular, and easy to extend.\n- **Optimize the feedback loop.** Prefer fast local checks (build, unit test, run) over slow remote jobs; fail early and cheaply.\n\n## Coding principles\n\nKeep the codebase easy to maintain and evolve:\n\n- **Code over prose.** Prefer self-explanatory code to explanation; prefer an explicit\n  interface, a check, or a test to a sentence promising the same thing.\n- **Lean comments.** Document the non-obvious \"why\"; never restate what the code says.\n  One line is the target — a paragraph needs a reason. Historical context goes in the\n  commit message, not the code.\n- **Comments rot silently.** Nothing lints them. State a fact once, next to the code\n  that owns it, and cross-reference rather than repeat.\n\n## Tool usage strategy\n\n- **Prefer specialized tools over bash.** When a purpose-built tool exists (file view/edit, full-text search, session inspection, recall), use it instead of shelling out — the results are cleaner and cheaper.\n- **Learn on the fly.** If a task needs an unfamiliar tool, CLI, skill, path, or resource, use `recall_search` to find a relevant skill or lesson *before* proceeding. Never declare you can't do something before checking your skills.\n- **Don't busy-poll a long job — background it and wait to be woken.** For work whose timing you don't control (a long build/test/experiment, a file appearing, a metric crossing a threshold), launch a detached background script that captures output and notifies you on completion, then `await_event` to park until it reports back. The script reaches you via `amplio-notify \"<message>\"` (delivered to your own session; add `--session=<id>` to target another, or pipe a long body via `amplio-notify -`). Canonical one-shot recipe (a single detached subshell runs the command, saves stdout/stderr to the run's scratch dir, and notifies with the exit code + paths when it finishes):\n\n  ```bash\n  J=\"$AMPLIO_ARTIFACT_DIR/job-$(date +%s)\"\n  ( <your long command> >\"$J.out\" 2>\"$J.err\"; amplio-notify \"job done (exit $?): out=$J.out err=$J.err\" ) &\n  ```\n\n  Then call `await_event` to wait for it efficiently. Periodic/conditional variant: loop with a `sleep` inside the subshell and notify only when your condition holds (e.g. `while ! grep -q DONE \"$LOG\"; do sleep 10; done; amplio-notify \"ready\"`). A notification wakes you if you're parked in `await_event`, and revives you if you've gone idle or are awaiting; it does **not** revive you once you have concluded (or crashed/been cancelled) — the environment cannot resurrect a finished agent. When woken, read the captured output with `view_file`.\n\n- **Every notification must carry news, and no notifier may run forever.** Send one when something changed that you would actually act on — not heartbeats (\"still running\", \"3/7 done\") and never from an unbounded loop. Each notification wakes you and is replayed verbatim in your context on every later turn, so uninformative ones crowd out the informative one. The server caps notification per session step and refuses beyond that (`amplio-notify` exits 3 with `env_notice_capped` on stderr — match that to stop a loop). Give any watcher an exit condition, and **kill the ones you started before you finish**.\n\n\n## Sub-agent strategy\n\nUse `spawn_agent` to delegate work. It returns immediately and the sub-agent runs in parallel, delivering its final result as a message when it finishes.\n\n- **Workspace mode.** `share` (default): the sub-agent works in the *same* workspace — best for read-only or information-gathering tasks (avoid concurrent edits). `link`: an isolated linked workspace (git/jj worktree or CitC link) with independent file edits but shared history — best for spawning several parallel coding attempts that must not clobber each other.\n- **Share via the artifact dir.** All sub-agents share the run's artifact directory; use it as scratch space — e.g. a parent-written plan read by every child, and per-child result files read back by the parent.\n- **Coordinate, don't poll.** Use `send_message` (always naming the target session id) to talk to another session, `await_event` to park until a child finishes or the operator messages you, and `session_peek` only when you suspect a child is stuck. Don't expect results the instant you spawn.\n- **Act and wait in one turn.** `await_event` can be called in the *same* step as the action that will produce the event — e.g. `spawn_agent` + `await_event`, `send_message` + `await_event`, or launching a background `bash` job + `await_event`. This blocks the turn until the work reports back, instead of spending a separate turn just to wait.\n- **A sub-agent can be re-engaged in any state.** `send_message` reaches it whether it is live (running or parked) or stopped (`idle`/`concluded`/`crashed`/`cancelled`); if it has stopped, your message revives it with its full prior context intact (a status like `concluded` just means it finished its last turn, not that it's gone). Prefer this to re-spawning a fresh agent when you want to ask a follow-up question or hand more work to a child with existing context.\n- **Delegate less the deeper you are.** Your step-0 bootstrap message says how many levels below the run's root you are. Avoid delegating indefinitely. **At 3 or more levels deep, do the work yourself**. Spawn at that depth only when the work genuinely splits into parallel parts you cannot do sequentially, and then tell each child to do its part itself rather than delegating again.\n\n\n## Completion\n\nWhen the overarching task is completely finished, give your final summary in plain text with NO tool calls — the absence of tool calls signals completion. Be concise and direct about the final state.\n\n**ARTIFACT DIRECTORY**\nYou have a per-run private scratch directory at the absolute path in the `$AMPLIO_ARTIFACT_DIR` environment variable — separate from your working directory (the user's project). Use it for plan files, intermediate analysis, notes, and anything you want sub-agents (or your future self after a context compaction) to read. When you share these artifacts with the user, always format the *full path*: $AMPLIO_ARTIFACT_DIR/path/to/file. The UI will linkify it into a helpful link for the user.","marker":"system_prompt","type":"system"}},{"step":0,"generation":0,"created_at":"2026-09-20T09:44:05.493Z","event":{"content":"Working directory: `/work`\nThis workspace is shared with the parent session `main-agent`.","marker":"workspace","type":"system"}},{"step":0,"generation":0,"created_at":"2026-09-20T09:44:05.495Z","event":{"content":"Focused parallel accounting reconciliation. Packet /packet/packet.json authority; extracted documents and state/parameters/policy in /work/data/artifacts/qyaws7fs. Read complete report schema docs/schemas/daily-report.schema.json and relevant accounting docs. Derive current-parent accounting section including revaluation postings, statutory/management bridges, attribution and terminal fields with exact DAILY_RECOGNITION/ATTRIBUTION citations. Reconcile prior receipts /work/receipts; opening trades inherited, not ours. Produce /work/data/artifacts/qyaws7fs/accounting_section.json {accounting:...} plus clear derivation notes. No executing actions, no practice calculator live book, no editing main final envelope. Need exact values Decimal per docs and zero trial balances.","type":"user"}},{"step":1,"generation":0,"created_at":"2026-09-20T09:45:19.546Z","event":{"stop_reason":"tool_calls","tool_calls":[{"id":"call_ff87647ca48b5298a4d06a8967df726b","name":"view_file","arguments":"{\"path\":\"/work/docs/schemas/daily-report.schema.json\",\"show_anchors\":false}"}],"type":"assistant","usage":{"prompt_tokens":4356,"completion_tokens":33,"total_tokens":4389}}},{"step":1,"generation":0,"created_at":"2026-09-20T09:45:19.547Z","event":{"content":"Error: stat /work/docs/schemas/daily-report.schema.json: no such file or directory","is_error":true,"tool_call_id":"call_ff87647ca48b5298a4d06a8967df726b","type":"tool_result"}},{"step":2,"generation":0,"created_at":"2026-09-20T09:47:26.155Z","event":{"stop_reason":"tool_calls","tool_calls":[{"id":"call_993bd682080952f8be24b932e698e836","name":"bash","arguments":"{\"command\":\"pwd; ls -la /work; ls -la /work/data/artifacts/qyaws7fs; ls -la /packet; find /work -path '*daily-report.schema.json' -o -path '*DAILY_RECOGNITION*' -o -path '*ATTRIBUTION*'\",\"timeout\":300,\"max_output_length\":12000}"}],"type":"assistant","usage":{"prompt_tokens":4419,"completion_tokens":90,"total_tokens":4509,"cache_read_tokens":4354}}},{"step":2,"generation":0,"created_at":"2026-09-20T09:47:26.169Z","event":{"content":"STDOUT:\n/work\ntotal 0\ndrwx------ 1 amplio amplio 140 Sep 20 09:40 .\ndrwxr-xr-x 1 root   root   240 Sep 20 09:40 ..\ndrwx------ 1 amplio amplio  40 Sep 20 09:40 artifacts\ndrwx------ 1 amplio amplio 240 Sep 20 09:40 data\ndrwx------ 1 amplio amplio  40 Sep 20 09:40 home\ndrwx------ 1 amplio amplio  60 Sep 20 09:40 receipts\ndrwx------ 1 amplio amplio  80 Sep 20 09:47 tmp\ntotal 2457\ndrwx------ 1 amplio amplio     280 Sep 20 09:44 .\ndrwx------ 1 amplio amplio      60 Sep 20 09:40 ..\n-rw------- 1 amplio amplio     848 Sep 20 09:41 calculator.json\n-rw------- 1 amplio amplio  140330 Sep 20 09:42 case.json\ndrwx------ 1 amplio amplio     140 Sep 20 09:42 documents\n-rw------- 1 amplio amplio   13984 Sep 20 09:42 family.json\n-rw------- 1 amplio amplio   57315 Sep 20 09:42 parameters.json\n-rw------- 1 amplio amplio     665 Sep 20 09:41 phases.json\n-rw------- 1 amplio amplio    1632 Sep 20 09:44 plan.md\n-rw------- 1 amplio amplio   30093 Sep 20 09:41 policy.json\n-rw------- 1 amplio amplio  842653 Sep 20 09:41 public_inputs.json\n-rw------- 1 amplio amplio 1364456 Sep 20 09:41 quotes.json\n-rw------- 1 amplio amplio      97 Sep 20 09:41 receipt_window.json\n-rw------- 1 amplio amplio   61294 Sep 20 09:41 state.json\ntotal 2864\ndr-xr-xr-x 1 root root     200 Sep 20 09:40 .\ndrwxr-xr-x 1 root root     240 Sep 20 09:40 ..\n-r-xr-xr-x 1 root root    7086 Sep 20 09:40 calculator.py\n-r--r--r-- 1 root root     745 Sep 20 09:40 manifest.json\n-r--r--r-- 1 root root 2921009 Sep 20 09:40 packet.json\n-r--r--r-- 1 root root    2520 Sep 20 09:40 practice-inputs.json\n/work/data/artifacts/qyaws7fs/documents/schemas/daily-report.schema.json\n\n\nSTATUS:\nFinished normally at 2026-09-20T09:47:26Z (elapsed=0.01s)","tool_call_id":"call_993bd682080952f8be24b932e698e836","type":"tool_result"}},{"step":3,"generation":0,"created_at":"2026-09-20T09:50:06.856Z","event":{"stop_reason":"tool_calls","tool_calls":[{"id":"call_1e56fb75427f5b53aae3ec55da4e474e","name":"view_file","arguments":"{\"path\":\"/work/data/artifacts/qyaws7fs/documents/schemas/daily-report.schema.json\",\"show_anchors\":false}"}],"type":"assistant","usage":{"prompt_tokens":5142,"completion_tokens":42,"total_tokens":5184,"cache_read_tokens":4417}}},{"step":3,"generation":0,"created_at":"2026-09-20T09:50:06.859Z","event":{"content":"File: /work/data/artifacts/qyaws7fs/documents/schemas/daily-report.schema.json\n   1: {\n   2:   \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n   3:   \"$id\": \"urn:back-to-back-funding:daily-book.v2\",\n   4:   \"title\": \"Settled parent-checkpoint financial and institutional assertions\",\n   5:   \"description\": \"Five financial sections use exact current-source assertions. Legal, compliance, structure and recommendation sections use entailed premises, independent client outcomes and supported alternatives, never exact reference prose.\",\n   6:   \"type\": \"object\",\n   7:   \"additionalProperties\": false,\n   8:   \"required\": [\n   9:     \"schema_version\",\n  10:     \"parent_state_hash\",\n  11:     \"rates\",\n  12:     \"credit_xva\",\n  13:     \"capital\",\n  14:     \"liquidity\",\n  15:     \"accounting\",\n  16:     \"legal\",\n  17:     \"compliance\",\n  18:     \"structure\",\n  19:     \"recommendation\"\n  20:   ],\n  21:   \"properties\": {\n  22:     \"schema_version\": {\n  23:       \"const\": \"daily-book.v2\"\n  24:     },\n  25:     \"parent_state_hash\": {\n  26:       \"type\": \"string\",\n  27:       \"pattern\": \"^[0-9a-f]{64}$\"\n  28:     },\n  29:     \"rates\": {\n  30:       \"type\": \"object\",\n  31:       \"additionalProperties\": false,\n  32:       \"required\": [\n  33:         \"funding_notional\",\n  34:         \"unsettled_stub\",\n  35:         \"legal_funding_mark\",\n  36:         \"quoted_funding_component\",\n  37:         \"management_funding_gain\",\n  38:         \"reference_return_adjustment\",\n  39:         \"funding_remaining_years\",\n  40:         \"deployment_remaining_years\",\n  41:         \"last_reset_price\",\n  42:         \"next_payment_delay\",\n  43:         \"reference_price\",\n  44:         \"replacement_spread\",\n  45:         \"quote_annuity\",\n  46:         \"quote_id\",\n  47:         \"principal_source\",\n  48:         \"trs_principal_received\",\n  49:         \"deployment_coupon_spread\",\n  50:         \"roles\",\n  51:         \"evidence\"\n  52:       ],\n  53:       \"properties\": {\n  54:         \"funding_notional\": {\n  55:           \"$ref\": \"#/$defs/money\"\n  56:         },\n  57:         \"unsettled_stub\": {\n  58:           \"$ref\": \"#/$defs/money\"\n  59:         },\n  60:         \"legal_funding_mark\": {\n  61:           \"$ref\": \"#/$defs/money\"\n  62:         },\n  63:         \"quoted_funding_component\": {\n  64:           \"$ref\": \"#/$defs/money\"\n  65:         },\n  66:         \"management_funding_gain\": {\n  67:           \"$ref\": \"#/$defs/money\"\n  68:         },\n  69:         \"reference_return_adjustment\": {\n  70:           \"$ref\": \"#/$defs/money\"\n  71:         },\n  72:         \"funding_remaining_years\": {\n  73:           \"$ref\": \"#/$defs/scalar\"\n  74:         },\n  75:         \"deployment_remaining_years\": {\n  76:           \"$ref\": \"#/$defs/scalar\"\n  77:         },\n  78:         \"last_reset_price\": {\n  79:           \"$ref\": \"#/$defs/scalar\"\n  80:         },\n  81:         \"next_payment_delay\": {\n  82:           \"$ref\": \"#/$defs/scalar\"\n  83:         },\n  84:         \"reference_price\": {\n  85:           \"$ref\": \"#/$defs/scalar\"\n  86:         },\n  87:         \"replacement_spread\": {\n  88:           \"$ref\": \"#/$defs/scalar\"\n  89:         },\n  90:         \"quote_annuity\": {\n  91:           \"$ref\": \"#/$defs/scalar\"\n  92:         },\n  93:         \"quote_id\": {\n  94:           \"type\": \"string\",\n  95:           \"minLength\": 1,\n  96:           \"maxLength\": 4096\n  97:         },\n  98:         \"principal_source\": {\n  99:           \"type\": \"string\",\n 100:           \"minLength\": 1,\n 101:           \"maxLength\": 256\n 102:         },\n 103:         \"trs_principal_received\": {\n 104:           \"$ref\": \"#/$defs/money\"\n 105:         },\n 106:         \"deployment_coupon_spread\": {\n 107:           \"$ref\": \"#/$defs/scalar\"\n 108:         },\n 109:         \"roles\": {\n 110:           \"type\": \"object\",\n 111:           \"additionalProperties\": false,\n 112:           \"required\": [\n 113:             \"funding_receiver\",\n 114:             \"financing_payer\",\n 115:             \"funding_provider\",\n 116:             \"borrower\",\n 117:             \"funding_reference_owner\",\n 118:             \"accounting_unit\"\n 119:           ],\n 120:           \"properties\": {\n 121:             \"funding_receiver\": {\n 122:               \"type\": \"string\",\n 123:               \"minLength\": 1,\n 124:               \"maxLength\": 4096\n 125:             },\n 126:             \"financing_payer\": {\n 127:               \"type\": \"string\",\n 128:               \"minLength\": 1,\n 129:               \"maxLength\": 4096\n 130:             },\n 131:             \"funding_provider\": {\n 132:               \"type\": \"string\",\n 133:               \"minLength\": 1,\n 134:               \"maxLength\": 4096\n 135:             },\n 136:             \"borrower\": {\n 137:               \"type\": \"string\",\n 138:               \"minLength\": 1,\n 139:               \"maxLength\": 4096\n 140:             },\n 141:             \"funding_reference_owner\": {\n 142:               \"type\": \"string\",\n 143:               \"minLength\": 1,\n 144:               \"maxLength\": 4096\n 145:             },\n 146:             \"accounting_unit\": {\n 147:               \"type\": \"string\",\n 148:               \"minLength\": 1,\n 149:               \"maxLength\": 4096\n 150:             }\n 151:           }\n 152:         },\n 153:         \"evidence\": {\n 154:           \"type\": \"array\",\n 155:           \"maxItems\": 4096,\n 156:           \"items\": {\n 157:             \"$ref\": \"#/$defs/citation\"\n 158:           }\n 159:         }\n 160:       }\n 161:     },\n 162:     \"credit_xva\": {\n 163:       \"type\": \"object\",\n 164:       \"additionalProperties\": false,\n 165:       \"required\": [\n 166:         \"provider_cds\",\n 167:         \"own_bond_spread\",\n 168:         \"own_cds_spread\",\n 169:         \"bond_cds_basis\",\n 170:         \"CVA\",\n 171:         \"KVA_component\",\n 172:         \"UFVA\",\n 173:         \"actual_unsecured_debt\",\n 174:         \"annual_debt_funding_cost\",\n 175:         \"reserve_borrowing\",\n 176:         \"projection\",\n 177:         \"protection\",\n 178:         \"evidence\"\n 179:       ],\n 180:       \"properties\": {\n 181:         \"provider_cds\": {\n 182:           \"$ref\": \"#/$defs/scalar\"\n 183:         },\n 184:         \"own_bond_spread\": {\n 185:           \"$ref\": \"#/$defs/scalar\"\n 186:         },\n 187:         \"own_cds_spread\": {\n 188:           \"$ref\": \"#/$defs/scalar\"\n 189:         },\n 190:         \"bond_cds_basis\": {\n 191:           \"$ref\": \"#/$defs/scalar\"\n 192:         },\n 193:         \"CVA\": {\n 194:           \"$ref\": \"#/$defs/money\"\n 195:         },\n 196:         \"KVA_component\": {\n 197:           \"$ref\": \"#/$defs/money\"\n 198:         },\n 199:         \"UFVA\": {\n 200:           \"$ref\": \"#/$defs/money\"\n 201:         },\n 202:         \"actual_unsecured_debt\": {\n 203:           \"$ref\": \"#/$defs/money\"\n 204:         },\n 205:         \"annual_debt_funding_cost\": {\n 206:           \"$ref\": \"#/$defs/money\"\n 207:         },\n 208:         \"reserve_borrowing\": {\n 209:           \"$ref\": \"#/$defs/money\"\n 210:         },\n 211:         \"projection\": {\n 212:           \"type\": \"object\",\n 213:           \"additionalProperties\": false,\n 214:           \"required\": [\n 215:             \"default_grid\",\n 216:             \"capital_sampling\",\n 217:             \"quarters\",\n 218:             \"economic_tail_CVA\",\n 219:             \"hedge_provider_CVA\",\n 220:             \"debt_funding_PV\"\n 221:           ],\n 222:           \"properties\": {\n 223:             \"default_grid\": {\n 224:               \"type\": \"string\",\n 225:               \"minLength\": 1,\n 226:               \"maxLength\": 4096\n 227:             },\n 228:             \"capital_sampling\": {\n 229:               \"type\": \"string\",\n 230:               \"minLength\": 1,\n 231:               \"maxLength\": 4096\n 232:             },\n 233:             \"quarters\": {\n 234:               \"type\": \"integer\",\n 235:               \"minimum\": 0,\n 236:               \"maximum\": 9007199254740991\n 237:             },\n 238:             \"economic_tail_CVA\": {\n 239:               \"$ref\": \"#/$defs/money\"\n 240:             },\n 241:             \"hedge_provider_CVA\": {\n 242:               \"$ref\": \"#/$defs/money\"\n 243:             },\n 244:             \"debt_funding_PV\": {\n 245:               \"$ref\": \"#/$defs/money\"\n 246:             }\n 247:           }\n 248:         },\n 249:         \"protection\": {\n 250:           \"type\": \"object\",\n 251:           \"additionalProperties\": false,\n 252:           \"required\": [\n 253:             \"contracts\",\n 254:             \"notional\",\n 255:             \"protected_exposure\",\n 256:             \"uncovered_exposure\",\n 257:             \"hedge_provider_EAD\",\n 258:             \"hedge_provider_CVA\",\n 259:             \"hedge_mark\",\n 260:             \"premium_accrued\",\n 261:             \"premium_paid\",\n 262:             \"designated_notional\",\n 263:             \"SNH\",\n 264:             \"market_risk_K\",\n 265:             \"remaining_years\",\n 266:             \"unprotected_tail_years\"\n 267:           ],\n 268:           \"properties\": {\n 269:             \"contracts\": {\n 270:               \"type\": \"object\",\n 271:               \"maxProperties\": 4096,\n 272:               \"propertyNames\": {\n 273:                 \"type\": \"string\",\n 274:                 \"minLength\": 1,\n 275:                 \"maxLength\": 256\n 276:               },\n 277:               \"additionalProperties\": {\n 278:                 \"$ref\": \"#/$defs/protection_contract\"\n 279:               }\n 280:             },\n 281:             \"notional\": {\n 282:               \"$ref\": \"#/$defs/money\"\n 283:             },\n 284:             \"protected_exposure\": {\n 285:               \"$ref\": \"#/$defs/money\"\n 286:             },\n 287:             \"uncovered_exposure\": {\n 288:               \"$ref\": \"#/$defs/money\"\n 289:             },\n 290:             \"hedge_provider_EAD\": {\n 291:               \"$ref\": \"#/$defs/money\"\n 292:             },\n 293:             \"hedge_provider_CVA\": {\n 294:               \"$ref\": \"#/$defs/money\"\n 295:             },\n 296:             \"hedge_mark\": {\n 297:               \"$ref\": \"#/$defs/money\"\n 298:             },\n 299:             \"premium_accrued\": {\n 300:               \"$ref\": \"#/$defs/money\"\n 301:             },\n 302:             \"premium_paid\": {\n 303:               \"$ref\": \"#/$defs/money\"\n 304:             },\n 305:             \"designated_notional\": {\n 306:               \"$ref\": \"#/$defs/money\"\n 307:             },\n 308:             \"SNH\": {\n 309:               \"$ref\": \"#/$defs/money\"\n 310:             },\n 311:             \"market_risk_K\": {\n 312:               \"$ref\": \"#/$defs/money\"\n 313:             },\n 314:             \"remaining_years\": {\n 315:               \"$ref\": \"#/$defs/scalar\"\n 316:             },\n 317:             \"unprotected_tail_years\": {\n 318:               \"$ref\": \"#/$defs/scalar\"\n 319:             }\n 320:           }\n 321:         },\n 322:         \"evidence\": {\n 323:           \"type\": \"array\",\n 324:           \"maxItems\": 4096,\n 325:           \"items\": {\n 326:             \"$ref\": \"#/$defs/citation\"\n 327:           }\n 328:         }\n 329:       }\n 330:     },\n 331:     \"capital\": {\n 332:       \"type\": \"object\",\n 333:       \"additionalProperties\": false,\n 334:       \"required\": [\n 335:         \"SA_CCR\",\n 336:         \"CCR_RWA\",\n 337:         \"CCR_K\",\n 338:         \"CVA_K\",\n 339:         \"market_risk_K\",\n 340:         \"RWA\",\n 341:         \"leverage_exposure\",\n 342:         \"risk_requirement\",\n 343:         \"leverage_requirement\",\n 344:         \"required_capital\",\n 345:         \"Tier1_before_AVA\",\n 346:         \"AVA\",\n 347:         \"Tier1_after_AVA\",\n 348:         \"capital_shortfall\",\n 349:         \"capital_release_cash\",\n 350:         \"executable_under_stated_capital\",\n 351:         \"binding_constraint\",\n 352:         \"deployment\",\n 353:         \"asset_map\",\n 354:         \"repo\",\n 355:         \"evidence\"\n 356:       ],\n 357:       \"properties\": {\n 358:         \"SA_CCR\": {\n 359:           \"type\": \"object\",\n 360:           \"additionalProperties\": false,\n 361:           \"required\": [\n 362:             \"RC\",\n 363:             \"PFE\",\n 364:             \"EAD\",\n 365:             \"add_on\",\n 366:             \"margin_collateral\",\n 367:             \"margined\",\n 368:             \"netting_sets\",\n 369:             \"reference_rating\",\n 370:             \"provider_rating\"\n 371:           ],\n 372:           \"properties\": {\n 373:             \"RC\": {\n 374:               \"$ref\": \"#/$defs/money\"\n 375:             },\n 376:             \"PFE\": {\n 377:               \"$ref\": \"#/$defs/money\"\n 378:             },\n 379:             \"EAD\": {\n 380:               \"$ref\": \"#/$defs/money\"\n 381:             },\n 382:             \"add_on\": {\n 383:               \"$ref\": \"#/$defs/money\"\n 384:             },\n 385:             \"margin_collateral\": {\n 386:               \"$ref\": \"#/$defs/money\"\n 387:             },\n 388:             \"margined\": {\n 389:               \"type\": \"boolean\"\n 390:             },\n 391:             \"netting_sets\": {\n 392:               \"type\": \"object\",\n 393:               \"maxProperties\": 4096,\n 394:               \"propertyNames\": {\n 395:                 \"type\": \"string\",\n 396:                 \"minLength\": 1,\n 397:                 \"maxLength\": 256\n 398:               },\n 399:               \"additionalProperties\": {\n 400:                 \"$ref\": \"#/$defs/netting_set\"\n 401:               }\n 402:             },\n 403:             \"reference_rating\": {\n 404:               \"type\": \"string\",\n 405:               \"minLength\": 1,\n 406:               \"maxLength\": 4096\n 407:             },\n 408:             \"provider_rating\": {\n 409:               \"type\": \"string\",\n 410:               \"minLength\": 1,\n 411:               \"maxLength\": 4096\n 412:             }\n 413:           }\n 414:         },\n 415:         \"CCR_RWA\": {\n 416:           \"$ref\": \"#/$defs/money\"\n 417:         },\n 418:         \"CCR_K\": {\n 419:           \"$ref\": \"#/$defs/money\"\n 420:         },\n 421:         \"CVA_K\": {\n 422:           \"$ref\": \"#/$defs/money\"\n 423:         },\n 424:         \"market_risk_K\": {\n 425:           \"$ref\": \"#/$defs/money\"\n 426:         },\n 427:         \"RWA\": {\n 428:           \"$ref\": \"#/$defs/money\"\n 429:         },\n 430:         \"leverage_exposure\": {\n 431:           \"$ref\": \"#/$defs/money\"\n 432:         },\n 433:         \"risk_requirement\": {\n 434:           \"$ref\": \"#/$defs/money\"\n 435:         },\n 436:         \"leverage_requirement\": {\n 437:           \"$ref\": \"#/$defs/money\"\n 438:         },\n 439:         \"required_capital\": {\n 440:           \"$ref\": \"#/$defs/money\"\n 441:         },\n 442:         \"Tier1_before_AVA\": {\n 443:           \"$ref\": \"#/$defs/money\"\n 444:         },\n 445:         \"AVA\": {\n 446:           \"$ref\": \"#/$defs/money\"\n 447:         },\n 448:         \"Tier1_after_AVA\": {\n 449:           \"$ref\": \"#/$defs/money\"\n 450:         },\n 451:         \"capital_shortfall\": {\n 452:           \"$ref\": \"#/$defs/money\"\n 453:         },\n 454:         \"capital_release_cash\": {\n 455:           \"$ref\": \"#/$defs/money\"\n 456:         },\n 457:         \"executable_under_stated_capital\": {\n 458:           \"type\": \"boolean\"\n 459:         },\n 460:         \"binding_constraint\": {\n 461:           \"enum\": [\n 462:             \"risk_based\",\n 463:             \"leverage\"\n 464:           ]\n 465:         },\n 466:         \"deployment\": {\n 467:           \"type\": \"object\",\n 468:           \"additionalProperties\": false,\n 469:           \"required\": [\n 470:             \"principal\",\n 471:             \"accrued\",\n 472:             \"collateral_market_value\",\n 473:             \"recognised_mitigation\",\n 474:             \"E_star\",\n 475:             \"RWA\",\n 476:             \"capital\",\n 477:             \"collateral_remaining_years\",\n 478:             \"haircut_10day\",\n 479:             \"haircut_scaled\",\n 480:             \"maturity_factor\",\n 481:             \"collateral_lot_id\",\n 482:             \"eligible\",\n 483:             \"reason\"\n 484:           ],\n 485:           \"properties\": {\n 486:             \"principal\": {\n 487:               \"$ref\": \"#/$defs/money\"\n 488:             },\n 489:             \"accrued\": {\n 490:               \"$ref\": \"#/$defs/money\"\n 491:             },\n 492:             \"collateral_market_value\": {\n 493:               \"$ref\": \"#/$defs/money\"\n 494:             },\n 495:             \"recognised_mitigation\": {\n 496:               \"$ref\": \"#/$defs/money\"\n 497:             },\n 498:             \"E_star\": {\n 499:               \"$ref\": \"#/$defs/money\"\n 500:             },\n 501:             \"RWA\": {\n 502:               \"$ref\": \"#/$defs/money\"\n 503:             },\n 504:             \"capital\": {\n 505:               \"$ref\": \"#/$defs/money\"\n 506:             },\n 507:             \"collateral_remaining_years\": {\n 508:               \"$ref\": \"#/$defs/scalar\"\n 509:             },\n 510:             \"haircut_10day\": {\n 511:               \"$ref\": \"#/$defs/scalar\"\n 512:             },\n 513:             \"haircut_scaled\": {\n 514:               \"$ref\": \"#/$defs/scalar\"\n 515:             },\n 516:             \"maturity_factor\": {\n 517:               \"$ref\": \"#/$defs/scalar\"\n 518:             },\n 519:             \"collateral_lot_id\": {\n 520:               \"type\": [\n 521:                 \"string\",\n 522:                 \"null\"\n 523:               ],\n 524:               \"minLength\": 1,\n 525:               \"maxLength\": 256\n 526:             },\n 527:             \"eligible\": {\n 528:               \"type\": \"boolean\"\n 529:             },\n 530:             \"reason\": {\n 531:               \"type\": \"string\",\n 532:               \"minLength\": 1,\n 533:               \"maxLength\": 4096\n 534:             }\n 535:           }\n 536:         },\n 537:         \"asset_map\": {\n 538:           \"type\": \"object\",\n 539:           \"maxProperties\": 4096,\n 540:           \"propertyNames\": {\n 541:             \"type\": \"string\",\n 542:             \"minLength\": 1,\n 543:             \"maxLength\": 256\n 544:           },\n 545:           \"additionalProperties\": {\n 546:             \"$ref\": \"#/$defs/capital_asset\"\n 547:           }\n 548:         },\n 549:         \"repo\": {\n 550:           \"type\": \"object\",\n 551:           \"additionalProperties\": false,\n 552:           \"required\": [\n 553:             \"contracts\",\n 554:             \"principal\",\n 555:             \"counterparty_RWA\",\n 556:             \"capital\",\n 557:             \"cash_interest_accrued\",\n 558:             \"noncash_haircut_funding_cost\",\n 559:             \"noncash_capital_cost\"\n 560:           ],\n 561:           \"properties\": {\n 562:             \"contracts\": {\n 563:               \"type\": \"object\",\n 564:               \"maxProperties\": 4096,\n 565:               \"propertyNames\": {\n 566:                 \"type\": \"string\",\n 567:                 \"minLength\": 1,\n 568:                 \"maxLength\": 256\n 569:               },\n 570:               \"additionalProperties\": {\n 571:                 \"$ref\": \"#/$defs/repo_contract\"\n 572:               }\n 573:             },\n 574:             \"principal\": {\n 575:               \"$ref\": \"#/$defs/money\"\n 576:             },\n 577:             \"counterparty_RWA\": {\n 578:               \"$ref\": \"#/$defs/money\"\n 579:             },\n 580:             \"capital\": {\n 581:               \"$ref\": \"#/$defs/money\"\n 582:             },\n 583:             \"cash_interest_accrued\": {\n 584:               \"$ref\": \"#/$defs/money\"\n 585:             },\n 586:             \"noncash_haircut_funding_cost\": {\n 587:               \"$ref\": \"#/$defs/money\"\n 588:             },\n 589:             \"noncash_capital_cost\": {\n 590:               \"$ref\": \"#/$defs/money\"\n 591:             }\n 592:           }\n 593:         },\n 594:         \"evidence\": {\n 595:           \"type\": \"array\",\n 596:           \"maxItems\": 4096,\n 597:           \"items\": {\n 598:             \"$ref\": \"#/$defs/citation\"\n 599:           }\n 600:         }\n 601:       }\n 602:     },\n 603:     \"liquidity\": {\n 604:       \"type\": \"object\",\n 605:       \"additionalProperties\": false,\n 606:       \"required\": [\n 607:         \"cash\",\n 608:         \"restricted_cash\",\n 609:         \"restricted_collections\",\n 610:         \"posted_vm\",\n 611:         \"received_vm\",\n 612:         \"facility_debt\",\n 613:         \"facility_limit\",\n 614:         \"facility_available\",\n 615:         \"repo_debt\",\n 616:         \"unpaid_receivable\",\n 617:         \"unpaid_payable\",\n 618:         \"due_payables\",\n 619:         \"deadline_shortfall\",\n 620:         \"market_open\",\n 621:         \"transfer_blocks\",\n 622:         \"inventory\",\n 623:         \"obligations\",\n 624:         \"allocation\",\n 625:         \"accepted_action_count\",\n 626:         \"evidence\"\n 627:       ],\n 628:       \"properties\": {\n 629:         \"cash\": {\n 630:           \"$ref\": \"#/$defs/money\"\n 631:         },\n 632:         \"restricted_cash\": {\n 633:           \"$ref\": \"#/$defs/money\"\n 634:         },\n 635:         \"restricted_collections\": {\n 636:           \"$ref\": \"#/$defs/money\"\n 637:         },\n 638:         \"posted_vm\": {\n 639:           \"$ref\": \"#/$defs/money\"\n 640:         },\n 641:         \"received_vm\": {\n 642:           \"$ref\": \"#/$defs/money\"\n 643:         },\n 644:         \"facility_debt\": {\n 645:           \"$ref\": \"#/$defs/money\"\n 646:         },\n 647:         \"facility_limit\": {\n 648:           \"$ref\": \"#/$defs/money\"\n 649:         },\n 650:         \"facility_available\": {\n 651:           \"$ref\": \"#/$defs/money\"\n 652:         },\n 653:         \"repo_debt\": {\n 654:           \"$ref\": \"#/$defs/money\"\n 655:         },\n 656:         \"unpaid_receivable\": {\n 657:           \"$ref\": \"#/$defs/money\"\n 658:         },\n 659:         \"unpaid_payable\": {\n 660:           \"$ref\": \"#/$defs/money\"\n 661:         },\n 662:         \"due_payables\": {\n 663:           \"$ref\": \"#/$defs/money\"\n 664:         },\n 665:         \"deadline_shortfall\": {\n 666:           \"$ref\": \"#/$defs/money\"\n 667:         },\n 668:         \"market_open\": {\n 669:           \"type\": \"boolean\"\n 670:         },\n 671:         \"transfer_blocks\": {\n 672:           \"type\": \"object\",\n 673:           \"additionalProperties\": false,\n 674:           \"required\": [\"custody_delivery\", \"cash_remittance\"],\n 675:           \"properties\": {\n 676:             \"custody_delivery\": {\"type\": \"boolean\"},\n 677:             \"cash_remittance\": {\"type\": \"boolean\"}\n 678:           }\n 679:         },\n 680:         \"inventory\": {\n 681:           \"type\": \"object\",\n 682:           \"maxProperties\": 4096,\n 683:           \"propertyNames\": {\n 684:             \"type\": \"string\",\n 685:             \"minLength\": 1,\n 686:             \"maxLength\": 256\n 687:           },\n 688:           \"additionalProperties\": {\n 689:             \"$ref\": \"#/$defs/inventory_lot\"\n 690:           }\n 691:         },\n 692:         \"obligations\": {\n 693:           \"type\": \"object\",\n 694:           \"maxProperties\": 4096,\n 695:           \"propertyNames\": {\n 696:             \"type\": \"string\",\n 697:             \"minLength\": 1,\n 698:             \"maxLength\": 256\n 699:           },\n 700:           \"additionalProperties\": {\n 701:             \"$ref\": \"#/$defs/obligation\"\n 702:           }\n 703:         },\n 704:         \"allocation\": {\n 705:           \"type\": \"object\",\n 706:           \"additionalProperties\": false,\n 707:           \"required\": [\n 708:             \"contributed_inventory_value\",\n 709:             \"current_inventory_value\",\n 710:             \"encumbered_inventory_value\",\n 711:             \"available_inventory_value\",\n 712:             \"repo_proceeds\",\n 713:             \"cash_action_fees\",\n 714:             \"noncash_haircut_funding_cost\",\n 715:             \"noncash_capital_cost\"\n 716:           ],\n 717:           \"properties\": {\n 718:             \"contributed_inventory_value\": {\n 719:               \"$ref\": \"#/$defs/money\"\n 720:             },\n 721:             \"current_inventory_value\": {\n 722:               \"$ref\": \"#/$defs/money\"\n 723:             },\n 724:             \"encumbered_inventory_value\": {\n 725:               \"$ref\": \"#/$defs/money\"\n 726:             },\n 727:             \"available_inventory_value\": {\n 728:               \"$ref\": \"#/$defs/money\"\n 729:             },\n 730:             \"repo_proceeds\": {\n 731:               \"$ref\": \"#/$defs/money\"\n 732:             },\n 733:             \"cash_action_fees\": {\n 734:               \"$ref\": \"#/$defs/money\"\n 735:             },\n 736:             \"noncash_haircut_funding_cost\": {\n 737:               \"$ref\": \"#/$defs/money\"\n 738:             },\n 739:             \"noncash_capital_cost\": {\n 740:               \"$ref\": \"#/$defs/money\"\n 741:             }\n 742:           }\n 743:         },\n 744:         \"accepted_action_count\": {\n 745:           \"type\": \"integer\",\n 746:           \"minimum\": 0,\n 747:           \"maximum\": 9007199254740991\n 748:         },\n 749:         \"evidence\": {\n 750:           \"type\": \"array\",\n 751:           \"maxItems\": 4096,\n 752:           \"items\": {\n 753:             \"$ref\": \"#/$defs/citation\"\n 754:           }\n 755:         }\n 756:       }\n 757:     },\n 758:     \"accounting\": {\n 759:       \"type\": \"object\",\n 760:       \"additionalProperties\": false,\n 761:       \"required\": [\n 762:         \"statutory\",\n 763:         \"management\",\n 764:         \"bridge\",\n 765:         \"attribution\",\n 766:         \"terminal\",\n 767:         \"evidence\"\n 768:       ],\n 769:       \"properties\": {\n 770:         \"statutory\": {\n 771:           \"type\": \"object\",\n 772:           \"additionalProperties\": false,\n 773:           \"required\": [\n 774:             \"accounting_unit\",\n 775:             \"assets\",\n 776:             \"liabilities\",\n 777:             \"allowances\",\n 778:             \"contributed_equity\",\n 779:             \"equity\",\n 780:             \"cumulative_pnl\",\n 781:             \"trial_balance\",\n 782:             \"funding_derivative_asset\",\n 783:             \"owner_contribution_pnl\",\n 784:             \"balances\",\n 785:             \"booked_balances\",\n 786:             \"valuation_postings\"\n 787:           ],\n 788:           \"properties\": {\n 789:             \"accounting_unit\": {\n 790:               \"type\": \"string\",\n 791:               \"minLength\": 1,\n 792:               \"maxLength\": 4096\n 793:             },\n 794:             \"assets\": {\n 795:               \"$ref\": \"#/$defs/money\"\n 796:             },\n 797:             \"liabilities\": {\n 798:               \"$ref\": \"#/$defs/money\"\n 799:             },\n 800:             \"allowances\": {\n 801:               \"$ref\": \"#/$defs/money\"\n 802:             },\n 803:             \"contributed_equity\": {\n 804:               \"$ref\": \"#/$defs/money\"\n 805:             },\n 806:             \"equity\": {\n 807:               \"$ref\": \"#/$defs/money\"\n 808:             },\n 809:             \"cumulative_pnl\": {\n 810:               \"$ref\": \"#/$defs/money\"\n 811:             },\n 812:             \"trial_balance\": {\n 813:               \"$ref\": \"#/$defs/money\"\n 814:             },\n 815:             \"funding_derivative_asset\": {\n 816:               \"$ref\": \"#/$defs/money\"\n 817:             },\n 818:             \"owner_contribution_pnl\": {\n 819:               \"$ref\": \"#/$defs/money\"\n 820:             },\n 821:             \"balances\": {\n 822:               \"type\": \"object\",\n 823:               \"maxProperties\": 4096,\n 824:               \"propertyNames\": {\n 825:                 \"type\": \"string\",\n 826:                 \"minLength\": 1,\n 827:                 \"maxLength\": 256\n 828:               },\n 829:               \"additionalProperties\": {\n 830:                 \"$ref\": \"#/$defs/money\"\n 831:               }\n 832:             },\n 833:             \"booked_balances\": {\n 834:               \"type\": \"object\",\n 835:               \"maxProperties\": 4096,\n 836:               \"propertyNames\": {\n 837:                 \"type\": \"string\",\n 838:                 \"minLength\": 1,\n 839:                 \"maxLength\": 256\n 840:               },\n 841:               \"additionalProperties\": {\n 842:                 \"$ref\": \"#/$defs/money\"\n 843:               }\n 844:             },\n 845:             \"valuation_postings\": {\n 846:               \"type\": \"object\",\n 847:               \"maxProperties\": 4096,\n 848:               \"propertyNames\": {\n 849:                 \"type\": \"string\",\n 850:                 \"minLength\": 1,\n 851:                 \"maxLength\": 256\n 852:               },\n 853:               \"additionalProperties\": {\n 854:                 \"$ref\": \"#/$defs/money\"\n 855:               }\n 856:             }\n 857:           }\n 858:         },\n 859:         \"management\": {\n 860:           \"type\": \"object\",\n 861:           \"additionalProperties\": false,\n 862:           \"required\": [\n 863:             \"funding_mark\",\n 864:             \"hedge_asset\",\n 865:             \"gross_inception_gain\",\n 866:             \"deferred_gain\",\n 867:             \"CVA_reserve\",\n 868:             \"KVA_reserve\",\n 869:             \"overlay_equity\",\n 870:             \"equity\",\n 871:             \"cumulative_pnl\",\n 872:             \"trial_balance\",\n 873:             \"balances\",\n 874:             \"valuation_postings\",\n 875:             \"observable_at_inception\",\n 876:             \"currently_observable\",\n 877:             \"deferral_released_by_evidence\"\n 878:           ],\n 879:           \"properties\": {\n 880:             \"funding_mark\": {\n 881:               \"$ref\": \"#/$defs/money\"\n 882:             },\n 883:             \"hedge_asset\": {\n 884:               \"$ref\": \"#/$defs/money\"\n 885:             },\n 886:             \"gross_inception_gain\": {\n 887:               \"$ref\": \"#/$defs/money\"\n 888:             },\n 889:             \"deferred_gain\": {\n 890:               \"$ref\": \"#/$defs/money\"\n 891:             },\n 892:             \"CVA_reserve\": {\n 893:               \"$ref\": \"#/$defs/money\"\n 894:             },\n 895:             \"KVA_reserve\": {\n 896:               \"$ref\": \"#/$defs/money\"\n 897:             },\n 898:             \"overlay_equity\": {\n 899:               \"$ref\": \"#/$defs/money\"\n 900:             },\n 901:             \"equity\": {\n 902:               \"$ref\": \"#/$defs/money\"\n 903:             },\n 904:             \"cumulative_pnl\": {\n 905:               \"$ref\": \"#/$defs/money\"\n 906:             },\n 907:             \"trial_balance\": {\n 908:               \"$ref\": \"#/$defs/money\"\n 909:             },\n 910:             \"balances\": {\n 911:               \"type\": \"object\",\n 912:               \"maxProperties\": 4096,\n 913:               \"propertyNames\": {\n 914:                 \"type\": \"string\",\n 915:                 \"minLength\": 1,\n 916:                 \"maxLength\": 256\n 917:               },\n 918:               \"additionalProperties\": {\n 919:                 \"$ref\": \"#/$defs/money\"\n 920:               }\n 921:             },\n 922:             \"valuation_postings\": {\n 923:               \"type\": \"object\",\n 924:               \"maxProperties\": 4096,\n 925:               \"propertyNames\": {\n 926:                 \"type\": \"string\",\n 927:                 \"minLength\": 1,\n 928:                 \"maxLength\": 256\n 929:               },\n 930:               \"additionalProperties\": {\n 931:                 \"$ref\": \"#/$defs/money\"\n 932:               }\n 933:             },\n 934:             \"observable_at_inception\": {\n 935:               \"type\": \"boolean\"\n 936:             },\n 937:             \"currently_observable\": {\n 938:               \"type\": \"boolean\"\n 939:             },\n 940:             \"deferral_released_by_evidence\": {\n 941:               \"type\": \"boolean\"\n 942:             }\n 943:           }\n 944:         },\n 945:         \"bridge\": {\n 946:           \"type\": \"object\",\n 947:           \"additionalProperties\": false,\n 948:           \"required\": [\n 949:             \"management_equity\",\n 950:             \"remove_funding_mark\",\n 951:             \"remove_hedge_asset\",\n 952:             \"restore_gross_deferral\",\n 953:             \"restore_management_xva\",\n 954:             \"statutory_equity\",\n 955:             \"residual\"\n 956:           ],\n 957:           \"properties\": {\n 958:             \"management_equity\": {\n 959:               \"$ref\": \"#/$defs/money\"\n 960:             },\n 961:             \"remove_funding_mark\": {\n 962:               \"$ref\": \"#/$defs/money\"\n 963:             },\n 964:             \"remove_hedge_asset\": {\n 965:               \"$ref\": \"#/$defs/money\"\n 966:             },\n 967:             \"restore_gross_deferral\": {\n 968:               \"$ref\": \"#/$defs/money\"\n 969:             },\n 970:             \"restore_management_xva\": {\n 971:               \"$ref\": \"#/$defs/money\"\n 972:             },\n 973:             \"statutory_equity\": {\n 974:               \"$ref\": \"#/$defs/money\"\n 975:             },\n 976:             \"residual\": {\n 977:               \"$ref\": \"#/$defs/money\"\n 978:             }\n 979:           }\n 980:         },\n 981:         \"attribution\": {\n 982:           \"type\": \"object\",\n 983:           \"additionalProperties\": false,\n 984:           \"required\": [\n 985:             \"opening_as_of\",\n 986:             \"closing_as_of\",\n 987:             \"carry\",\n 988:             \"statutory_mark\",\n 989:             \"funding_theta\",\n 990:             \"funding_mtm\",\n 991:             \"funding_action\",\n 992:             \"deferral_theta\",\n 993:             \"deferral_observability\",\n 994:             \"reserve_theta\",\n 995:             \"reserve_mtm\",\n 996:             \"reserve_action\",\n 997:             \"hedge_mark\",\n 998:             \"hedge_cash\",\n 999:             \"hedge_accrual\",\n1000:             \"cash_funding_drag\",\n1001:             \"operating_cost\",\n1002:             \"claim_loss\",\n1003:             \"owner_contributions\",\n1004:             \"statutory_equity_change\",\n1005:             \"overlay_equity_change\",\n1006:             \"management_equity_change\",\n1007:             \"pnl_total\",\n1008:             \"statutory_journal_pnl\",\n1009:             \"overlay_journal_pnl\",\n1010:             \"tie_difference\"\n1011:           ],\n1012:           \"properties\": {\n1013:             \"opening_as_of\": {\n1014:               \"type\": \"string\",\n1015:               \"minLength\": 1,\n1016:               \"maxLength\": 4096\n1017:             },\n1018:             \"closing_as_of\": {\n1019:               \"type\": \"string\",\n1020:               \"minLength\": 1,\n1021:               \"maxLength\": 4096\n1022:             },\n1023:             \"carry\": {\n1024:               \"$ref\": \"#/$defs/money\"\n1025:             },\n1026:             \"statutory_mark\": {\n1027:               \"$ref\": \"#/$defs/money\"\n1028:             },\n1029:             \"funding_theta\": {\n1030:               \"$ref\": \"#/$defs/money\"\n1031:             },\n1032:             \"funding_mtm\": {\n1033:               \"$ref\": \"#/$defs/money\"\n1034:             },\n1035:             \"funding_action\": {\n1036:               \"$ref\": \"#/$defs/money\"\n1037:             },\n1038:             \"deferral_theta\": {\n1039:               \"$ref\": \"#/$defs/money\"\n1040:             },\n1041:             \"deferral_observability\": {\n1042:               \"$ref\": \"#/$defs/money\"\n1043:             },\n1044:             \"reserve_theta\": {\n1045:               \"$ref\": \"#/$defs/money\"\n1046:             },\n1047:             \"reserve_mtm\": {\n1048:               \"$ref\": \"#/$defs/money\"\n1049:             },\n1050:             \"reserve_action\": {\n1051:               \"$ref\": \"#/$defs/money\"\n1052:             },\n1053:             \"hedge_mark\": {\n1054:               \"$ref\": \"#/$defs/money\"\n1055:             },\n1056:             \"hedge_cash\": {\n1057:               \"$ref\": \"#/$defs/money\"\n1058:             },\n1059:             \"hedge_accrual\": {\n1060:               \"$ref\": \"#/$defs/money\"\n1061:             },\n1062:             \"cash_funding_drag\": {\n1063:               \"$ref\": \"#/$defs/money\"\n1064:             },\n1065:             \"operating_cost\": {\n1066:               \"$ref\": \"#/$defs/money\"\n1067:             },\n1068:             \"claim_loss\": {\n1069:               \"$ref\": \"#/$defs/money\"\n1070:             },\n1071:             \"owner_contributions\": {\n1072:               \"$ref\": \"#/$defs/money\"\n1073:             },\n1074:             \"statutory_equity_change\": {\n1075:               \"$ref\": \"#/$defs/money\"\n1076:             },\n1077:             \"overlay_equity_change\": {\n1078:               \"$ref\": \"#/$defs/money\"\n1079:             },\n1080:             \"management_equity_change\": {\n1081:               \"$ref\": \"#/$defs/money\"\n1082:             },\n1083:             \"pnl_total\": {\n1084:               \"$ref\": \"#/$defs/money\"\n1085:             },\n1086:             \"statutory_journal_pnl\": {\n1087:               \"$ref\": \"#/$defs/money\"\n1088:             },\n1089:             \"overlay_journal_pnl\": {\n1090:               \"$ref\": \"#/$defs/money\"\n1091:             },\n1092:             \"tie_difference\": {\n1093:               \"$ref\": \"#/$defs/money\"\n1094:             }\n1095:           }\n1096:         },\n1097:         \"terminal\": {\n1098:           \"type\": \"object\",\n1099:           \"additionalProperties\": false,\n1100:           \"required\": [\n1101:             \"scheduled_funding_maturity\",\n1102:             \"scheduled_deployment_maturity\",\n1103:             \"open_obligations\",\n1104:             \"unpaid_receivables\",\n1105:             \"unpaid_payables\",\n1106:             \"return_liabilities\",\n1107:             \"claim_allowance\",\n1108:             \"AVA\",\n1109:             \"replacement_equity\",\n1110:             \"replacement_equity_KVA\",\n1111:             \"AVA_exposures\",\n1112:             \"all_obligations_settled\"\n1113:           ],\n1114:           \"properties\": {\n1115:             \"scheduled_funding_maturity\": {\n1116:               \"type\": \"boolean\"\n1117:             },\n1118:             \"scheduled_deployment_maturity\": {\n1119:               \"type\": \"boolean\"\n1120:             },\n1121:             \"open_obligations\": {\n1122:               \"type\": \"object\",\n1123:               \"maxProperties\": 4096,\n1124:               \"propertyNames\": {\n1125:                 \"type\": \"string\",\n1126:                 \"minLength\": 1,\n1127:                 \"maxLength\": 256\n1128:               },\n1129:               \"additionalProperties\": {\n1130:                 \"$ref\": \"#/$defs/terminal_obligation\"\n1131:               }\n1132:             },\n1133:             \"unpaid_receivables\": {\n1134:               \"$ref\": \"#/$defs/money\"\n1135:             },\n1136:             \"unpaid_payables\": {\n1137:               \"$ref\": \"#/$defs/money\"\n1138:             },\n1139:             \"return_liabilities\": {\n1140:               \"$ref\": \"#/$defs/money\"\n1141:             },\n1142:             \"claim_allowance\": {\n1143:               \"$ref\": \"#/$defs/money\"\n1144:             },\n1145:             \"AVA\": {\n1146:               \"$ref\": \"#/$defs/money\"\n1147:             },\n1148:             \"replacement_equity\": {\n1149:               \"$ref\": \"#/$defs/money\"\n1150:             },\n1151:             \"replacement_equity_KVA\": {\n1152:               \"$ref\": \"#/$defs/money\"\n1153:             },\n1154:             \"AVA_exposures\": {\n1155:               \"type\": \"array\",\n1156:               \"maxItems\": 4096,\n1157:               \"items\": {\n1158:                 \"$ref\": \"#/$defs/ava_exposure\"\n1159:               }\n1160:             },\n1161:             \"all_obligations_settled\": {\n1162:               \"type\": \"boolean\"\n1163:             }\n1164:           }\n1165:         },\n1166:         \"evidence\": {\n1167:           \"type\": \"array\",\n1168:           \"maxItems\": 4096,\n1169:           \"items\": {\n1170:             \"$ref\": \"#/$defs/citation\"\n1171:           }\n1172:         }\n1173:       }\n1174:     },\n1175:     \"legal\": {\n1176:       \"type\": \"object\",\n1177:       \"additionalProperties\": false,\n1178:       \"required\": [\n1179:         \"findings\"\n1180:       ],\n1181:       \"properties\": {\n1182:         \"findings\": {\n1183:           \"type\": \"array\",\n1184:           \"minItems\": 1,\n1185:           \"items\": {\n1186:             \"type\": \"object\",\n1187:             \"additionalProperties\": false,\n1188:             \"required\": [\n1189:               \"subject_id\",\n1190:               \"status\",\n1191:               \"premises\",\n1192:               \"rationale\"\n1193:             ],\n1194:             \"properties\": {\n1195:               \"subject_id\": {\n1196:                 \"type\": \"string\",\n1197:                 \"minLength\": 1,\n1198:                 \"pattern\": \"\\\\S\"\n1199:               },\n1200:               \"status\": {\n1201:                 \"enum\": [\n1202:                   \"permitted\",\n1203:                   \"conditional\",\n1204:                   \"blocked\"\n1205:                 ]\n1206:               },\n1207:               \"premises\": {\n1208:                 \"type\": \"array\",\n1209:                 \"minItems\": 1,\n1210:                 \"items\": {\n1211:                   \"type\": \"object\",\n1212:                   \"additionalProperties\": false,\n1213:                   \"required\": [\n1214:                     \"source\",\n1215:                     \"pointer\",\n1216:                     \"relation\",\n1217:                     \"value\"\n1218:                   ],\n1219:                   \"properties\": {\n1220:                     \"source\": {\n1221:                       \"enum\": [\n1222:                         \"case\",\n1223:                         \"state\",\n1224:                         \"book\",\n1225:                         \"report\"\n1226:                       ]\n1227:                     },\n1228:                     \"pointer\": {\n1229:                       \"type\": \"string\",\n1230:                       \"pattern\": \"^(?:/(?:[^~/]|~[01])*)*(?![\\\\s\\\\S])\"\n1231:                     },\n1232:                     \"relation\": {\n1233:                       \"enum\": [\n1234:                         \"eq\",\n1235:                         \"ne\",\n1236:                         \"gte\",\n1237:                         \"lte\",\n1238:                         \"contains\"\n1239:                       ]\n1240:                     },\n1241:                     \"value\": {\n1242:                       \"anyOf\": [\n1243:                         {\n1244:                           \"type\": [\n1245:                             \"string\",\n1246:                             \"integer\",\n1247:                             \"boolean\",\n1248:                             \"null\"\n1249:                           ]\n1250:                         },\n1251:                         {\n1252:                           \"type\": \"array\",\n1253:                           \"items\": {\n1254:                             \"type\": [\n1255:                               \"string\",\n1256:                               \"integer\",\n1257:                               \"boolean\",\n1258:                               \"null\"\n1259:                             ]\n1260:                           }\n1261:                         }\n1262:                       ]\n1263:                     }\n1264:                   }\n1265:                 }\n1266:               },\n1267:               \"rationale\": {\n1268:                 \"type\": \"string\",\n1269:                 \"minLength\": 1,\n1270:                 \"pattern\": \"\\\\S\"\n1271:               }\n1272:             }\n1273:           }\n1274:         }\n1275:       }\n1276:     },\n1277:     \"compliance\": {\n1278:       \"type\": \"object\",\n1279:       \"additionalProperties\": false,\n1280:       \"required\": [\n1281:         \"decisions\"\n1282:       ],\n1283:       \"properties\": {\n1284:         \"decisions\": {\n1285:           \"type\": \"array\",\n1286:           \"minItems\": 1,\n1287:           \"items\": {\n1288:             \"type\": \"object\",\n1289:             \"additionalProperties\": false,\n1290:             \"required\": [\n1291:               \"rule_id\",\n1292:               \"decision\",\n1293:               \"premises\",\n1294:               \"rationale\"\n1295:             ],\n1296:             \"properties\": {\n1297:               \"rule_id\": {\n1298:                 \"type\": \"string\",\n1299:                 \"minLength\": 1,\n1300:                 \"pattern\": \"\\\\S\"\n1301:               },\n1302:               \"decision\": {\n1303:                 \"enum\": [\n1304:                   \"execute\",\n1305:                   \"escalate\",\n1306:                   \"decline\",\n1307:                   \"await_approval\"\n1308:                 ]\n1309:               },\n1310:               \"premises\": {\n1311:                 \"type\": \"array\",\n1312:                 \"minItems\": 1,\n1313:                 \"items\": {\n1314:                   \"type\": \"object\",\n1315:                   \"additionalProperties\": false,\n1316:                   \"required\": [\n1317:                     \"source\",\n1318:                     \"pointer\",\n1319:                     \"relation\",\n1320:                     \"value\"\n1321:                   ],\n1322:                   \"properties\": {\n1323:                     \"source\": {\n1324:                       \"enum\": [\n1325:                         \"case\",\n1326:                         \"state\",\n1327:                         \"book\",\n1328:                         \"report\"\n1329:                       ]\n1330:                     },\n1331:                     \"pointer\": {\n1332:                       \"type\": \"string\",\n1333:                       \"pattern\": \"^(?:/(?:[^~/]|~[01])*)*(?![\\\\s\\\\S])\"\n1334:                     },\n1335:                     \"relation\": {\n1336:                       \"enum\": [\n1337:                         \"eq\",\n1338:                         \"ne\",\n1339:                         \"gte\",\n1340:                         \"lte\",\n1341:                         \"contains\"\n1342:                       ]\n1343:                     },\n1344:                     \"value\": {\n1345:                       \"anyOf\": [\n1346:                         {\n1347:                           \"type\": [\n1348:                             \"string\",\n1349:                             \"integer\",\n1350:                             \"boolean\",\n1351:                             \"null\"\n1352:                           ]\n1353:                         },\n1354:                         {\n1355:                           \"type\": \"array\",\n1356:                           \"items\": {\n1357:                             \"type\": [\n1358:                               \"string\",\n1359:                               \"integer\",\n1360:                               \"boolean\",\n1361:                               \"null\"\n1362:                             ]\n1363:                           }\n1364:                         }\n1365:                       ]\n1366:                     }\n1367:                   }\n1368:                 }\n1369:               },\n1370:               \"rationale\": {\n1371:                 \"type\": \"string\",\n1372:                 \"minLength\": 1,\n1373:                 \"pattern\": \"\\\\S\"\n1374:               }\n1375:             }\n1376:           }\n1377:         }\n1378:       }\n1379:     },\n1380:     \"structure\": {\n1381:       \"type\": \"object\",\n1382:       \"additionalProperties\": false,\n1383:       \"required\": [\n1384:         \"party_id\",\n1385:         \"legal_form\",\n1386:         \"client_executable\",\n1387:         \"classification\",\n1388:         \"cash_required\",\n1389:         \"cash_delivered\",\n1390:         \"deadline_met\",\n1391:         \"bank_viable\",\n1392:         \"premises\",\n1393:         \"rationale\"\n1394:       ],\n1395:       \"properties\": {\n1396:         \"party_id\": {\n1397:           \"type\": \"string\",\n1398:           \"minLength\": 1,\n1399:           \"pattern\": \"\\\\S\"\n1400:         },\n1401:         \"legal_form\": {\n1402:           \"type\": \"string\",\n1403:           \"minLength\": 1,\n1404:           \"pattern\": \"\\\\S\"\n1405:         },\n1406:         \"client_executable\": {\n1407:           \"type\": \"boolean\"\n1408:         },\n1409:         \"classification\": {\n1410:           \"type\": \"string\",\n1411:           \"minLength\": 1,\n1412:           \"pattern\": \"\\\\S\"\n1413:         },\n1414:         \"cash_required\": {\n1415:           \"type\": \"string\",\n1416:           \"pattern\": \"^-?(?:0|[1-9][0-9]*)(?:\\\\.[0-9]+)?(?![\\\\s\\\\S])\",\n1417:           \"x-exact-decimal\": true,\n1418:           \"x-dimension\": \"money\"\n1419:         },\n1420:         \"cash_delivered\": {\n1421:           \"type\": \"string\",\n1422:           \"pattern\": \"^-?(?:0|[1-9][0-9]*)(?:\\\\.[0-9]+)?(?![\\\\s\\\\S])\",\n1423:           \"x-exact-decimal\": true,\n1424:           \"x-dimension\": \"money\"\n1425:         },\n1426:         \"deadline_met\": {\n1427:           \"type\": \"boolean\"\n1428:         },\n1429:         \"bank_viable\": {\n1430:           \"type\": \"boolean\"\n1431:         },\n1432:         \"premises\": {\n1433:           \"type\": \"array\",\n1434:           \"minItems\": 1,\n1435:           \"items\": {\n1436:             \"type\": \"object\",\n1437:             \"additionalProperties\": false,\n1438:             \"required\": [\n1439:               \"source\",\n1440:               \"pointer\",\n1441:               \"relation\",\n1442:               \"value\"\n1443:             ],\n1444:             \"properties\": {\n1445:               \"source\": {\n1446:                 \"enum\": [\n1447:                   \"case\",\n1448:                   \"state\",\n1449:                   \"book\",\n1450:                   \"report\"\n1451:                 ]\n1452:               },\n1453:               \"pointer\": {\n1454:                 \"type\": \"string\",\n1455:                 \"pattern\": \"^(?:/(?:[^~/]|~[01])*)*(?![\\\\s\\\\S])\"\n1456:               },\n1457:               \"relation\": {\n1458:                 \"enum\": [\n1459:                   \"eq\",\n1460:                   \"ne\",\n1461:                   \"gte\",\n1462:                   \"lte\",\n1463:                   \"contains\"\n1464:                 ]\n1465:               },\n1466:               \"value\": {\n1467:                 \"anyOf\": [\n1468:                   {\n1469:                     \"type\": [\n1470:                       \"string\",\n1471:                       \"integer\",\n1472:                       \"boolean\",\n1473:                       \"null\"\n1474:                     ]\n1475:                   },\n1476:                   {\n1477:                     \"type\": \"array\",\n1478:                     \"items\": {\n1479:                       \"type\": [\n1480:                         \"string\",\n1481:                         \"integer\",\n1482:                         \"boolean\",\n1483:                         \"null\"\n1484:                       ]\n1485:                     }\n1486:                   }\n1487:                 ]\n1488:               }\n1489:             }\n1490:           }\n1491:         },\n1492:         \"rationale\": {\n1493:           \"type\": \"string\",\n1494:           \"minLength\": 1,\n1495:           \"pattern\": \"\\\\S\"\n1496:         }\n1497:       }\n1498:     },\n1499:     \"recommendation\": {\n1500:       \"type\": \"object\",\n1501:       \"additionalProperties\": false,\n1502:       \"required\": [\n1503:         \"action_kind\",\n1504:         \"subject_id\",\n1505:         \"binding_constraint\",\n1506:         \"position_id\",\n1507:         \"premises\",\n1508:         \"alternatives\",\n1509:         \"rationale\"\n1510:       ],\n1511:       \"properties\": {\n1512:         \"action_kind\": {\n1513:           \"type\": \"string\",\n1514:           \"minLength\": 1,\n1515:           \"pattern\": \"\\\\S\"\n1516:         },\n1517:         \"subject_id\": {\n1518:           \"type\": \"string\",\n1519:           \"minLength\": 1,\n1520:           \"pattern\": \"\\\\S\"\n1521:         },\n1522:         \"binding_constraint\": {\n1523:           \"type\": \"string\",\n1524:           \"minLength\": 1,\n1525:           \"pattern\": \"\\\\S\"\n1526:         },\n1527:         \"position_id\": {\n1528:           \"type\": [\n1529:             \"string\",\n1530:             \"null\"\n1531:           ],\n1532:           \"minLength\": 1\n1533:         },\n1534:         \"premises\": {\n1535:           \"type\": \"array\",\n1536:           \"minItems\": 1,\n1537:           \"items\": {\n1538:             \"type\": \"object\",\n1539:             \"additionalProperties\": false,\n1540:             \"required\": [\n1541:               \"source\",\n1542:               \"pointer\",\n1543:               \"relation\",\n1544:               \"value\"\n1545:             ],\n1546:             \"properties\": {\n1547:               \"source\": {\n1548:                 \"enum\": [\n1549:                   \"case\",\n1550:                   \"state\",\n1551:                   \"book\",\n1552:                   \"report\"\n1553:                 ]\n1554:               },\n1555:               \"pointer\": {\n1556:                 \"type\": \"string\",\n1557:                 \"pattern\": \"^(?:/(?:[^~/]|~[01])*)*(?![\\\\s\\\\S])\"\n1558:               },\n1559:               \"relation\": {\n1560:                 \"enum\": [\n1561:                   \"eq\",\n1562:                   \"ne\",\n1563:                   \"gte\",\n1564:                   \"lte\",\n1565:                   \"contains\"\n1566:                 ]\n1567:               },\n1568:               \"value\": {\n1569:                 \"anyOf\": [\n1570:                   {\n1571:                     \"type\": [\n1572:                       \"string\",\n1573:                       \"integer\",\n1574:                       \"boolean\",\n1575:                       \"null\"\n1576:                     ]\n1577:                   },\n1578:                   {\n1579:                     \"type\": \"array\",\n1580:                     \"items\": {\n1581:                       \"type\": [\n1582:                         \"string\",\n1583:                         \"integer\",\n1584:                         \"boolean\",\n1585:                         \"null\"\n1586:                       ]\n1587:                     }\n1588:                   }\n1589:                 ]\n1590:               }\n1591:             }\n1592:           }\n1593:         },\n1594:         \"alternatives\": {\n1595:           \"type\": \"array\",\n1596:           \"minItems\": 1,\n1597:           \"items\": {\n1598:             \"type\": \"object\",\n1599:             \"additionalProperties\": false,\n1600:             \"required\": [\n1601:               \"action_kind\",\n1602:               \"subject_id\",\n1603:               \"reason\",\n1604:               \"premises\"\n1605:             ],\n1606:             \"properties\": {\n1607:               \"action_kind\": {\n1608:                 \"type\": \"string\",\n1609:                 \"minLength\": 1,\n1610:                 \"pattern\": \"\\\\S\"\n1611:               },\n1612:               \"subject_id\": {\n1613:                 \"type\": \"string\",\n1614:                 \"minLength\": 1,\n1615:                 \"pattern\": \"\\\\S\"\n1616:               },\n1617:               \"reason\": {\n1618:                 \"type\": \"string\",\n1619:                 \"minLength\": 1,\n1620:                 \"pattern\": \"\\\\S\"\n1621:               },\n1622:               \"premises\": {\n1623:                 \"type\": \"array\",\n1624:                 \"minItems\": 1,\n1625:                 \"items\": {\n1626:                   \"type\": \"object\",\n1627:                   \"additionalProperties\": false,\n1628:                   \"required\": [\n1629:                     \"source\",\n1630:                     \"pointer\",\n1631:                     \"relation\",\n1632:                     \"value\"\n1633:                   ],\n1634:                   \"properties\": {\n1635:                     \"source\": {\n1636:                       \"enum\": [\n1637:                         \"case\",\n1638:                         \"state\",\n1639:                         \"book\",\n1640:                         \"report\"\n1641:                       ]\n1642:                     },\n1643:                     \"pointer\": {\n1644:                       \"type\": \"string\",\n1645:                       \"pattern\": \"^(?:/(?:[^~/]|~[01])*)*(?![\\\\s\\\\S])\"\n1646:                     },\n1647:                     \"relation\": {\n1648:                       \"enum\": [\n1649:                         \"eq\",\n1650:                         \"ne\",\n1651:                         \"gte\",\n1652:                         \"lte\",\n1653:                         \"contains\"\n1654:                       ]\n1655:                     },\n1656:                     \"value\": {\n1657:                       \"anyOf\": [\n1658:                         {\n1659:                           \"type\": [\n1660:                             \"string\",\n1661:                             \"integer\",\n1662:                             \"boolean\",\n1663:                             \"null\"\n1664:                           ]\n1665:                         },\n1666:                         {\n1667:                           \"type\": \"array\",\n1668:                           \"items\": {\n1669:                             \"type\": [\n1670:                               \"string\",\n1671:                               \"integer\",\n1672:                               \"boolean\",\n1673:                               \"null\"\n1674:                             ]\n1675:                           }\n1676:                         }\n1677:                       ]\n1678:                     }\n1679:                   }\n1680:                 }\n1681:               }\n1682:             }\n1683:           }\n1684:         },\n1685:         \"rationale\": {\n1686:           \"type\": \"string\",\n1687:           \"minLength\": 1,\n1688:           \"pattern\": \"\\\\S\"\n1689:         }\n1690:       }\n1691:     }\n1692:   },\n1693:   \"$defs\": {\n1694:     \"money\": {\n1695:       \"type\": \"string\",\n1696:       \"maxLength\": 82,\n1697:       \"pattern\": \"^(?!-0(?:\\\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\\\.[0-9]{1,40})?$\",\n1698:       \"x-exact-decimal\": true,\n1699:       \"x-dimension\": \"money\"\n1700:     },\n1701:     \"scalar\": {\n1702:       \"type\": \"string\",\n1703:       \"maxLength\": 82,\n1704:       \"pattern\": \"^(?!-0(?:\\\\.0+)?$)-?(?:0|[1-9][0-9]*)(?:\\\\.[0-9]{1,40})?$\",\n1705:       \"x-exact-decimal\": true,\n1706:       \"x-dimension\": \"scalar\"\n1707:     },\n1708:     \"citation\": {\n1709:       \"type\": \"object\",\n1710:       \"additionalProperties\": false,\n1711:       \"required\": [\n1712:         \"exhibit_id\",\n1713:         \"locator\",\n1714:         \"claim\"\n1715:       ],\n1716:       \"properties\": {\n1717:         \"exhibit_id\": {\n1718:           \"type\": \"string\",\n1719:           \"minLength\": 1,\n1720:           \"maxLength\": 4096\n1721:         },\n1722:         \"locator\": {\n1723:           \"type\": \"string\",\n1724:           \"minLength\": 1,\n1725:           \"maxLength\": 4096\n1726:         },\n1727:         \"claim\": {\n1728:           \"enum\": [\n1729:             \"DAILY_FUNDING\",\n1730:             \"DAILY_CREDIT\",\n1731:             \"DAILY_CAPITAL\",\n1732:             \"DAILY_PROTECTION\",\n1733:             \"DAILY_ALLOCATION\",\n1734:             \"DAILY_LIQUIDITY\",\n1735:             \"DAILY_RECOGNITION\",\n1736:             \"DAILY_ATTRIBUTION\"\n1737:           ]\n1738:         }\n1739:       }\n1740:     },\n1741:     \"protection_contract\": {\n1742:       \"type\": \"object\",\n1743:       \"additionalProperties\": false,\n1744:       \"required\": [\n1745:         \"notional\",\n1746:         \"protected_exposure\",\n1747:         \"hedge_provider_EAD\",\n1748:         \"hedge_provider_collateral\",\n1749:         \"hedge_mark\",\n1750:         \"premium_accrued\",\n1751:         \"premium_paid\",\n1752:         \"remaining_years\",\n1753:         \"maturity_factor\",\n1754:         \"CCR_eligible\",\n1755:         \"designated\",\n1756:         \"expiry\"\n1757:       ],\n1758:       \"properties\": {\n1759:         \"notional\": {\n1760:           \"$ref\": \"#/$defs/money\"\n1761:         },\n1762:         \"protected_exposure\": {\n1763:           \"$ref\": \"#/$defs/money\"\n1764:         },\n1765:         \"hedge_provider_EAD\": {\n1766:           \"$ref\": \"#/$defs/money\"\n1767:         },\n1768:         \"hedge_provider_collateral\": {\n1769:           \"$ref\": \"#/$defs/money\"\n1770:         },\n1771:         \"hedge_mark\": {\n1772:           \"$ref\": \"#/$defs/money\"\n1773:         },\n1774:         \"premium_accrued\": {\n1775:           \"$ref\": \"#/$defs/money\"\n1776:         },\n1777:         \"premium_paid\": {\n1778:           \"$ref\": \"#/$defs/money\"\n1779:         },\n1780:         \"remaining_years\": {\n1781:           \"$ref\": \"#/$defs/scalar\"\n1782:         },\n1783:         \"maturity_factor\": {\n1784:           \"$ref\": \"#/$defs/scalar\"\n1785:         },\n1786:         \"CCR_eligible\": {\n1787:           \"type\": \"boolean\"\n1788:         },\n1789:         \"designated\": {\n1790:           \"type\": \"boolean\"\n1791:         },\n1792:         \"expiry\": {\n1793:           \"type\": \"string\",\n1794:           \"minLength\": 1,\n1795:           \"maxLength\": 4096\n1796:         }\n1797:       }\n1798:     },\n1799:     \"netting_set\": {\n1800:       \"type\": \"object\",\n1801:       \"additionalProperties\": false,\n1802:       \"required\": [\n1803:         \"RC\",\n1804:         \"PFE\",\n1805:         \"EAD\",\n1806:         \"add_on\",\n1807:         \"unmargined_cap\",\n1808:         \"V\",\n1809:         \"collateral\",\n1810:         \"SCVA\",\n1811:         \"MF\",\n1812:         \"SD\",\n1813:         \"multiplier\",\n1814:         \"remaining\",\n1815:         \"margined\",\n1816:         \"contracts\"\n1817:       ],\n1818:       \"properties\": {\n1819:         \"RC\": {\n1820:           \"$ref\": \"#/$defs/money\"\n1821:         },\n1822:         \"PFE\": {\n1823:           \"$ref\": \"#/$defs/money\"\n1824:         },\n1825:         \"EAD\": {\n1826:           \"$ref\": \"#/$defs/money\"\n1827:         },\n1828:         \"add_on\": {\n1829:           \"$ref\": \"#/$defs/money\"\n1830:         },\n1831:         \"unmargined_cap\": {\n1832:           \"$ref\": \"#/$defs/money\"\n1833:         },\n1834:         \"V\": {\n1835:           \"$ref\": \"#/$defs/money\"\n1836:         },\n1837:         \"collateral\": {\n1838:           \"$ref\": \"#/$defs/money\"\n1839:         },\n1840:         \"SCVA\": {\n1841:           \"$ref\": \"#/$defs/money\"\n1842:         },\n1843:         \"MF\": {\n1844:           \"$ref\": \"#/$defs/scalar\"\n1845:         },\n1846:         \"SD\": {\n1847:           \"$ref\": \"#/$defs/scalar\"\n1848:         },\n1849:         \"multiplier\": {\n1850:           \"$ref\": \"#/$defs/scalar\"\n1851:         },\n1852:         \"remaining\": {\n1853:           \"$ref\": \"#/$defs/scalar\"\n1854:         },\n1855:         \"margined\": {\n1856:           \"type\": \"boolean\"\n1857:         },\n1858:         \"contracts\": {\n1859:           \"type\": \"array\",\n1860:           \"maxItems\": 4096,\n1861:           \"items\": {\n1862:             \"type\": \"string\",\n1863:             \"minLength\": 1,\n1864:             \"maxLength\": 4096\n1865:           }\n1866:         }\n1867:       }\n1868:     },\n1869:     \"inventory_lot\": {\n1870:       \"type\": \"object\",\n1871:       \"additionalProperties\": false,\n1872:       \"required\": [\n1873:         \"instrument_id\",\n1874:         \"class\",\n1875:         \"quantity\",\n1876:         \"owner\",\n1877:         \"location\",\n1878:         \"issued\",\n1879:         \"encumbrance\",\n1880:         \"return_obligation\",\n1881:         \"reuse_permitted\",\n1882:         \"enforceability\",\n1883:         \"unit_price\",\n1884:         \"market_value\",\n1885:         \"realizable_now\"\n1886:       ],\n1887:       \"properties\": {\n1888:         \"instrument_id\": {\n1889:           \"type\": \"string\",\n1890:           \"minLength\": 1,\n1891:           \"maxLength\": 4096\n1892:         },\n1893:         \"class\": {\n1894:           \"enum\": [\n1895:             \"funding_reference\",\n1896:             \"deployment_collateral\",\n1897:             \"allocation_inventory\",\n1898:             \"replacement\",\n1899:             \"equivalent\",\n1900:             \"payment_rights\"\n1901:           ]\n1902:         },\n1903:         \"quantity\": {\n1904:           \"$ref\": \"#/$defs/scalar\"\n1905:         },\n1906:         \"owner\": {\n1907:           \"type\": \"string\",\n1908:           \"minLength\": 1,\n1909:           \"maxLength\": 4096\n1910:         },\n1911:         \"location\": {\n1912:           \"type\": \"string\",\n1913:           \"minLength\": 1,\n1914:           \"maxLength\": 4096\n1915:         },\n1916:         \"issued\": {\n1917:           \"type\": \"boolean\"\n1918:         },\n1919:         \"encumbrance\": {\n1920:           \"type\": [\n1921:             \"string\",\n1922:             \"null\"\n1923:           ],\n1924:           \"minLength\": 1,\n1925:           \"maxLength\": 256\n1926:         },\n1927:         \"return_obligation\": {\n1928:           \"type\": [\n1929:             \"string\",\n1930:             \"null\"\n1931:           ],\n1932:           \"minLength\": 1,\n1933:           \"maxLength\": 4096\n1934:         },\n1935:         \"reuse_permitted\": {\n1936:           \"type\": \"boolean\"\n1937:         },\n1938:         \"enforceability\": {\n1939:           \"enum\": [\n1940:             \"effective\",\n1941:             \"conditional\",\n1942:             \"denied\"\n1943:           ]\n1944:         },\n1945:         \"unit_price\": {\n1946:           \"anyOf\": [\n1947:             {\n1948:               \"$ref\": \"#/$defs/scalar\"\n1949:             },\n1950:             {\n1951:               \"type\": \"null\"\n1952:             }\n1953:           ]\n1954:         },\n1955:         \"market_value\": {\n1956:           \"anyOf\": [\n1957:             {\n1958:               \"$ref\": \"#/$defs/money\"\n1959:             },\n1960:             {\n1961:               \"type\": \"null\"\n1962:             }\n1963:           ]\n1964:         },\n1965:         \"realizable_now\": {\n1966:           \"type\": \"boolean\"\n1967:         }\n1968:       }\n1969:     },\n1970:     \"repo_lot\": {\n1971:       \"type\": \"object\",\n1972:       \"additionalProperties\": false,\n1973:       \"required\": [\n1974:         \"lender_id\",\n1975:         \"principal\",\n1976:         \"market_value\",\n1977:         \"counterparty_exposure\",\n1978:         \"RWA\",\n1979:         \"noncash_haircut_funding_cost\",\n1980:         \"noncash_capital_cost\",\n1981:         \"market_haircut\",\n1982:         \"supervisory_haircut\"\n1983:       ],\n1984:       \"properties\": {\n1985:         \"lender_id\": {\n1986:           \"type\": \"string\",\n1987:           \"minLength\": 1,\n1988:           \"maxLength\": 4096\n1989:         },\n1990:         \"principal\": {\n1991:           \"$ref\": \"#/$defs/money\"\n1992:         },\n1993:         \"market_value\": {\n1994:           \"$ref\": \"#/$defs/money\"\n1995:         },\n1996:         \"counterparty_exposure\": {\n1997:           \"$ref\": \"#/$defs/money\"\n1998:         },\n1999:         \"RWA\": {\n2000:           \"$ref\": \"#/$defs/money\"\n2001:         },\n2002:         \"noncash_haircut_funding_cost\": {\n2003:           \"$ref\": \"#/$defs/money\"\n2004:         },\n2005:         \"noncash_capital_cost\": {\n2006:           \"$ref\": \"#/$defs/money\"\n2007:         },\n2008:         \"market_haircut\": {\n2009:           \"$ref\": \"#/$defs/scalar\"\n2010:         },\n2011:         \"supervisory_haircut\": {\n2012:           \"$ref\": \"#/$defs/scalar\"\n2013:         }\n2014:       }\n2015:     },\n2016:     \"repo_contract\": {\n2017:       \"type\": \"object\",\n2018:       \"additionalProperties\": false,\n2019:       \"required\": [\n2020:         \"principal\",\n2021:         \"RWA\",\n2022:         \"interest_accrued\",\n2023:         \"maturity_date\",\n2024:         \"lots\"\n2025:       ],\n2026:       \"properties\": {\n2027:         \"principal\": {\n2028:           \"$ref\": \"#/$defs/money\"\n2029:         },\n2030:         \"RWA\": {\n2031:           \"$ref\": \"#/$defs/money\"\n2032:         },\n2033:         \"interest_accrued\": {\n2034:           \"$ref\": \"#/$defs/money\"\n2035:         },\n2036:         \"maturity_date\": {\n2037:           \"type\": \"string\",\n2038:           \"minLength\": 1,\n2039:           \"maxLength\": 4096\n2040:         },\n2041:         \"lots\": {\n2042:           \"type\": \"object\",\n2043:           \"maxProperties\": 4096,\n2044:           \"propertyNames\": {\n2045:             \"type\": \"string\",\n2046:             \"minLength\": 1,\n2047:             \"maxLength\": 256\n2048:           },\n2049:           \"additionalProperties\": {\n2050:             \"$ref\": \"#/$defs/repo_lot\"\n2051:           }\n2052:         }\n2053:       }\n2054:     },\n2055:     \"asset_detail\": {\n2056:       \"oneOf\": [\n2057:         {\n2058:           \"type\": \"object\",\n2059:           \"additionalProperties\": false,\n2060:           \"required\": [\n2061:             \"value\",\n2062:             \"RWA\",\n2063:             \"risk_weight\"\n2064:           ],\n2065:           \"properties\": {\n2066:             \"value\": {\n2067:               \"$ref\": \"#/$defs/money\"\n2068:             },\n2069:             \"RWA\": {\n2070:               \"$ref\": \"#/$defs/money\"\n2071:             },\n2072:             \"risk_weight\": {\n2073:               \"$ref\": \"#/$defs/scalar\"\n2074:             }\n2075:           }\n2076:         },\n2077:         {\n2078:           \"type\": \"object\",\n2079:           \"additionalProperties\": false,\n2080:           \"required\": [\n2081:             \"gross\",\n2082:             \"allowance\",\n2083:             \"RWA\",\n2084:             \"risk_weight\",\n2085:             \"included_in_derivative\"\n2086:           ],\n2087:           \"properties\": {\n2088:             \"gross\": {\n2089:               \"$ref\": \"#/$defs/money\"\n2090:             },\n2091:             \"allowance\": {\n2092:               \"$ref\": \"#/$defs/money\"\n2093:             },\n2094:             \"RWA\": {\n2095:               \"$ref\": \"#/$defs/money\"\n2096:             },\n2097:             \"risk_weight\": {\n2098:               \"$ref\": \"#/$defs/scalar\"\n2099:             },\n2100:             \"included_in_derivative\": {\n2101:               \"type\": \"boolean\"\n2102:             }\n2103:           }\n2104:         }\n2105:       ]\n2106:     },\n2107:     \"capital_asset\": {\n2108:       \"type\": \"object\",\n2109:       \"additionalProperties\": false,\n2110:       \"required\": [\n2111:         \"balance\",\n2112:         \"exposure\",\n2113:         \"RWA\",\n2114:         \"leverage_exposure\",\n2115:         \"basis\",\n2116:         \"details\"\n2117:       ],\n2118:       \"properties\": {\n2119:         \"balance\": {\n2120:           \"$ref\": \"#/$defs/money\"\n2121:         },\n2122:         \"exposure\": {\n2123:           \"$ref\": \"#/$defs/money\"\n2124:         },\n2125:         \"RWA\": {\n2126:           \"$ref\": \"#/$defs/money\"\n2127:         },\n2128:         \"leverage_exposure\": {\n2129:           \"$ref\": \"#/$defs/money\"\n2130:         },\n2131:         \"basis\": {\n2132:           \"type\": \"string\",\n2133:           \"minLength\": 1,\n2134:           \"maxLength\": 4096\n2135:         },\n2136:         \"details\": {\n2137:           \"type\": \"object\",\n2138:           \"maxProperties\": 4096,\n2139:           \"propertyNames\": {\n2140:             \"type\": \"string\",\n2141:             \"minLength\": 1,\n2142:             \"maxLength\": 256\n2143:           },\n2144:           \"additionalProperties\": {\n2145:             \"$ref\": \"#/$defs/asset_detail\"\n2146:           }\n2147:         }\n2148:       }\n2149:     },\n2150:     \"obligation\": {\n2151:       \"type\": \"object\",\n2152:       \"additionalProperties\": false,\n2153:       \"required\": [\n2154:         \"kind\",\n2155:         \"contract_id\",\n2156:         \"side\",\n2157:         \"remaining\",\n2158:         \"due_day\",\n2159:         \"status\"\n2160:       ],\n2161:       \"properties\": {\n2162:         \"kind\": {\n2163:           \"type\": \"string\",\n2164:           \"minLength\": 1,\n2165:           \"maxLength\": 4096\n2166:         },\n2167:         \"contract_id\": {\n2168:           \"type\": \"string\",\n2169:           \"minLength\": 1,\n2170:           \"maxLength\": 4096\n2171:         },\n2172:         \"side\": {\n2173:           \"enum\": [\n2174:             \"payable\",\n2175:             \"receivable\"\n2176:           ]\n2177:         },\n2178:         \"remaining\": {\n2179:           \"$ref\": \"#/$defs/money\"\n2180:         },\n2181:         \"due_day\": {\n2182:           \"type\": \"integer\",\n2183:           \"minimum\": -366000\n2184:         },\n2185:         \"status\": {\n2186:           \"enum\": [\n2187:             \"open\",\n2188:             \"paid\",\n2189:             \"written_off\",\n2190:             \"disputed\"\n2191:           ]\n2192:         }\n2193:       }\n2194:     },\n2195:     \"terminal_obligation\": {\n2196:       \"type\": \"object\",\n2197:       \"additionalProperties\": false,\n2198:       \"required\": [\n2199:         \"kind\",\n2200:         \"side\",\n2201:         \"remaining\",\n2202:         \"status\"\n2203:       ],\n2204:       \"properties\": {\n2205:         \"kind\": {\n2206:           \"type\": \"string\",\n2207:           \"minLength\": 1,\n2208:           \"maxLength\": 4096\n2209:         },\n2210:         \"side\": {\n2211:           \"enum\": [\n2212:             \"payable\",\n2213:             \"receivable\"\n2214:           ]\n2215:         },\n2216:         \"remaining\": {\n2217:           \"$ref\": \"#/$defs/money\"\n2218:         },\n2219:         \"status\": {\n2220:           \"enum\": [\n2221:             \"open\",\n2222:             \"paid\",\n2223:             \"written_off\",\n2224:             \"disputed\"\n2225:           ]\n2226:         }\n2227:       }\n2228:     },\n2229:     \"ava_exposure\": {\n2230:       \"type\": \"object\",\n2231:       \"additionalProperties\": false,\n2232:       \"required\": [\n2233:         \"id\",\n2234:         \"exposure_id\",\n2235:         \"account\",\n2236:         \"recognised_fair_value\",\n2237:         \"low_exit_cost\",\n2238:         \"high_exit_cost\",\n2239:         \"expected_exit_cost_benchmark\",\n2240:         \"q90_exit_cost\",\n2241:         \"same_source_accounting_prudence\",\n2242:         \"residual_uncertainty\",\n2243:         \"AVA\",\n2244:         \"cet1_sensitivity\"\n2245:       ],\n2246:       \"properties\": {\n2247:         \"id\": {\n2248:           \"type\": \"string\",\n2249:           \"minLength\": 1,\n2250:           \"maxLength\": 4096\n2251:         },\n2252:         \"exposure_id\": {\n2253:           \"type\": \"string\",\n2254:           \"minLength\": 1,\n2255:           \"maxLength\": 4096\n2256:         },\n2257:         \"account\": {\n2258:           \"type\": \"string\",\n2259:           \"minLength\": 1,\n2260:           \"maxLength\": 4096\n2261:         },\n2262:         \"recognised_fair_value\": {\n2263:           \"$ref\": \"#/$defs/money\"\n2264:         },\n2265:         \"low_exit_cost\": {\n2266:           \"$ref\": \"#/$defs/money\"\n2267:         },\n2268:         \"high_exit_cost\": {\n2269:           \"$ref\": \"#/$defs/money\"\n2270:         },\n2271:         \"expected_exit_cost_benchmark\": {\n2272:           \"$ref\": \"#/$defs/money\"\n2273:         },\n2274:         \"q90_exit_cost\": {\n2275:           \"$ref\": \"#/$defs/money\"\n2276:         },\n2277:         \"same_source_accounting_prudence\": {\n2278:           \"$ref\": \"#/$defs/money\"\n2279:         },\n2280:         \"residual_uncertainty\": {\n2281:           \"$ref\": \"#/$defs/money\"\n2282:         },\n2283:         \"AVA\": {\n2284:           \"$ref\": \"#/$defs/money\"\n2285:         },\n2286:         \"cet1_sensitivity\": {\n2287:           \"$ref\": \"#/$defs/scalar\"\n2288:         }\n2289:       }\n2290:     }\n2291:   },\n2292:   \"x-daily-owners\": {\n2293:     \"O1\": {\n2294:       \"weight\": 7,\n2295:       \"panel\": \"DAILY_FUNDING\",\n2296:       \"evidence_array\": \"/rates/evidence\",\n2297:       \"fields\": [\n2298:         \"/rates/funding_notional\",\n2299:         \"/rates/unsettled_stub\",\n2300:         \"/rates/legal_funding_mark\",\n2301:         \"/rates/quoted_funding_component\",\n2302:         \"/rates/management_funding_gain\",\n2303:         \"/rates/reference_return_adjustment\",\n2304:         \"/rates/funding_remaining_years\",\n2305:         \"/rates/deployment_remaining_years\",\n2306:         \"/rates/last_reset_price\",\n2307:         \"/rates/next_payment_delay\",\n2308:         \"/rates/reference_price\",\n2309:         \"/rates/replacement_spread\",\n2310:         \"/rates/quote_annuity\",\n2311:         \"/rates/quote_id\",\n2312:         \"/rates/principal_source\",\n2313:         \"/rates/trs_principal_received\",\n2314:         \"/rates/deployment_coupon_spread\",\n2315:         \"/rates/roles\"\n2316:       ]\n2317:     },\n2318:     \"O2\": {\n2319:       \"weight\": 7,\n2320:       \"panel\": \"DAILY_CREDIT\",\n2321:       \"evidence_array\": \"/credit_xva/evidence\",\n2322:       \"fields\": [\n2323:         \"/credit_xva/provider_cds\",\n2324:         \"/credit_xva/own_bond_spread\",\n2325:         \"/credit_xva/own_cds_spread\",\n2326:         \"/credit_xva/bond_cds_basis\",\n2327:         \"/credit_xva/CVA\",\n2328:         \"/credit_xva/KVA_component\",\n2329:         \"/credit_xva/UFVA\",\n2330:         \"/credit_xva/actual_unsecured_debt\",\n2331:         \"/credit_xva/annual_debt_funding_cost\",\n2332:         \"/credit_xva/reserve_borrowing\",\n2333:         \"/credit_xva/projection\"\n2334:       ]\n2335:     },\n2336:     \"O3\": {\n2337:       \"weight\": 10,\n2338:       \"panel\": \"DAILY_CAPITAL\",\n2339:       \"evidence_array\": \"/capital/evidence\",\n2340:       \"fields\": [\n2341:         \"/capital/SA_CCR\",\n2342:         \"/capital/CCR_RWA\",\n2343:         \"/capital/CCR_K\",\n2344:         \"/capital/CVA_K\",\n2345:         \"/capital/market_risk_K\",\n2346:         \"/capital/RWA\",\n2347:         \"/capital/leverage_exposure\",\n2348:         \"/capital/risk_requirement\",\n2349:         \"/capital/leverage_requirement\",\n2350:         \"/capital/required_capital\",\n2351:         \"/capital/Tier1_before_AVA\",\n2352:         \"/capital/AVA\",\n2353:         \"/capital/Tier1_after_AVA\",\n2354:         \"/capital/capital_shortfall\",\n2355:         \"/capital/capital_release_cash\",\n2356:         \"/capital/executable_under_stated_capital\",\n2357:         \"/capital/binding_constraint\",\n2358:         \"/capital/deployment\",\n2359:         \"/capital/asset_map\"\n2360:       ]\n2361:     },\n2362:     \"O4\": {\n2363:       \"weight\": 7,\n2364:       \"panel\": \"DAILY_PROTECTION\",\n2365:       \"evidence_array\": \"/credit_xva/evidence\",\n2366:       \"fields\": [\n2367:         \"/credit_xva/protection\"\n2368:       ]\n2369:     },\n2370:     \"O5\": {\n2371:       \"weight\": 8,\n2372:       \"panel\": \"DAILY_ALLOCATION\",\n2373:       \"evidence_array\": \"/liquidity/evidence\",\n2374:       \"fields\": [\n2375:         \"/capital/repo\",\n2376:         \"/liquidity/allocation\",\n2377:         \"/liquidity/facility_limit\",\n2378:         \"/liquidity/facility_available\"\n2379:       ]\n2380:     },\n2381:     \"O6\": {\n2382:       \"weight\": 7,\n2383:       \"panel\": \"DAILY_LIQUIDITY\",\n2384:       \"evidence_array\": \"/liquidity/evidence\",\n2385:       \"fields\": [\n2386:         \"/liquidity/cash\",\n2387:         \"/liquidity/restricted_cash\",\n2388:         \"/liquidity/restricted_collections\",\n2389:         \"/liquidity/posted_vm\",\n2390:         \"/liquidity/received_vm\",\n2391:         \"/liquidity/facility_debt\",\n2392:         \"/liquidity/repo_debt\",\n2393:         \"/liquidity/unpaid_receivable\",\n2394:         \"/liquidity/unpaid_payable\",\n2395:         \"/liquidity/due_payables\",\n2396:         \"/liquidity/deadline_shortfall\",\n2397:         \"/liquidity/market_open\",\n2398:         \"/liquidity/transfer_blocks\",\n2399:         \"/liquidity/inventory\",\n2400:         \"/liquidity/obligations\",\n2401:         \"/liquidity/accepted_action_count\"\n2402:       ]\n2403:     },\n2404:     \"O7\": {\n2405:       \"weight\": 6,\n2406:       \"panel\": \"DAILY_RECOGNITION\",\n2407:       \"evidence_array\": \"/accounting/evidence\",\n2408:       \"fields\": [\n2409:         \"/accounting/statutory/accounting_unit\",\n2410:         \"/accounting/statutory/funding_derivative_asset\",\n2411:         \"/accounting/statutory/owner_contribution_pnl\",\n2412:         \"/accounting/management/gross_inception_gain\",\n2413:         \"/accounting/management/deferred_gain\",\n2414:         \"/accounting/management/observable_at_inception\",\n2415:         \"/accounting/management/currently_observable\",\n2416:         \"/accounting/management/deferral_released_by_evidence\"\n2417:       ]\n2418:     },\n2419:     \"O8\": {\n2420:       \"weight\": 8,\n2421:       \"panel\": \"DAILY_ATTRIBUTION\",\n2422:       \"evidence_array\": \"/accounting/evidence\",\n2423:       \"fields\": [\n2424:         \"/accounting/statutory/assets\",\n2425:         \"/accounting/statutory/liabilities\",\n2426:         \"/accounting/statutory/allowances\",\n2427:         \"/accounting/statutory/contributed_equity\",\n2428:         \"/accounting/statutory/equity\",\n2429:         \"/accounting/statutory/cumulative_pnl\",\n2430:         \"/accounting/statutory/trial_balance\",\n2431:         \"/accounting/statutory/balances\",\n2432:         \"/accounting/statutory/booked_balances\",\n2433:         \"/accounting/statutory/valuation_postings\",\n2434:         \"/accounting/management/funding_mark\",\n2435:         \"/accounting/management/hedge_asset\",\n2436:         \"/accounting/management/CVA_reserve\",\n2437:         \"/accounting/management/KVA_reserve\",\n2438:         \"/accounting/management/overlay_equity\",\n2439:         \"/accounting/management/equity\",\n2440:         \"/accounting/management/cumulative_pnl\",\n2441:         \"/accounting/management/trial_balance\",\n2442:         \"/accounting/management/balances\",\n2443:         \"/accounting/management/valuation_postings\",\n2444:         \"/accounting/bridge\",\n2445:         \"/accounting/attribution\",\n2446:         \"/accounting/terminal\"\n2447:       ]\n2448:     },\n2449:     \"O9\": {\n2450:       \"weight\": 10,\n2451:       \"section\": \"legal\",\n2452:       \"fields\": [\n2453:         \"/legal\"\n2454:       ]\n2455:     },\n2456:     \"O10\": {\n2457:       \"weight\": 10,\n2458:       \"section\": \"compliance\",\n2459:       \"fields\": [\n2460:         \"/compliance\"\n2461:       ]\n2462:     },\n2463:     \"O11\": {\n2464:       \"weight\": 10,\n2465:       \"section\": \"structure\",\n2466:       \"fields\": [\n2467:         \"/structure\"\n2468:       ]\n2469:     },\n2470:     \"O12\": {\n2471:       \"weight\": 10,\n2472:       \"section\": \"recommendation\",\n2473:       \"fields\": [\n2474:         \"/recommendation\"\n2475:       ]\n2476:     }\n2477:   },\n2478:   \"x-resource-policy\": \"fixtures/desk-policy.json#/daily_report\",\n2479:   \"x-evidence-contract\": \"Financial owners require exact current exhibit_id, locator and DAILY_* claim bindings. Institutional owners require source-entailing conclusion-specific premises and accept supported alternative positions. Reference defects are UNSCORABLE; wording is not graded. Client outcome credit requires an actually workable result, not merely an accurate report.\",\n2480:   \"x-fatal-scope\": \"Legal roles/title, phantom cash, ineligible mitigation, fabricated facility capacity, duplicate funding statutory asset, omitted surviving claims and actual overdue obligations are independent qualification predicates, never arithmetic score multipliers.\"\n2481: }\n","tool_call_id":"call_1e56fb75427f5b53aae3ec55da4e474e","type":"tool_result"}},{"step":4,"generation":0,"created_at":"2026-09-20T09:53:23.123Z","event":{"stop_reason":"tool_calls","tool_calls":[{"id":"call_bfe5dc85a3dc598eb8ee5ac2c1be852a","name":"bash","arguments":"{\"command\":\"find /work/data/artifacts/qyaws7fs/documents -type f | sort; find /work/receipts -maxdepth 2 -type f; python - <<'PY'\\nimport json\\nfor n in ['state','parameters','policy','case']:\\n d=json.load(open('/work/data/artifacts/qyaws7fs/'+n+'.json')); print(n, list(d))\\np=json.load(open('/packet/packet.json')); print('packet',list(p))\\nPY\",\"timeout\":300,\"max_output_length\":12000}"}],"type":"assistant","usage":{"prompt_tokens":27430,"completion_tokens":132,"total_tokens":27562,"cache_read_tokens":5140}}},{"step":4,"generation":0,"created_at":"2026-09-20T09:53:23.194Z","event":{"content":"STDOUT:\n/work/data/artifacts/qyaws7fs/documents/CURRENT_INPUTS.json\n/work/data/artifacts/qyaws7fs/documents/docs/capital-actions.md\n/work/data/artifacts/qyaws7fs/documents/docs/capital-rulebook.md\n/work/data/artifacts/qyaws7fs/documents/docs/desk-runtime-contract.md\n/work/data/artifacts/qyaws7fs/documents/docs/economic-specification.md\n/work/data/artifacts/qyaws7fs/documents/docs/reference-input-contract.md\n/work/data/artifacts/qyaws7fs/documents/docs/reserve-module.md\n/work/data/artifacts/qyaws7fs/documents/family/worker/legal-terms.txt\n/work/data/artifacts/qyaws7fs/documents/fixtures/desk-policy.json\n/work/data/artifacts/qyaws7fs/documents/schemas/daily-report.schema.json\n/work/receipts/page-6d1645a487425409f4da8db6aa0d4fcaab93ce7b8516b65ce41eaaf60d2ad165-0-415.json\nstate ['accepted_action_count', 'accepted_action_ids', 'accounts', 'applied_event_ids', 'as_of', 'contracts', 'day', 'family_id', 'financial_time', 'last_receipt_hash', 'last_receipt_sequence', 'legal', 'legal_version', 'lots', 'market', 'market_version', 'obligations', 'pending', 'revision', 'schema_version']\nparameters ['actions', 'allocation', 'book', 'currency', 'day_one_accounting', 'deployment_coupon_spread', 'deployment_years', 'desk', 'execution_margin', 'funding_contract', 'funding_years', 'incurred_CVA', 'internal_AAA_initial', 'leverage_snapshot', 'notional', 'ois', 'opening_free_cash', 'opening_legacy_funding', 'opening_legacy_spread', 'own_CDS_spread', 'own_bond_spread', 'provider_CDS', 'provider_recovery', 'quarter', 'reference_coupon_spread', 'regulatory', 'replacement_margin', 'replacement_quote', 'schema_version', 'whole_book']\npolicy ['accounting', 'calendar', 'capital', 'collections', 'csa', 'daily_report', 'defaults', 'execution', 'facility', 'institutional', 'inventory', 'name', 'offset', 'opening', 'prices', 'protection', 'prudent_valuation', 'reinvestment', 'repo', 'resource_limits', 'rights', 'schema_version', 'source_documents', 'source_evidence', 'status', 'substitution']\ncase ['agreements', 'as_of', 'bank', 'base_currency', 'book', 'collateral', 'counterparty_constraints', 'instruments', 'mandate', 'netting_sets', 'opinions', 'parties']\npacket ['as_of', 'available_events', 'calculator', 'day', 'event_bindings', 'family_id', 'legal_version', 'market_version', 'parent_state_hash', 'phases', 'policy', 'prior_receipts', 'public_inputs', 'quotes', 'receipt_window', 'revision', 'run_id', 'schema_version', 'state']\n\n\nSTATUS:\nFinished normally at 2026-09-20T09:53:23Z (elapsed=0.07s)","tool_call_id":"call_bfe5dc85a3dc598eb8ee5ac2c1be852a","type":"tool_result"}},{"step":5,"generation":0,"created_at":"2026-09-20T09:56:19.511Z","event":{"stop_reason":"tool_calls","tool_calls":[{"id":"call_1ae949ef424e5d7ea7dfd4bc05c16d19","name":"view_file","arguments":"{\"path\":\"/work/data/artifacts/qyaws7fs/documents/docs/economic-specification.md\",\"show_anchors\":false}"},{"id":"call_4660ca1dae1654eb993ec3bddf8c93a4","name":"view_file","arguments":"{\"path\":\"/work/data/artifacts/qyaws7fs/documents/docs/desk-runtime-contract.md\",\"show_anchors\":false}"},{"id":"call_60a9479699d553e1a96e1143ed5e8b92","name":"view_file","arguments":"{\"path\":\"/work/data/artifacts/qyaws7fs/documents/docs/reserve-module.md\",\"show_anchors\":false}"},{"id":"call_6034209b367f5a89ba5195ce8a2dc776","name":"view_file","arguments":"{\"path\":\"/work/data/artifacts/qyaws7fs/documents/docs/reference-input-contract.md\",\"show_anchors\":false}"}],"type":"assistant","usage":{"prompt_tokens":28275,"completion_tokens":166,"total_tokens":28441,"cache_read_tokens":27428}}},{"step":5,"generation":0,"created_at":"2026-09-20T09:56:19.512Z","event":{"content":"File: /work/data/artifacts/qyaws7fs/documents/docs/reference-input-contract.md\n   1: # Reference input contract\n   2: \n   3: This annex defines the implemented BOOK reference conventions. It supplies fictional premises, not external legal opinions, market observations or a regulatory approval. The parameter schema, reference validator and the Python calculations share this contract. An unsupported convention is a reference error, not permission to choose a nearby method.\n   4: \n   5: ## Numeric and legal boundaries\n   6: \n   7: Economic numbers in JSON are exact decimal strings: no JSON numbers, booleans, exponents, whitespace, nonfinite values or negative zero. Explicit `\"0\"` is valid wherever the field's domain allows zero. Counts and array indices are integers under their own schema definitions, not monetary inputs. Internal calculations may pass finite `Decimal` values without converting through binary floating point.\n   8: \n   9: The reference loaders reject duplicate JSON keys. Named cases, scenarios, collateral states, uncertainty exposures, allocation lots and legal/market/custody records reject duplicate IDs; duplicate asset positions in one custody account are also errors. Missing required values, legal agreements, opinions, eligibility facts or source documents do not become zero exposure or a guessed rating. Both calculator CLIs validate their complete parameter input before computing. Bundle construction precedes reading the candidate: a reference failure returns `UNSCORABLE`, `cause=reference_error`, without a score or qualification verdict.\n  10: \n  11: The supported cash model uses same-currency OIS-linked securities with one currency unit of face and redemption per unit, an opening sale at par and equal sale proceeds, funding notional and deployment principal. The legal reference coupon and deployment coupon must match their numerical inputs. Deployment repays principal at maturity into OIS cash. The opening accounting unit retains the reference asset, recognises the financing liability, does not recognise a separate statutory derivative, and keeps the management ledger separate. Changing those authored terms without an implemented accounting or cash transition is rejected.\n  12: \n  13: <a id=\"supported-policy-ids\"></a>\n  14: ## Supported policy IDs\n  15: \n  16: Each path below accepts only its listed ID. Descriptive `scope`, explanation and reporting-panel text are metadata; their words never choose an economic formula.\n  17: \n  18: | Parameter path | Supported ID | Implemented convention |\n  19: |---|---|---|\n  20: | `desk.capital_sampling` | `beginning_interval_end_payment` | Sample capital at each interval's opening and pay its charge at the scheduled period end. |\n  21: | `desk.discount_convention` | `nominal_ois_compounded_contract_quarter` | Discount with `(1 + OIS × quarter)^(-years/quarter)`; the same convention prices quarterly annuities. |\n  22: | `desk.day1_deferral_policy` | `frozen_pricing_annuity_management_deferral` | Freeze the inception pricing-annuity deferral basis; subsequent reserve remeasurement is a separate management entry. |\n  23: | `desk.CVA_default_grid` | `quarter_end_constant_cds_lgd` | Constant hazard from CDS/LGD, default only after payment on original funding quarter ends, with action status evaluated at that default date. Execution does not create another default date. |\n  24: | `desk.CVA_KVA_survival` | `default_weighted_cva_contractual_kva` | CVA uses survival/default weights; contractual capital charges do not receive an extra survival factor. |\n  25: | `desk.action_timing` | `business_day_event_grid_next_quarter_payment` | Split capital-service accrual at business-day execution; pay each piece at the next original contract payment date. This does not alter the CVA default grid. |\n  26: | `conditional_reserve_facility.target` | `positive_incremental_funding_mark_ois_deposit` | An executed, separately scoped facility prefunds the positive incremental funding mark in an OIS deposit. |\n  27: | `conditional_reserve_facility.default_model` | `deterministic_no_default` | The conditional facility illustration has no stochastic default path. |\n  28: | `conditional_reserve_facility.deposit_remuneration` | `OIS` | Deposit earns the supplied OIS curve. |\n  29: | `conditional_reserve_facility.cash_interest` | `OIS` | Free cash earns the supplied OIS curve. |\n  30: | `conditional_reserve_facility.coupons_paid_from` | `opening_cash_then_executed_deficit_facility` | Pay coupons from real cash, then from an independently executed deficit facility within its limit. |\n  31: | `cash_ledger.free_cash_remuneration` | `OIS` | Cash and reinvestment use the supplied OIS curve. |\n  32: | `cash_ledger.price_return_accounting` | `retained_asset_settled_price_adjusts_financing` | Retain U; settled principal/price returns adjust the financing liability. A management reserve expense does not borrow cash. |\n  33: | `cash_ledger.surplus_policy` | `repay_deficit_then_retain_cash` | Sweep available surplus to outstanding deficit debt before retaining cash. |\n  34: | `cash_ledger.capital_covenant` | `no_automatic_acceleration` | Capital deficiency does not itself invent an accelerated cash payment. |\n  35: | `day_one_accounting.service_fee_treatment` | `inception_consumed_service_expense` | The paid day-one service fee is consumed at inception and expensed, separately from management deferral. |\n  36: | `whole_book.capital_gate` | `minimum_capital_blocks_new_execution` | Compare supplied qualifying Tier1 after AVA with the greater of risk and leverage minima; a shortfall blocks new execution without creating equity. |\n  37: | `replacement_quote.conversion` | `remaining_quarterly_annuity` | Convert the matched quoted financing margin using the stated rate and remaining tenor; the required `off_quarter_convention=fractional_remaining_annuity_clean_quote` supplies its fractional-power extension off quarter dates, not an exact original-coupon valuation. |\n  38: | `actions.netting.other_trade.quote.conversion` | `upfront_implied_spread_remaining_annuity` | Infer a spread from the executable upfront and its inception annuity; roll that spread on the remaining annuity. |\n  39: | `actions.CDS.replacement_quote.conversion` | `cds_spread_difference_remaining_annuity` | Value the quoted CDS spread difference on its remaining quarterly annuity. |\n  40: | `reserve_uncertainty.method` | `incremental_core_model_risk_method_1` | Apply the specified incremental Method 1 model-risk AVA illustration, with required alpha and confidence inputs. |\n  41: \n  42: <a id=\"substitution-eligibility\"></a>\n  43: ## Substitution eligibility\n  44: \n  45: The fictional replacement action supplies its own correlation, issuance, enforceability, market-liquidity and currency facts. In the canonical action it is issued, enforceable, market-liquid and same-currency, and has no material positive correlation with the deployment obligor. Its issuer, rating, quantity and coupon remain the separately supplied action terms. These are explicit fictional premises supplementing the issued independent AAA replacement described in `capital-actions.md`; they are not inferred from the word “AAA”, an empty field or a resolving citation.\n  46: \n  47: The controlled collateral-price/rating comparison independently supplies the same five facts and its own eligibility source reference. It does not inherit them from the action. A false issuance, enforceability or liquidity fact, or true material correlation, prevents recognised collateral mitigation. A currency mismatch invokes the stated FX haircut rather than being silently reset to same-currency. Missing or mistyped facts fail validation. Ratings and market spread changes remain independent inputs.\n  48: \n  49: ## Actual-book AVA\n  50: \n  51: `whole_book.AVA` is the explicitly supplied actual-book deduction, applied to Tier1 at every actual beginning-of-interval capital observation in both the core opening comparison and ReserveLedger's full-book profile. It changes available capital and shortfall, not required capital, accounting equity or cash. The canonical value is `\"0\"`; this is an input, not a hard-coded model assumption.\n  52: \n  53: `leverage_snapshot.AVA` and `reserve_uncertainty` remain separately scoped controlled illustrations. They are not added to `whole_book.AVA`. A nonzero actual-book input must preserve that separation. The D2 probe changes only actual-book AVA and records the core/reserve capital bridge and unchanged cash journals.\n  54: \n  55: ## Default inventory\n  56: \n  57: No economic dictionary lookup in `numerical_fixture.py`, `reserve_ledger.py` or `validate_exhibits.py` supplies a value when a reference key is missing. Remaining `schema.get(\"type\")` calls classify schema structure only; they do not obtain economic data. The grader likewise has no defaulting dictionary lookup for reference economics.\n  58: \n  59: Optional calculation arguments have specific, bounded meanings:\n  60: \n  61: - `discount`/`annuity` with no rate read the required `ois` parameter; they do not invent an interest rate.\n  62: - `saccr` with no override reads required book notional, AAA supervisory factor and contract margin terms. Its default credit delta is the stated receive-total-return baseline. Explicit aggregation overrides are supplied only by the netting calculation.\n  63: - `funding_profile`/`funding_capital` default to the unhedged, unmargined comparator. A hedge's omitted *override* tenor reads the required CDS contract tenor, not a guessed maturity. `cva` defaults to that same unmargined comparator.\n  64: - `collateral_state` with no exposure override uses book notional before scheduled loan maturity and zero thereafter. Loan elapsed time rolls down the collateral's independently supplied initial `residual_years`; neither its residual nor its original maturity is replaced by the loan's maturity. An explicitly supplied positive exposure at scheduled maturity remains unsecured pending separate settlement/recovery evidence.\n  65: - Empty optional capital event lists mean no extra capital sampling points. CVA always uses original funding payment dates; a remaining tail begins with the stub to the next original payment rather than a new quarter measured from execution or expiry.\n  66: - Zero aggregation buckets for newly assigned issuers, empty journal-date buckets, and custody positions created by settled receipts are derived state initialisation. Opening positions and input amounts must already exist.\n  67: - Zero mitigation for explicit ineligibility, zero unexecuted facility usage, zero expired scheduled exposure and terminal zero remaining scheduled KVA are calculated outcomes. They do not discharge an unresolved settlement claim.\n  68: - Undefined ratios may be `null` when their calculated denominator is zero. CLI section selection and output serialization options change presentation only.\n  69: \n  70: D2 exercises the current BOOK financial and legal fields, including attached security agreements and opinions. It does not claim to test tranche attachment points or a copula model: neither is an input dimension of this implementation. Those dimensions are recorded as `not_exercised` rather than represented by fabricated fields.\n  71: \n  72: <a id=\"settlement-and-quote-clock\"></a>\n  73: ## Settlement and quote clock\n  74: \n  75: `funding_contract.next_price_settlement_years` supplies the inception snapshot's actual delay to its next reference-price settlement. At a rolled observation, `funding_mark` requires both `next_payment_delay` and `unsettled_stub`, including an explicit zero. Same-day pending settlement uses delay zero; it does not receive a fresh quarter discount. A surviving unsettled reference return or stub at zero scheduled tenor requires a separate claim valuation and is rejected by the scheduled-contract mark.\n  76: \n  77: The synthetic clean quote's `off_quarter_convention` extends `(1-D_r(h))/r` to fractional remaining quarters. This is a spread-to-upfront quote convention. It is not a discounted sum of the original contract's irregular coupon cash flows. Profiles support post-reference-settlement clean quotes and zero unsettled stubs only; original-reference inclusive quotes remain instantaneous observations and are not rolled without a new quote surface. Tail CVA and capital payments retain the original funding quarter clock.\n  78: \n  79: <a id=\"collateral-maturity-facts\"></a>\n  80: ## Independent collateral maturity\n  81: \n  82: The original pledge, replacement action and controlled comparison each supply collateral `original_years` and initial `residual_years` (the replacement uses `replacement_residual_years`). At loan elapsed time e, collateral residual life is `max(initial_residual_years-e,0)`. Price and supervisory-haircut bucket use that collateral life. The already haircut-adjusted eligible collateral is then multiplied by the maturity factor from [CRE22.10–14 and CRE22.47](https://www.bis.org/committees/bcbs/basel-framework/standard/cre/22/inforce/2023-01-01/published/2020-11-26#22.10). An originally sub-one-year mismatched instrument or mismatched residual at or below three months supplies no recognised mitigation. The canonical collateral and deployment both have five-year original and residual life. Maturing collateral does not create an invented reinvestment or redemption receipt in this capital calculation.\n  83: \n  84: <a id=\"mpor-floor-facts\"></a>\n  85: ## MPOR floor facts\n  86: \n  87: The funding set and H's CDS margin set independently attest non-central clearing, whole-business-day re-margining interval, hard-to-replace/illiquid status, whether the set exceeds 5,000 transactions, and qualifying repeated margin disputes. In this fictional case both are daily-margined, hard to replace, below that size threshold and without qualifying repeated disputes. Both supplied MPORs are 20 business days.\n  88: \n  89: [CRE52.50–51](https://www.bis.org/committees/bcbs/basel-framework/standard/cre/52/inforce/2023-01-01/published/2020-06-05#52.50) supplies a floor of nine business days plus the re-margining period, at least 20 for the stated illiquidity/size conditions. Qualifying dispute history means more than two disputes in the previous two quarters lasting beyond the otherwise applicable MPOR; it doubles the applicable floor for the subsequent two quarters. The engine rejects a supplied MPOR below its evidenced floor rather than silently accepting it. Central clearing is outside this branch.\n  90: \n  91: <a id=\"protection-recognition-facts\"></a>\n  92: ## Protection recognition facts\n  93: \n  94: The canonical CDS directly protects P under `FUND_TRS`; H is a separate eligible protection provider. Fictional legal terms attest enforceability, irrevocable/unconditional direct protection, all three required credit events, applicable grace-period coverage, timely robust cash settlement, independent credit-event determination, and a reference obligation no senior to the protected obligation with the stated same-obligor cross-default link. The explicit identity and evidence fields are prerequisites, not conclusions inferred from a rating. Missing qualification is rejected; partial event cover and proxy credit hedges are not implemented.\n  95: \n  96: [CRE22.71, CRE22.74 and CRE22.76](https://www.bis.org/committees/bcbs/basel-framework/standard/cre/22/inforce/2023-01-01/published/2020-11-26#22.71) govern the selected recognition branch. A valid CDS from H whose risk weight is not strictly below P's receives no default-risk substitution relief. Its economic seller risk and separately calculated CVA exposure are not deleted. `hedge_provider_CVA_method=desk_annex_normal_saccr` explicitly selects the normal-SA-CCR exposure convention for H's CVA in this desk annex; it is not a claim that CRE51.16 alone prescribes that CVA method.\n  97: \n  98: <a id=\"leverage-recognition-facts\"></a>\n  99: ## Leverage recognition facts\n 100: \n 101: For nonzero margin, the fictional CSA terms attest settled daily cash exchange, non-segregation/reuse, same currency, full-mark exchange and one legally enforceable master agreement covering the derivative and VM. These narrower same-currency terms satisfy the selected [LEV30.24–25](https://www.bis.org/committees/bcbs/basel-framework/standard/lev/30/inforce/2023-01-01/published/2020-03-27#30.24) branch. Missing or false facts reject that calculation; securities margin, segregated or delayed cash, partial/disputed VM and other-currency alternatives have no silent qualifying-VM fallback. The supplied cash balance is after VM transfer. A posted qualifying VM receivable is excluded from on-balance leverage assets under LEV30.25 and instead included in derivative RC; it must not also be hidden in another supplied asset bucket.\n 102: \n 103: `whole_book.written_credit_contract` identifies the same funding contract and U reference as the calculated funding row and attests that it is unoffset. Full written notional must equal the funding notional in both `whole_book` and `leverage_snapshot`. The optional [LEV30.35](https://www.bis.org/committees/bcbs/basel-framework/standard/lev/30/inforce/2023-01-01/published/2020-03-27#30.35) PFE exclusion therefore removes only the already included unoffset written contract. Zero/partial W, purchased-protection offsets and a mixed written population require a different implemented contract and are rejected. Buying CDS on P is not protection on U and does not remove U's written notional.\n 104: \n 105: <a id=\"conditional-quote-target\"></a>\n 106: ## Conditional quote target\n 107: \n 108: Both the analytic calculation and executed deposit ledger use the replacement quote's own `scenario_margin_beta` and `conversion_rate`, while discounting funding expense at OIS. The positive target is `N*A_quote(h)*max(quote_beta*x,0)`, not `N*A_OIS(h)*max(x,0)` unless those distinct inputs happen to coincide. An unexecuted primary facility has no primary funding cost or fee.\n 109: \n 110: The current deterministic experiment requires `reusable_VM=\"0\"`. The combined net-deposit-minus-reusable-VM formula remains an economic boundary described in the specification, not an implemented joint CSA/prefunding process. Nonzero reusable VM is rejected rather than ignored.\n","tool_call_id":"call_6034209b367f5a89ba5195ce8a2dc776","type":"tool_result"}},{"step":5,"generation":0,"created_at":"2026-09-20T09:56:19.515Z","event":{"content":"File: /work/data/artifacts/qyaws7fs/documents/docs/economic-specification.md\n   1: # Economic specification of the funding book\n   2: \n   3: As of 19 September 2026. This is a fictional USD book and a public contract for its standalone numerical verifier. It is not a production installation, an observed transaction, or a national regulatory opinion. The exact source requests are preserved in [user-request.xml](../sources/user-request.xml) and [source-structures.xml](../sources/source-structures.xml). The transaction and event evidence is in [exhibit-fields.md](exhibit-fields.md); the connected episodes and their boundaries are in [world-topology.md](world-topology.md). The accepted economic corrections are specified below, with the detailed capital and accounting conventions in [capital-rulebook.md](capital-rulebook.md), [capital-actions.md](capital-actions.md) and [reserve-module.md](reserve-module.md).\n   4: \n   5: The book retains the requested USD1bn, twenty-year funding against five-year EM deployment. It does not turn that mismatch into a fully hedged trade. The corrections below distinguish a funding opportunity from an enforceable claim, an accounting charge from cash expenditure, and capital capacity from money available to settle a payment.\n   6: \n   7: ## 1. Evidence, units and numerical ownership\n   8: \n   9: The transaction documents, quote sheets, curve observations, legal opinions, event notices and ledger openings in [case-exhibits.json](../fixtures/case-exhibits.json) are fictional public exhibits. [numerical-inputs.json](../fixtures/numerical-inputs.json) is the canonical numerical input. Amounts there are USD, rates are decimal fractions, and times are years unless a field explicitly specifies business days. Tables below use USD millions where stated.\n  10: \n  11: Official rules are identified by paragraph and dated source in [capital-rulebook.md](capital-rulebook.md) and [valuation-capital-annex.md](valuation-capital-annex.md). Pricing curves, the quarter grid, quote conversion, recoveries, joint stresses, funding facilities and the 10% capital price are synthetic assumptions. Arithmetic implied by those assumptions is a calculated illustration, not evidence of observed market calibration. A legal or accounting conclusion requires the supplied opinion and its covered facts. An unresolved condition remains unresolved rather than receiving a numerical default.\n  12: \n  13: The implementation boundary is explicit:\n  14: \n  15: - `numerical_fixture.compute_core(parameters)` produces marks, sensitivities, CVA, capital profiles, KVA, priced actions and the allocation solution.\n  16: - `reserve_ledger.simulate_cash(parameters, reference_credit_move, funding_move, own_spread)` produces actual quarterly cash, title and financing consequences.\n  17: - `reserve_ledger.compute_reserves(parameters, core)` produces the management reserve schedules, attribution and independent accounting bridge.\n  18: - `validate_exhibits.validate_bundle(root)` checks the public case envelope and references before any report is graded. Missing required facts raise `ReferenceError`; they are not a candidate's scored economic mistake.\n  19: \n  20: Displayed numerical results come from the original flat-bundle execution snapshots [core-results.json](../evidence/baseline/core-results.json) and [reserves-results.json](../evidence/baseline/reserves-results.json). [numerical-anchors.json](../evidence/baseline/numerical-anchors.json) and [action-anchors.json](../evidence/baseline/action-anchors.json) collect the relevant baseline outputs. Formulas below define the calculations; the output files retain their precision. Recognised incurred CVA is explicitly zero in the base capital calculation. None of these computed outputs is an input exposure path or evidence of real-world calibration. Historical output hashes do not attest the organized files' changed paths.\n  21: \n  22: ## 2. Both legs, including the source of principal\n  23: \n  24: ### 2.1 Contract terms\n  25: \n  26: | Quantity | Public assumption |\n  27: |---|---|\n  28: | Funding notional and opening reference value, N | USD1,000,000,000 |\n  29: | Funding maturity | 20 years, 80 quarterly settlement periods |\n  30: | Deployment maturity | 5 years, 20 quarterly interest periods and bullet repayment |\n  31: | Numerical period, delta | 0.25 year |\n  32: | OIS, r | 4% nominal annual, compounded quarterly for this calculation |\n  33: | Initial internal AAA composite spread, b0 | 20bp, including its disclosed desk add-on |\n  34: | Executed financing margin over b0 | 50bp |\n  35: | Locked financing spread over OIS, k | b0 + 50bp = 70bp; subsequent b moves do not reset k |\n  36: | Matching replacement quote margin over b | 80bp in the synthetic joint quote process |\n  37: | Initial matching replacement spread, m0 | b0 + 80bp = 100bp over OIS |\n  38: | U reference coupon | OIS + 100bp, initially 5% annually |\n  39: | EM deployment coupon | OIS + 400bp, initially 8% annually |\n  40: | Funding provider CDS and recovery | 80bp; 40% recovery in the disclosed flat-hazard illustration |\n  41: | Own unsecured bond spread | 50bp initially; 150bp in the selected funding stress |\n  42: | Own CDS spread | 30bp initially, independently specified |\n  43: | Opening legacy borrowing | USD1bn, at OIS, still outstanding after the new funding transaction |\n  44: | Opening freely usable cash | USD100m before the separately identified day-one fee |\n  45: \n  46: U is an already-issued, ordinary AAA financial floating-rate note. Meridian initially owns it. Meridian sells legal title to U to the funding provider P and receives its total return back under the twenty-year TRS. Meridian is total-return receiver and financing payer. The sale supplies USD1bn; the unfunded derivative supplies no second principal.\n  47: \n  48: The EM borrower receives the USD1bn sale proceeds. Its loan is separate from the TRS and from P. Deployment collateral, U, and CSA collateral held against P are three different legal objects. U held by P is not collateral received by Meridian against P's default.\n  49: \n  50: The calendar-based confirmations use their stated day counts, resets and settlement dates. The numerical proof uses the disclosed exact quarter grid. It does not silently claim that every dated quarter is 0.25 under ACT/365F.\n  51: \n  52: ### 2.2 Opening cash and statutory balance sheet\n  53: \n  54: The table is before fees, reserves and subsequent market movements. Amounts are USD millions.\n  55: \n  56: | Stage | Cash | Statutory assets other than cash | Statutory liabilities | Equity | Legal effect |\n  57: |---|---:|---|---|---:|---|\n  58: | Opening | 100 | U 1,000 | Legacy borrowing 1,000 | 100 | Meridian owns U |\n  59: | Sale of U to P settles | 1,100 | U 1,000 retained for accounting | Legacy borrowing 1,000; new financing liability 1,000 | 100 | Title to U passes to P; sale proceeds arrive |\n  60: | TRS execution | 1,100 | No duplicate statutory derivative for the retained rights | Existing financing remains | 100 | Meridian receives U's return and pays financing; no new principal |\n  61: | EM advance settles | 100 | U 1,000; EM advance 1,000 | Legacy 1,000; financing 1,000 | 100 | EM borrower receives 1,000; security rights arise only as documented |\n  62: \n  63: The same-transferee sale plus full return retention fails derecognition in this case. [IFRS 9, 2026 issued edition][IFRS9], paragraphs 3.2.15, B3.2.14 and B3.2.16(o), supports retention of U and recognition of the financing liability without recognising the same rights again as a derivative. Legal ownership and accounting recognition therefore differ. Paragraph 3.2.22 also prevents treating the accounting asset and associated liability as an automatically net presentation.\n  64: \n  65: The USD1m day-one fee is an actual setup-service fee, expensed and paid after the sale and deployment settle. It reduces unrestricted cash to USD99m and statutory equity to USD99m before management X. It is not assumed to be a lifetime financing fee eligible for capitalisation. The payment has its own source entry; it cannot be hidden in a noncash reserve or represented as a second funding advance.\n  66: \n  67: The explicit fictional regulatory classification letter separately selects SA-CCR for the legal TRS and the relevant written-credit leverage treatment. That selection is not an inference from IFRS, and it does not permit a second statutory asset. Without the classification letter, derivative versus financing/SFT treatment needs adjudication before those capital formulas can be used.\n  68: \n  69: ### 2.3 Quarterly return and financing cash\n  70: \n  71: Let p_j be U's ex-distribution price per unit of face and let the opening price be 1. Equivalently, use the identified quantity Q_U and currency price P_j with Q_U P_0 = N. The formulas below use the normalised price. Let d_j be the distribution per unit of face and p_last the reference price from the last actual settled return reset.\n  72: \n  73: ```text\n  74: TRS_cash_j = N * (d_j + p_j - p_last)\n  75:              - N * delta_j * (OIS_j + k)\n  76: \n  77: For a surviving ordinary quarter:\n  78:     d_j = delta_j * (OIS_j + 0.01)\n  79: \n  80: At U's final redemption:\n  81:     p_j = 0\n  82:     d_j = delta_j * (OIS_j + 0.01) + 1\n  83: ```\n  84: \n  85: The final price is zero because the note has redeemed; its principal is already in d_j. Adding another N receipt or payment to this return formula would double count principal. A payment instruction is not an actual reset until the specified settlement has occurred. Unpaid return, accrued financing and a disputed amount remain in the close-out valuation.\n  86: \n  87: At unchanged par and OIS, quarterly TRS cash is USD0.750m and annual TRS cash is USD3m. The EM loan pays USD20m quarterly for five years, and the legacy borrowing costs USD10m quarterly. Whole-book quarterly operating cash before cash-account interest, new borrowing, fees and hedges is therefore USD10.750m during the first five years. The USD3m annual TRS amount is a funding-only panel, not the full book's annual income.\n  88: \n  89: The cash ledger books U's coupon through P's TRS remittance once. The statutory ledger can show U income and financing expense, but it cannot also add a second direct cash coupon from U's issuer to Meridian.\n  90: \n  91: Interim reference-price return settlements change cash and the retained-sale financing balance. A negative price return is a payment to P and reduces that financing balance; U is separately revalued under the identified accounting policy. The cash repayment itself is not another expense on top of U's valuation loss. A positive return reverses the direction. The financing coupon still follows its fixed notional and executed spread unless an actual amendment changes those terms.\n  92: \n  93: ### 2.4 Year five and year twenty\n  94: \n  95: At year five the performing EM borrower repays USD1bn. The base reinvestment instruction places that principal in an OIS account through the remaining fifteen years. It does not assume another EM loan at the original 400bp margin. Interest on that OIS principal offsets the OIS cost of the USD1bn legacy borrowing in the unchanged-rate base case. Funding TRS cash, provider exposure and capital continue.\n  96: \n  97: The desk can select a different reinvestment only with a new executable quote, credit decision, funding use and legal agreement. The price and availability of that future investment are the reinvestment risk. Five-year amortisation or five-year protection does not close the twenty-year funding position.\n  98: \n  99: At year twenty:\n 100: \n 101: 1. U redeems to its legal holder P. The last TRS return uses `d = coupon + 1`, `p = 0`, and the actual last reset price. The net price/redemption component is `N * (1 - p_last)`, not another unqualified N.\n 102: 2. The retained-asset and financing ledger records U's redemption and the corresponding extinction of the financing balance. In the performing par endpoint, the final price-return adjustment brings that balance to N before P's redemption extinguishes it. This is not a second cash withdrawal from Meridian.\n 103: 3. The parked EM principal becomes available to repay the separate legacy borrowing. Any real additional liquidity borrowing is repaid from available cash under its own terms.\n 104: 4. Fees, margin returns, hedges, disputes and close-out receivables settle separately. An unresolved USD0.500m provider claim and its USD0.500m reserve in the terminal exhibit survive contractual maturity. Age alone does not erase either.\n 105: \n 106: [reserve-module.md](reserve-module.md) specifies these postings and the independent closing-balance derivation. A terminal zero is valid only for obligations actually discharged.\n 107: \n 108: ## 3. E1: funding benefit, legal value and reference return\n 109: \n 110: ### 3.1 Quote-conditioned valuation\n 111: \n 112: Define the numerical discount and annuity for h remaining years on the quarter grid:\n 113: \n 114: ```text\n 115: D_r(h) = (1 + r * delta)^(-h / delta)\n 116: A_r(h) = sum_j=1..h/delta delta * D_r(j*delta)\n 117:        = (1 - D_r(h)) / r\n 118: ```\n 119: \n 120: The synthetic replacement quotation supplies a linear spread-to-price conversion with `A_quote = A_0.04(h)`. This annuity is a disclosed quote convention, not a universal law for all funding trades. Off quarter dates, `off_quarter_convention=fractional_remaining_annuity_clean_quote` explicitly extends `(1-D_r(h))/r` using the fractional power above; it is not the sum of the original contract's irregular coupon cash flows. A quote could instead supply its own PV01 or an upfront price for the old locked spread, but those alternatives require their own implemented terms.\n 121: \n 122: For a reset-to-today replacement quote with the same U, quantity, notional, maturity, cash-flow terms, legal rights, collateral basis and cost basis:\n 123: \n 124: ```text\n 125: F_quote(t) = N * [m_reset(t,h) - k] * A_quote(t,h)\n 126: \n 127: Reference_adjustment(t)\n 128:     = D(t, next_actual_settlement) * N * [p_U(t) - p_last_actual]\n 129: \n 130: V_legal(t) = F_quote(t) + Reference_adjustment(t) + unsettled_stubs(t)\n 131: ```\n 132: \n 133: The stubs include any separately stated unpaid return, accrual or contractual close-out item not already included in the quote. Base clean-reset observations explicitly set them to zero. Unknown stubs do not default to zero. Rolled calls to `funding_mark` require explicit `next_payment_delay` and `unsettled_stub`; a pending same-day price settlement uses delay zero. The inception default reads the required `funding_contract.next_price_settlement_years` rather than deriving a new quarter from remaining tenor. Scheduled-zero-tenor marks do not extinguish pending settlement claims.\n 134: \n 135: A quotation on the original reference basis already includes the old-reference adjustment. In that alternative, use its direct old-contract value or its stated conversion and do not add `p_U - p_last` again. Quote matching requires the actual remaining contract, not a generic twenty-year financing spread from another provider.\n 136: \n 137: The desk also computes a management funding opportunity from its internal composite b plus its desk margin. An internal curve change cannot create a claim on P. In this synthetic case, separately supplied replacement quotes happen to follow `m_reset = b + 80bp`. That is a joint assumed quote process. It is not an internal-b-linked termination payoff invented in the contract.\n 138: \n 139: At a matched, post-settlement reset with zero stubs and matching costs/basis, the internal funding opportunity can equal F_quote and V_legal. Outside those conditions the three are distinct. Missing or mismatched executable quotation evidence raises a reference-input error. It never licenses substituting the internal opportunity for CCR exposure or using V = 0.\n 140: \n 141: The quotation's fictional executability does not itself satisfy the IFRS day-one observable-input test. Accounting observability has separate evidence and a prior unit-of-account gate.\n 142: \n 143: ### 3.2 Reference pricing and numerical anchors\n 144: \n 145: For the public flat snapshot, U's current OIS coupon is held fixed while the credit-yield spread is shocked. With `c_U = 0.04 + 0.01 = 0.05`:\n 146: \n 147: ```text\n 148: p_U(h, x_U) = c_U * A_(c_U+x_U)(h) + D_(c_U+x_U)(h)\n 149: ```\n 150: \n 151: This is a synthetic yield-based mark of the promised reference cash flows. It is not a provider-default model. If OIS changes, coupon resets and discounting must be recomputed from the actual floating-rate terms rather than treating this snapshot formula as a fixed-rate contract forever.\n 152: \n 153: At inception, after a matched reset, `m0 - k = 30bp`. Known calculated anchors are:\n 154: \n 155: | Item | Quarterly convention | Continuous comparison, not used by the verifier |\n 156: |---|---:|---:|\n 157: | Twenty-year annuity | 13.722051526 years | 13.766775897 years |\n 158: | Funding benefit at 30bp, USDm | 41.166154579 | 41.300327691 |\n 159: | Funding spread DV01, USDm per bp | 1.372205153 | 1.376677590 |\n 160: | Increment for a 100bp funding-quote widening, USDm | 137.220515265 | 137.667758971 |\n 161: \n 162: The raw request's approximately USD41m and USD138m are sound order-of-magnitude diagnostics under their stated annuity. They are neither regulatory constants nor substitutes for full V.\n 163: \n 164: The following controlled observations keep twenty years remaining and the old actual price at 1. They use the next-quarter discount on the unsettled reference adjustment:\n 165: \n 166: | Joint observation | Funding component, USDm | Full legal value before return settlement, USDm |\n 167: |---|---:|---:|\n 168: | No curve move | 41.166155 | 41.166155 |\n 169: | Replacement quote +100bp, U credit unchanged | 178.386670 | 178.386670 |\n 170: | Replacement quote +100bp, U credit +25bp | 178.386670 | 147.850900 |\n 171: | Replacement quote +100bp, U credit +100bp | 178.386670 | 63.517057 |\n 172: \n 173: The reference-loss offset is an economic component of V, not CSA collateral and not a regulatory haircut benefit. After the reference loss settles, its old-reference adjustment disappears from V because cash has moved, while the surviving fixed financing advantage remains. A reference-price reset is not a full fair-value reset of the whole TRS.\n 174: \n 175: The funding trade is therefore an asset in the selected positive-value states, not in every state. A sufficiently adverse U move or a tightening replacement funding quote can make full V negative. A 100bp tightening with U unchanged produces a USD96.054361m payable under the same twenty-year quote conversion.\n 176: \n 177: ### 3.3 Exposures are derived, never supplied\n 178: \n 179: The current positive legal exposure is `max(V_legal, 0)` before the relevant collateral/default-recovery treatment. The SA-CCR calculation then uses the full contractual V with the applicable legal C, replacement-cost formula and add-on. A positive funding opportunity alone is not EAD.\n 180: \n 181: For CVA, the public quarter-end-after-payment convention supplies the default timing. In the flat provider illustration:\n 182: \n 183: ```text\n 184: lambda_P = provider_CDS / (1 - recovery_P)\n 185: S_P(t) = exp(-lambda_P * t)\n 186: \n 187: CVA = sum_j D_OIS(t_j) * (1 - recovery_P)\n 188:             * [S_P(t_(j-1)) - S_P(t_j)]\n 189:             * E[positive close-out exposure at t_j | P defaults there]\n 190: ```\n 191: \n 192: Each conditional close-out exposure is repriced from the same contract, reference price/reset state and applicable collateral recovery. Default observations remain the original funding quarter ends even when a capital action becomes effective between them; the exposure at a default date uses the action status then. An execution date changes capital accrual, not the default clock. A remaining tail begins with the stub to the next original funding payment. The base post-settlement illustration reduces exposure to the surviving funding component; that simplification follows from the stated event ordering and reference state. A default before settlement, a correlated U shock, a dispute or non-reusable collateral requires the corresponding full calculation. No exhibit supplies EE, EPE, an exposure vector or an answer-shaped reserve schedule.\n 193: \n 194: Provider CDS of 80bp with 40% recovery gives the illustration's hazard `0.008 / 0.6`. The provider CDS cannot be replaced by the internal AAA curve, U's rating, the desk's own CDS or an unrelated EM spread. A deterministic W stress is not by itself a calibrated joint default probability model.\n 195: \n 196: ## 4. E4 and the mismatch: distinct curves and basis risks\n 197: \n 198: | Curve or observation | What it drives | What it does not establish |\n 199: |---|---|---|\n 200: | OIS and its forecast/reset convention | Discounting, floating coupons, cash remuneration and the quoted annuity conversion | Provider credit quality or a supervisory 5% decay |\n 201: | Internal AAA financials CDS composite plus desk add-on, b | Internal replacement-funding opportunity and the disclosed funding-allocation sensitivity | An enforceable claim, a provider CDS curve, or U's issue rating |\n 202: | Independently supplied matching replacement quotes, m | Quote-supported old-contract financing value | Automatic IFRS observability or an internal-curve termination right |\n 203: | U issuer credit/yield curve | U's price, unsettled return, and reference-credit risk | Collateral C received from P or P's default probability |\n 204: | Funding provider P CDS | Provider survival/default loss in CVA | Actual own borrowing cost or U's supervisory factor |\n 205: | Own unsecured bond funding curve | The rate on actual own cash borrowing and its premium over the chosen cash benchmark | A borrowing need caused by a noncash mark |\n 206: | Own CDS | Own credit diagnostics and the bond-CDS basis | A substitute loan quote; zero cash cost when CDS is used |\n 207: | EM borrower credit/yield curve | EM valuation, credit loss and reinvestment economics | An own-funding-induced change to the borrower's contractual coupon |\n 208: | Deployment collateral issuer curve and price | Realisation value and collateral price risk | Automatic rating migration, supervisory haircut or eligibility |\n 209: | CSA remuneration and collateral/FX basis | Net economics of cash collateral, currency conversion and funding | Permission to reuse segregated collateral |\n 210: | Protection seller H CDS and hedge terms | H's default risk and the separately calculated protection economics | Netting H with P or automatic CVA hedge designation |\n 211: | Market financing haircut and spread schedules | Cash advance and lender-specific financing price | Supervisory mitigation or a spread mechanically determined by the haircut |\n 212: \n 213: Two curves may co-move in a scenario without becoming the same input. In W3, the internal quote driver, own bond spread, provider CDS and EM spread are shocked jointly, while own CDS remains separately stated. The internal-to-quoted-replacement basis, internal-to-own-bond basis, U-to-internal-AAA basis, EM-to-own-funding basis, bond-CDS basis and collateral-remuneration/FX basis must therefore remain visible.\n 214: \n 215: At inception, own bonds are OIS + 50bp and own CDS is 30bp. Their 20bp difference is the bond-CDS basis. The actual premium for borrowing at the bond curve and placing the proceeds at OIS is 50bp, not 20bp. A basis-only adjustment is possible only after specifying a benchmark that already charges the own-credit component. It cannot be added on top of the full 50bp or described as a universal pure-liquidity cost. Using own CDS as a cash funding curve is wrong, but it does not mathematically set all funding cost to zero.\n 216: \n 217: ### 4.1 Funding spread duration versus contractual loan value\n 218: \n 219: The requested long-twenty/short-five sensitivity is a funding-allocation comparison. For the disclosed matched annuity convention:\n 220: \n 221: ```text\n 222: Funding_spread_DV01 = +N * A_0.04(20) * 0.0001\n 223: Five_year_deployment_funding_allocation_DV01\n 224:                    = -N * A_0.04(5) * 0.0001\n 225: Net_funding_allocation_DV01\n 226:                    = N * [A_0.04(20) - A_0.04(5)] * 0.0001\n 227: ```\n 228: \n 229: Known anchors are +USD1.372205153m, -USD0.451138824m and +USD0.921066328m per bp. The five-year magnitude is disclosed separately from its negative position sign in the report.\n 230: \n 231: This does not mean that an EM borrower's legal debt reprices when Meridian's internal funding spread changes. Its contractual coupon and principal remain the same. Its independent credit-mark snapshot uses:\n 232: \n 233: ```text\n 234: c_EM = 0.04 + 0.04 = 0.08\n 235: p_EM(h, x_EM) = c_EM * A_(c_EM+x_EM)(h) + D_(c_EM+x_EM)(h)\n 236: ```\n 237: \n 238: The marked loan value is `N * p_EM`; the funding-allocation debit is a management comparison, not another loan asset or an extra cash expense. The selected W3 first-quarter observation has h = 4.75 and x_EM = 0.03. The resulting price loss is noncash unless the loan is sold, margined or otherwise contractually cash-settled.\n 239: \n 240: Funding spread DV01 is also not OIS DV01. Holding m and k fixed under the quote conversion:\n 241: \n 242: ```text\n 243: dA_r(h)/dr = -sum_j=1..h/delta j * delta^2\n 244:                          * (1+r*delta)^(-j-1)\n 245: dF_quote/dr = N * (m-k) * dA_r(h)/dr\n 246: ```\n 247: \n 248: An actual OIS scenario also changes forward coupons, cash returns and any quoted conversion or basis. Both legs' resets must be respected. The supervisory duration with 5% exponential decay in SA-CCR is neither this rate derivative nor the OIS annuity.\n 249: \n 250: ### 4.2 Collateral price, rating and the two haircut systems\n 251: \n 252: Reprice collateral from its own curve. Separately apply a dated issue-rating or eligibility event, issuer type, residual maturity, legal rights, positive-correlation test and the applicable holding-period haircut. The sequence is then current recognised mitigation, exposure, RWA, allocated capital, KVA and the client price needed to cover that cost.\n 253: \n 254: A spread movement is not itself a rating instruction. Conversely, a rating event can change a haircut or remove recognition with no contemporaneous market-price movement. Under the selected rating-permitted banking-book Basel comparator, a sovereign issue requires at least BB-, not investment grade in every case. The chosen B-rated own-sovereign paper fails both the rating test and the independent same-issuer correlation test. See CRE22.7, CRE22.34, CRE22.45 and CRE22.49 in [capital-rulebook.md](capital-rulebook.md).\n 255: \n 256: The market haircut determines how much cash a lender advances. The supervisory haircut determines eligible regulatory mitigation or posting exposure. They are distinct inputs with separate tenors and purposes. The empirical short-dated findings in S3 motivate lender segmentation and concentration constraints, not a calibration of five- or twenty-year EM financing. A higher safe-collateral haircut-to-volatility ratio refutes a universal proportional-volatility rule; it does not prove that nominal haircuts decrease with volatility. [allocation-episode.md](allocation-episode.md) contains the separate seven-day executable allocation.\n 257: \n 258: ## 5. E2, E3 and A3: when a funding cost actually exists\n 259: \n 260: ### 5.1 Actual cash deficits, not stock-mark borrowing\n 261: \n 262: For each settlement time, `simulate_cash` starts with the accessible cash account and applies contractual receipts and payments in the specified netting order. It includes deployment coupon/principal, net TRS return and financing, legacy interest, fees, margin, hedges, actual loss payments and any existing facility interest. It does not put V, D, X, EAD, AVA or capital release in the cash account.\n 263: \n 264: ```text\n 265: Cash_before_new_financing_j\n 266:     = available_opening_cash_j + accessible_settled_receipts_j\n 267:       - contractual_cash_payments_due_j\n 268: \n 269: Required_new_cash_j = max(0, -Cash_before_new_financing_j)\n 270: Actual_draw_j = min(Required_new_cash_j, usable_executed_facility_capacity_j)\n 271: Residual_shortfall_j = Required_new_cash_j - Actual_draw_j\n 272: ```\n 273: \n 274: A fully available facility can fund the deficit; a proposed, inaccessible or insufficient facility cannot. Positive cash can repay existing draws according to the documented sweep and buffer policy. Borrowing changes cash and a debt principal account. Only its interest and fees are expenses.\n 275: \n 276: The actual annual loan rate is OIS plus the quoted own unsecured bond spread. The incremental funding-premium diagnostic uses that spread above the stated OIS benchmark. Total contractual interest still appears in the cash and statutory ledger. If borrowed money funds an external OIS deposit, the deposit's actual interest offsets the OIS component. If it funds a cash loss instead, there is no invented matching deposit income.\n 277: \n 278: A 100bp move only in the matching funding quote produces a larger noncash mark and potentially larger CVA/KVA deductions. With no other cash obligation it creates no additional borrowing, so the base mark-only UFVA is zero. A noncash XVA expense likewise reduces management equity without creating a cash payable. This refutes the unconditional reserve-implies-borrowing recursion in A3.\n 279: \n 280: The actual positive-deficit experiment instead shocks U credit by 250bp before the first quarterly return settlement. The contractual reference loss is paid to P. The own-bond premium is then 150bp on the resulting actual draw. Its path is `compute_reserves(...)[\"cash_scenarios\"][\"actual_reference_credit_widening_250bp\"]`, not the size of the reserve. The common funding-only shock, the actual reference-loss scenario and the separately opt-in experiment below must not be added together as though they were one financing need.\n 281: \n 282: The executed scenario draws USD145.7623083242m at the first settlement and has USD3.7104953200m present value of the actual borrowing premium over OIS. Its all-in contractual borrowing-interest PV is separately USD13.6051495067m. These are `summary.PV_actual_funding_spread_cost` and `summary.PV_actual_borrowing_interest` in that cash scenario. The mark-only scenario's actual UFVA is zero; the opt-in external-deposit experiment below produces USD17.9588363722m. They are three different cash contracts/states, not alternative estimates of one cost.\n 283: \n 284: This executed-cash path is a counterfactual conditional on the book having been lawfully funded and approved. It does not establish that the proposed book's opening eligible capital satisfies the whole-book constraints in section 7. A capital deficit requires rejection or a separately evidenced capital transaction before execution, not a fictional Tier 1 top-up. Within that explicitly conditional path, the reference settlement and resulting borrowing are real cash obligations, unlike the noncash reserve balances.\n 285: \n 286: ### 5.2 The conditional quadratic experiment and the USD14.5m claim\n 287: \n 288: The public `conditional_reserve_facility` is a separate sensitivity experiment, not an automatic feature of the base book. An effective external facility borrows at own bonds and places money in a segregated OIS deposit. Its expressly selected target is the positive incremental quote-supported funding benefit caused by a move x, excluding the original 30bp benefit. The quote has its own `scenario_margin_beta=beta_quote` and `conversion_rate=r_quote`. Its assumed own-spread response is independently `s_own = s0 + beta_own*x`. The canonical values are s0 = 50bp, beta_quote = beta_own = 1 and r_quote = OIS = 4%; their equality is a fictional common-factor/conversion assumption, not an identity between distinct curves.\n 289: \n 290: For the executed facility, beginning-quarter deposit balances and end-quarter interest charges give:\n 291: \n 292: ```text\n 293: z(x) = max(beta_quote * x, 0)\n 294: L_j(x) = N * z(x) * A_r_quote(20 - (j-1)*delta)\n 295: \n 296: I_quote = N * sum_j=1..80 delta * D_OIS(j*delta)\n 297:                                  * A_r_quote(20 - (j-1)*delta)\n 298: \n 299: UFVA_conditional(x) = I_quote * z(x) * (s0 + beta_own*x)\n 300: ```\n 301: \n 302: Under the canonical values, `I = I_quote = 119725575814.7565`. With spreads expressed as annual decimal rates, its units are USD times years squared. At x = 0.01, the result is USD17.958836372m. Its linear contribution is `I*0.005*x`; its quadratic contribution is `I*x^2`. The second term exceeds the first once x exceeds 50bp in this particular experiment. Altering the quote beta or conversion rate changes the target and coefficient in both the analytic result and cash ledger; it does not change OIS expense discounting. An unexecuted facility has zero primary borrowing, cost and fee.\n 303: \n 304: The prompt's estimate `70m * 1.5% * 13.8 = 14.49m` is arithmetically consistent with those rough inputs. It is not the result of the selected amortising quarter-grid balances. Their discounted average incremental balance is `I*0.01/A_0.04(20)`, approximately USD87m rather than USD70m. Obtaining USD14.5m would require a different exposure average, timing, survival weighting, spread benchmark or funding contract. The verifier must state that difference, not tune an undisclosed exposure path to the desired number.\n 305: \n 306: The quadratic result applies only while the positive-balance branch is active and only under the stated beta and funding transaction. Floors, defaults, collateral availability and finite facility capacity can change that shape. A claim that all uncollateralised receivables have this UFVA is false.\n 307: \n 308: ### 5.3 Executing a CSA changes rights and cash\n 309: \n 310: An enforceable two-way daily cash-VM agreement can reduce unsecured close-out loss and SA-CCR exposure. Whether received VM reduces a funding need depends on its settlement, currency, accessibility, reuse rights and remuneration. The economic condition for combining it with an external-deposit experiment would be:\n 311: \n 312: ```text\n 313: Unfunded_target = max(0, required_external_deposit\n 314:                         - settled_legally_reusable_VM_available_for_that_use)\n 315: ```\n 316: \n 317: Do not reuse the same VM against two needs. Segregated cash, unreceived calls and securities the bank cannot monetise by the deadline do not pay today's obligations. VM is collateral with a return obligation, not income. Threshold, MTA, NICA, disputes and MPOR still matter; zero replacement cost is not zero PFE.\n 318: \n 319: The implemented conditional experiment explicitly requires `reusable_VM=\"0\"`; it rejects a nonzero amount. It does not implement the combined formula above or infer reusable cash from the separate CSA action. A joint VM/prefunding process needs its own dated cash-rights and allocation contract before that boundary can be exercised.\n 320: \n 321: The adverse-VM action snapshot is separate from the opening USD100m cash book. It supplies a USD20m available buffer and a USD100m executable line. The binding quote in [capital-actions.md](capital-actions.md#executable-terms-and-timing) charges USD1m for CSA execution, USD0.100m for facility setup, USD0.050m annual fixed commitment, USD0.025m annual administration and another 10bp annually on the USD100m line. The annual quoted charges therefore total USD0.175m; omitting the setup, administration or limit-based charge understates the cost.\n 322: \n 323: The immediate-execution static comparator for the 100bp tightening is USD96.0543606853m VM, leaving USD76.0543606853m beyond the buffer; the static VM field is `actions.CSA.normal.instantaneous_stress_VM`. The actual quoted action takes effect after two business days, at model year 0.008. Repricing then gives USD96.0292195555m VM and a USD76.0292195555m facility draw, respectively `actions.CSA.normal.executed_stress_VM` and `actions.CSA.normal.facility_draw`. The static and executed amounts are not interchangeable observations.\n 324: \n 325: For the executed 30/365-year draw, gross facility interest is USD0.3436937322m, buffer OIS opportunity cost is USD0.0657534247m and VM remuneration is USD0.3157125026m. Their net cost is USD0.0937346542m, with PV USD0.0933987733m. Adding the upfront-cost PV of USD1.0996498041m and running-cost PV of USD2.3999728785m gives total quoted cost PV USD3.5930214559m. The immediate static draw's roughly USD0.09376565m spread cost is only its comparator, not the delayed action's cost. Received-margin relief in one state does not erase posting risk in another.\n 326: \n 327: Thus E3 is retained as a legal-and-operational sensitivity, but rejected as a universal equivalence between no CSA and positive UFVA, or between a signed CSA and no funding cost. A CSA may reduce capital while making liquidity worse.\n 328: \n 329: ## 6. E5 and A1-A5: two management pots and one P&L\n 330: \n 331: ### 6.1 Sign convention and attribution\n 332: \n 333: Use gain-positive clean values G and hedge values H, and deduction-positive deferral D and XVA reserve X. Let C be cash, M other nonoverlapping assets, and B liabilities. A management risk ledger can be represented as:\n 334: \n 335: ```text\n 336: Equity_management = C + M + G + H - B - D - X\n 337: ```\n 338: \n 339: Every position must have one representation in that ledger. The retained U/financing statutory accounts and a management replacement benefit require an explicit bridge; adding both as independent statutory fair-valued positions would duplicate rights. [reserve-module.md](reserve-module.md) separates the funding-only panel, the full cash book and the statutory bridge.\n 340: \n 341: For a priced trade panel, after separating unrelated book movements and capital transactions:\n 342: \n 343: ```text\n 344: PnL = CF_G + (G1-G0) + CF_H + (H1-H0)\n 345:       - actual_funding_expense - other_expense\n 346:       - (D1-D0) - (X1-X0)\n 347: ```\n 348: \n 349: Use frozen opening market inputs to compute the time-only roll values G_roll, D_roll and each X_roll. Apply observed market changes next, and effective structural actions last. This ordering is public and prevents the same release from being classified twice.\n 350: \n 351: ```text\n 352: Carry = CF_G + G_roll - G0\n 353: Clean_market_move = G_pre_action - G_roll\n 354: Hedge_PnL = CF_H + H1 - H0\n 355: \n 356: For each deduction R, where R is D or an X component:\n 357:     Reserve_theta_R = R0 - R_roll\n 358:     Reserve_market_move_R = R_roll - R_pre_action\n 359:     Reserve_action_release_R = R_pre_action - R1\n 360: ```\n 361: \n 362: A documented observability release of D is separate from spread-driven X remeasurement and from routine time release. Effective structural actions also include their clean settlement value and quoted fees; the reserve credit alone is not the action's net economics.\n 363: \n 364: Expected theta is P&L once. It is part of earning the initially priced risk premium, not additional new profit on top of the change in the reserve. Spread-driven release is also P&L and can reverse. An unhedged market gain is not fee income. The raw sentence that every term except carry is a reserve movement is too broad: actual hedge gains, clean market changes and cash funding expense are not automatically reserve movements.\n 365: \n 366: A release of a future-funding-cost reserve as cost is consumed must be paired with the corresponding actual funding expense. Booking only the release invents profit. Conversely, charging both the already-priced reserve consumption and a second reserve for the same cost duplicates the expense.\n 367: \n 368: Debt draws/repayments, VM transfers, principal repayment and capital issuance are not trade P&L. A new cash loss, interest, fee or hedge payment has its own source entry. The verifier must derive the independent journal and closing assets/liabilities from those sources and compare their equity movement with attribution. Defining closing equity as opening equity plus the reported P&L is not a check.\n 369: \n 370: ### 6.2 Pot D and the accounting-unit gate\n 371: \n 372: For management only, the initial gross benefit is deferred on a frozen price-time schedule:\n 373: \n 374: ```text\n 375: D_management(0) = N * 0.003 * A_0.04(20)\n 376: D_management_roll(t) = N * 0.003 * A_0.04(20-t)\n 377: ```\n 378: \n 379: The original spread advantage and conversion are frozen for this schedule. A tightening current spread does not release D; nor does a widening current spread replenish it. Evidence that a previously unobservable pricing factor has become observable can support an additional release under the applicable policy. Arbitrary straight-line amortisation is not substituted for the priced time factor.\n 380: \n 381: For statutory recognition, identify the accounting unit before applying the day-one test. The base failed-sale unit contains retained U and its financing liability, so it does not first book a USD41m standalone derivative gain and then decide whether to defer it.\n 382: \n 383: For a genuinely separate qualifying instrument, IFRS 9 paragraphs 5.1.1A and B5.1.2A distinguish an active-market identical price or a valuation using only observable-market data from other valuations. The latter initially defers the difference from transaction price, then recognises it only as arising from changes in factors, including time, that market participants consider in pricing. The relevant IFRS edition is the [2026 issued text][IFRS9]. This is not a rule that all internal inputs are always unobservable, or that one fictional quote makes all inputs observable.\n 384: \n 385: A separate numerical unit example makes the netting point explicit. Suppose a valid standalone unit has clean value USD41m, applicable statutory valuation adjustments USD12m, and transaction price zero. Its net fair value is USD29m. If the day-one exception fails, the deferred difference is USD29m, not a gross USD41m deferral plus an immediate USD12m loss on the same unit. The management gross D and management X pots therefore need a bridge to statutory accounting rather than a claim that both are mandatory IFRS liabilities. Management KVA is not automatically a statutory fair-value adjustment.\n 386: \n 387: ### 6.3 Pot X, the corrected capital basis and worked time/market panels\n 388: \n 389: ```text\n 390: X = CVA + actual_cash_based_FVA_UFVA + KVA + other_explicit_reserves\n 391: ```\n 392: \n 393: Fees paid as expenses are not added again as a reserve unless the stated policy first reserves a future unpaid fee and releases it against settlement. The components keep separate time, market, effective-action and consumption movements.\n 394: \n 395: For the following funding-only panel, quote and U are at a matched reset, no hedge is executed, actual additional funding is zero, and no other reserve is silently added. Define the capital and CVA quantities exactly through the public core API:\n 396: \n 397: ```text\n 398: C0 = core[\"funding\"][\"normal\"][\"CVA\"]\n 399: K0 = core[\"funding\"][\"normal\"][\"KVA\"]\n 400: C1 = core[\"funding\"][\"year1_roll\"][\"CVA\"]\n 401: K1 = core[\"funding\"][\"year1_roll\"][\"KVA\"]\n 402: Cs = core[\"funding\"][\"year1_stress\"][\"CVA\"]\n 403: Ks = core[\"funding\"][\"year1_stress\"][\"KVA\"]\n 404: X0 = C0 + K0\n 405: X1 = C1 + K1\n 406: Xs = Cs + Ks\n 407: ```\n 408: \n 409: These K values use recognised incurred CVA equal to zero. Earlier illustrative KVA values that subtracted an unrecognised management CVA reserve from default-risk EAD are superseded. CRE51.12 permits the qualifying incurred write-down, not an arbitrary management reserve. A separate recognised-write-down countercase must state its statutory basis and cannot be the default.\n 410: \n 411: Amounts in the next table are USD millions, rounded from the executed core and reserve outputs; API values are in USD. The named C/K/X definitions above identify the exact source fields.\n 412: \n 413: | Funding-only item | Inception | One-year frozen-market roll | Instantaneous shock after that roll |\n 414: |---|---:|---:|---:|\n 415: | Remaining funding life | 20 years | 19 years | 19 years |\n 416: | Gross F at matched reset | 41.166154579 | 39.792364782 | 172.433580720 |\n 417: | D management | 41.166154579 | 39.792364782 | 39.792364782 |\n 418: | Provider CDS | 80bp | 80bp | 160bp |\n 419: | Change in replacement funding spread from inception | 0bp | 0bp | +100bp |\n 420: | CVA | 2.601931020 | 2.414305784 | 19.440057857 |\n 421: | KVA, corrected no-incurred-write-down basis | 27.523018931 | 24.702391545 | 62.236661004 |\n 422: | Total X | 30.124949951 | 27.116697329 | 81.676718861 |\n 423: | TRS cash received during the panel | 0 | 3.000000 | 0 |\n 424: | Newly created cash borrowing from the mark/charge | 0 | 0 | 0 |\n 425: \n 426: At inception, the priced net management benefit before deferral is `F0-X0-fee = USD10.0412046285m`. With gross management D equal to F0, the initial management charge is `-X0-fee = -USD31.1249499510m`. The independent opening journal therefore leaves management equity of USD68.8750500490m from USD100m, while statutory equity is USD99m after the actual USD1m service expense. Neither the priced benefit nor the management charge is automatically statutory day-one P&L; the failed-sale accounting unit recognises no separate funding-opportunity gain.\n 427: \n 428: The one-year frozen-market panel is fully specified by:\n 429: \n 430: ```text\n 431: Carry = 3.000000 + 39.7923647816 - 41.1661545794\n 432:       = 1.6262102022 USDm\n 433: D_theta = 1.3737897978 USDm\n 434: X_theta = X0 - X1 = 3.0082526224 USDm\n 435: Funding_panel_PnL = Carry + D_theta + X_theta\n 436:                   = 3.000000 USDm + X0 - X1\n 437:                   = 6.0082526224 USDm\n 438: ```\n 439: \n 440: These values are `management_scenarios.one_year_roll.funding_component.attribution` in the reserve output. The independent ledger, not the attribution identity, supplies the reconciliation evidence. The expected release is counted once. The separate whole-book panel includes EM carry, legacy interest and OIS cash interest: its first-year management P&L is USD50.6773603624m after the already expensed day-one fee, with management equity moving from USD68.8750500490m to USD119.5524104114m. Its funding-only USD6.0082526224m is not an additional whole-book profit line.\n 441: \n 442: The instantaneous market panel changes no time, payment or D. Its result is:\n 443: \n 444: ```text\n 445: Clean_market_move = 132.6412159387 USDm\n 446: Reserve_market_move = X1 - Xs = -54.5600215322 USDm\n 447: Instantaneous_PnL = Clean_market_move + Reserve_market_move\n 448:                   = 78.0811944065 USDm\n 449: Cash_change_from_this_mark_and_reserve_remeasurement = 0\n 450: ```\n 451: \n 452: This is the required divergence of the two pots: D stays on its old priced schedule while X remeasures to changed provider credit and funding exposure. The instantaneous panel's independent journal and equity change both give USD78.0811944065m; no cash or new borrowing appears. The corresponding `compute_reserves` panels are `management_scenarios.opening`, `management_scenarios.one_year_roll` and `management_scenarios.instant_funding_100bp_provider_80bp`. The 81-row `reserve_schedule` includes opening and quarterly observations through contractual year twenty; the separate terminal settlement state retains any unresolved claim.\n 453: \n 454: ### 6.4 A4: reserve uncertainty and available CET1\n 455: \n 456: The [valuation-capital annex](valuation-capital-annex.md) uses identified recognised fair-value exposures and an expressly selected EU-style model-risk core method. Its two current-model exit-cost ranges are USD1.75m to USD4.25m and USD1.375m to USD2.625m. Expected costs are USD3m and USD2m; separately identified same-source accounting prudence is USD0.2m and USD0.1m. The 90th-percentile costs are USD4m and USD2.5m. Residual uncertainty is therefore USD0.8m and USD0.4m. Method 1's 50% factor gives an incremental AVA of USD0.6m.\n 457: \n 458: That component reduces available CET1 from USD12m to USD11.4m in the explicitly controlled USD100m fixed-RWA illustration. It is not a cash outflow or trading P&L. The separate assumption of USD0.6m replacement equity held for twenty years at a 10% annual charge gives:\n 459: \n 460: ```text\n 461: KVA_AVA = 0.10 * 0.600m * A_0.04(20)\n 462:         = 0.8233230916m\n 463: ```\n 464: \n 465: This is a controlled replacement-equity component, not the whole book's KVA and not an amount to add if the same capital use is already priced. Shifting expected exit cost while holding uncertainty width and same-source prudence fixed can leave AVA unchanged. A wider uncertainty range can increase AVA without a larger expected reserve. The raw automatic chain from larger reserve level to larger AVA is therefore conditional, not a rule.\n 466: \n 467: The applicability and dates are those of CRR consolidated 26 June 2026 and the identified RTS consolidated 26 June 2020, with the post-2020 50% factor. These sources do not make the fictional institution EU-regulated or turn a management funding opportunity into an in-scope accounting asset.\n 468: \n 469: ## 7. Capital cost and the defined comparison with UFVA\n 470: \n 471: The detailed regulatory formulas and rejection gates remain in [capital-rulebook.md](capital-rulebook.md). The funding baseline uses credit-primary SA-CCR, AAA reference SF 0.38%, a twenty-year supervisory duration, alpha 1.4, no CSA collateral and provider A-category ECRA risk weight 30%. The legal classification also requires a dual credit/interest-rate countercase; a trade name cannot settle its primary-driver assessment.\n 472: \n 473: For the selected standalone one-provider reduced-BA panel:\n 474: \n 475: ```text\n 476: K_funding_CCR_CVA(t)\n 477:     = 0.08 * RWA_funding_CCR(t) + K_BA_CVA(t)\n 478: \n 479: KVA_funding(h)\n 480:     = 0.10 * sum_j delta * D_OIS(j*delta)\n 481:                      * K_funding_CCR_CVA(h-(j-1)*delta)\n 482: ```\n 483: \n 484: Capital is sampled at the beginning of the quarter and priced at its end. No recognised incurred CVA write-down is deducted in the base. The KVA path is the disclosed survival-conditional allocation through maturity; default-weighted CVA and the no-default conditional prefunding experiment have their own stated measures. They cannot be silently presented as one empirically calibrated expectation.\n 485: \n 486: For an action, the charge intervals are split only at the genuine execution, expiry and recognition events specified in [capital-actions.md](capital-actions.md#executable-terms-and-timing). Both comparators use the same knots and pay at original quarter ends. Additional reporting observations evaluate current capital but do not resample that accrual basis. The `_capital_action` keyword-only `observations` channel therefore changes the returned `observation_profile`, not cash schedules or KVA; `events` remains the genuine-pricing-event channel. Observation-density invariance under this fixed charge contract is distinct from, and does not establish, numerical convergence of a continuously accruing capital integral.\n 487: \n 488: The executed normal standalone funding KVA is USD27.5230189305m. There are two different comparisons with the conditional USD17.9588363722m UFVA:\n 489: \n 490: 1. The stressed capital-cost level, `core[\"funding\"][\"mark_stress\"][\"KVA\"]`, is USD69.4099354188m: 3.864946146 times conditional UFVA. This is the standalone funding CCR+CVA component for the 100bp quote move with provider CDS held at 80bp, the chosen reset convention and U otherwise unchanged.\n 491: 2. The incremental capital cost is the stressed level minus `core[\"funding\"][\"normal\"][\"KVA\"]`: USD41.8869164882m, or 2.332384773 times `core[\"conditional_UFVA\"][\"UFVA\"]`. Comparing increments aligns the funding experiment more closely than comparing it with the whole stressed KVA level. The ratio fields are `core[\"sensitivities\"][\"standalone_total_KVA_to_conditional_UFVA_ratio\"]` and `core[\"sensitivities\"][\"standalone_marginal_KVA_to_conditional_UFVA_ratio\"]`.\n 492: \n 493: Both comparisons support K8 only for that named component, scenario and allocation rule. They do not prove that KVA universally dominates actual funding cost. Actual mark-only cash UFVA is zero. The USD3.7104953200m actual borrowing-premium PV belongs to the separate reference-loss cash scenario, whereas USD17.9588363722m belongs to the conditional external-deposit contract. Substituting either cash number into the other scenario without repricing changes the comparison.\n 494: \n 495: Whole-book capital must include retained U, deployment, cash, other applicable exposures, the legal TRS classification and written-credit leverage notional. The explicit controlled base weights are 20% on the retained AAA U, 100% on the unmitigated EM cash advance and 0% on the specified central-bank cash account, before adding the relevant funding CCR/CVA amounts. The earlier isolated USD90m risk-weighted capital snapshot is not the actual capital requirement of this USD1bn EM book. Even deployment and retained U alone contribute USD80m and USD16m of 8%-minimum capital at par.\n 496: \n 497: The executed whole-book base requires USD135.6507222715m under the risk constraint, versus USD94.6989784923m under the 3% leverage constraint. Available Tier 1 after the paid service fee is USD99m, with no automatic AVA from the separate controlled example. Risk capital binds and the USD36.6507222715m shortage makes `executable_under_stated_capital` false in `leverage.actual_base_after_day1_fee`. The calculable cash path is therefore an existing-book/counterfactual exposure, not approval to book it without an evidenced capital transaction or effective restructuring.\n 498: \n 499: The desk's disclosed minimum-only all-equity allocation compares `max(0.08*RWA_book, 0.03*L_book)` on the same with/without portfolio. This is an internal pricing convention, not a replacement for Basel's simultaneous CET1, Tier 1 and total-capital requirements. A collateral substitution can move the binding constraint to leverage. The five-year protection maturity ratio can be one at CDS execution despite the longer funding exposure; it does not confer a five-year-capped written-credit leverage offset. The immediate-execution twenty-versus-five comparator has a fifteen-year unprotected tail. The quoted action starts after two business days, expires at book year 5.008, and leaves 14.992 years after expiry plus an unprotected initial two-day interval.\n 500: \n 501: [capital-actions.md](capital-actions.md) supplies executable quotes and lifetime comparisons for CSA execution, high-grade substitution, enforceable netting, designated or undesignated provider CDS, holding capital and releasing a substitution. The stated scopes matter:\n 502: \n 503: - Substitution costs a 90bp annual concession on USD1bn for five years plus USD1m execution cost; undoing it costs USD0.250m. Reduced capital need not compensate for the lost yield.\n 504: - Netting costs USD0.750m and waits for the signed, scoped opinions and novation conditions. A pending thirty-business-day process provides no early relief.\n 505: - Five-year USD320m provider protection costs an 80bp annual premium, USD0.250m execution cost and USD0.025m annual administration. The five-year tenor runs from its actual two-business-day execution, not from book inception. Provider H's own exposure, CVA, designation, expiry and declining recognition remain in the before/after calculation; the full premium, fee and administration costs appear in [capital-actions.md](capital-actions.md).\n 506: - Holding capital costs the applicable KVA profile. Expected roll-down is already priced. Structural relief is the recalculated future-cost difference net of the action price, not an extra cash receipt.\n 507: \n 508: Action NPVs labelled standalone CCR+CVA components do not become whole-bank gains merely because a separate leverage snapshot is shown. The allocation episode also supplies a concrete capital/economics reversal: routing all fifty small lots to the cheaper, weaker lender raises incremental SFT CCR capital versus the feasible forty-nine-lot alternative while lowering total financing cost. Capital capacity released by any action stays out of cash until an actual transaction changes cash.\n 509: \n 510: If a five-year client spread is used to recover a selected cost NPV, the spread increment is `cost_NPV / [N*A_0.04(5)]` under this payment grid. Charging it over a fictional twenty-year deployment would understate the spread. The cost must include all relevant tail obligations and feasible execution costs on the stated allocation basis.\n 511: \n 512: ## 8. Public recomputation and report boundaries\n 513: \n 514: | Obligation | Source facts and mechanism | Authoritative calculation |\n 515: |---|---|---|\n 516: | E1 | Sale/title, TR roles, issued U, reset price, matched replacement quote, stubs | `core.marks`; F, reference adjustment and V derived separately |\n 517: | E2 | Explicit cash obligations or the separately effective prefunding facility; own-bond quote and beta | Actual `cash_scenarios` versus `core.conditional_UFVA` |\n 518: | E3 | Executed CSA, direction, thresholds, remuneration, custody/reuse and settled transfers | Recomputed margin exposure and cash deficits, including adverse VM |\n 519: | E4 | Distinct curve identities and full before/after states | `core.curves`, `core.sensitivities`, CVA and cash-funding recomputation |\n 520: | E5 | Opening balances, sourced cash/title entries, clean marks, D and X conventions | `compute_reserves` attribution versus independently derived journal/equity |\n 521: | A1 | Accounting unit first, then actual input observability | Management/statutory bridge and legitimate D release trigger |\n 522: | A2 | Frozen-market roll and subsequent market/action revaluation | Separate D/X schedules and component attribution |\n 523: | A3 | Actual payment causing a deficit, no debt entry for a reserve alone | `simulate_cash`; separate cash-funding-expense line |\n 524: | A4 | Recognised FV scope, model uncertainty and same-source prudence | Incremental AVA and available CET1, distinct from P&L/cash |\n 525: | A5 | Reconciliation, fees/funding/hedges and surviving obligations | Independent closing accounts and terminal USD0.500m unresolved-claim reserve |\n 526: \n 527: The candidate still reports `rates`, `credit_xva`, `capital`, `liquidity` and `accounting` separately under [report.schema.json](../schemas/report.schema.json). Shared causes must agree across sections. Funding spread sensitivity can drive quote-derived exposure and conditional UFVA under the named cash contract. Valuation uncertainty can reduce CET1 and change the cost of allocated equity. Separate fields do not make these independent economic decisions.\n 528: \n 529: [wrong-way-branches.md](wrong-way-branches.md) specifies the five mutually exclusive case instances implementing W1's two instrument-existence alternatives and W2-W4. Missing quotation, legal scope, issuer kind, correlation fact, cash access, rating or event timing is a reference failure. Evidenced non-recognition or a documented zero cash recovery is a valid case result. The distinction prevents missing data from making the trade look safe.\n 530: \n 531: [IFRS9]: https://www.ifrs.org/content/dam/ifrs/publications/html-standards/english/2026/issued/ifrs9.html\n","tool_call_id":"call_1ae949ef424e5d7ea7dfd4bc05c16d19","type":"tool_result"}},{"step":5,"generation":0,"created_at":"2026-09-20T09:56:19.534Z","event":{"content":"File: /work/data/artifacts/qyaws7fs/documents/docs/desk-runtime-contract.md\n   1: # Settled desk contract\n   2: \n   3: This contract specifies the actual daily book, not the seventeen controlled financial report panels. It is a named synthetic desk convention supplementing the dated rulebook. The versions exported by `desk_contract.py` are `desk-state.v3`, `desk-envelope.v2` and `desk-policy.v3`, with no v1 aliases. Report labels remain `daily-book.v2` and `daily-grade.v1`; `worker-packet.v1` is unchanged. The active contract has nine report sections and twelve owners. Implementation and executed evidence are separate. The unchanged build-and-prove protocol records historical methodology, not a practitioner-first block on engineering or model execution.\n   4: \n   5: ## Authority and module ownership\n   6: \n   7: The evaluator owns the family, market path, state, immutable receipts and grading. A protected worker receives the current packet, public conventions and a writable work directory. Calculations are bounded data, never executable artifacts, and cannot change the book. Current `counterparty_constraints`, mandate rules and relevant legal source objects belong in the packet. Generated `accepted_positions`, gold, future external events and private evaluator history do not. The canonical base case and `FUND_01` seed 1 are deliberately declassified public practice, a separate publication boundary.\n   8: \n   9: `desk_ledger.py` owns economic state and accepted transitions. `desk_valuation.py` produces the independently valued book, including actual client outcome. `institutional.py` checks sourced legal findings, mandate decisions, client structure and recommendations for both report paths. `daily_grader.py` reads the submitted report and valued book. `desk_replay.py` independently folds receipt postings and state operations without calling the transition function. `desk_runtime.py` owns SQLite persistence, revisions, receipt chains, packets and CLI. `worker_boundary.py` owns worker launches, restart supervision and boundary probes. These are implementation boundaries, not claims that their acceptance runs passed.\n  10: \n  11: ## Public function boundaries\n  12: \n  13: - `desk_ledger.initial_state(parameters, family) -> {state, receipts}`: generate explicit inception and pre-window contractual receipts, then the servicing-window state. Only this function interprets the disclosed opening endowment.\n  14: - `desk_ledger.quote_board(parameters, family, state) -> list[quote]`: current executable actions, terms, capacity and legal prerequisites; quote ID includes market/legal versions and effective date. No future path.\n  15: - `desk_ledger.settle_day(parameters, family, state, actions) -> {state, receipts, blockers}`: pure transition on a copy. An invalid action batch returns no economic mutation. A successfully settled day increments the calendar once and releases only events now available.\n  16: - `desk_valuation.value_book(parameters, family, state) -> book`: deterministic Decimal financial output. No candidate data, future events, gold or prior candidate ledger. State contains received event effects, not a supplied exposure path.\n  17: - `daily_grader.expected_daily_report(parameters, family, state, book, previous_book=None) -> report`: evaluator-only bounded daily assertions.\n  18: - `daily_grader.grade_daily(parameters, family, state, report, previous_book=None) -> grade`: grade the submitted parent checkpoint before applying its actions or revealing tomorrow. Qualification is separate from twelve fixed-denominator owners. No accepted worker action anywhere in the run means `not_scoreable`, with no score. A first accepted day may retain the opening report for later scoring without comparing it to the post-action book. Invalid candidates receive `candidate_error`; reference or verifier failures receive `UNSCORABLE`; neither has a score. An accurate report of an unsuccessful client outcome can lose O11.\n  19: - `desk_replay.replay_receipts(parameters, family, genesis, receipts) -> state`: independently recompute permitted amounts, paid-obligation identities, titles and capacity from immutable contract/quote/event terms before applying each receipt. Verify sequence, parent hash, balanced postings and unique IDs. It must not call `settle_day`, trust candidate assertions or accept a declared final balance. A balanced duplicate coupon with a fresh receipt ID must fail because its contract-period obligation is already paid.\n  20: \n  21: Internal state and receipts use exact decimal strings at serialization boundaries. Python computation uses Decimal. Hashes cover canonical sorted-key JSON; omit only the hash field itself. State is an economic object, not a report log: submitting a different calculation, an invalid envelope or an atomic rejected action cannot alter its hash.\n  22: \n  23: ## Clock and settlement order\n  24: \n  25: The family supplies `funding_start_date` and `window_start_date`. Event `day`/`available_at` is an integer calendar-day offset from the window start. Original funding and deployment coupons fall on calendar three-month anniversaries of funding inception, preserving end-of-month. Each whole coupon accrues 0.25 contractual years. Within a period, financial time is completed quarters times 0.25 plus 0.25 times elapsed actual days divided by the actual days in that period. This keeps twenty-year/five-year maturities and actual payment dates without treating every observation as a payment. Every later CDS, repo, facility, offset or reinvestment contract stores its own execution/effective date, payment schedule, maturity, accrued stub and business-day convention. Its age and premium dates are not the original funding clock; protection bought midquarter starts its five-year term and accrual at its own execution.\n  26: \n  27: The evaluator derives opening accrual and any paid contractual history from inception; it does not move inception to the servicing window. Newly available dated news and the current day's ordered cash milestones are disclosed in the packet. Authored same-day order is preserved through explicit phases under `desk-event-bindings.md`; coupon-first and debit-first are different histories. A candidate action plan specifies a public phase. Envelope versions are checked once, but live cash, title, obligation balances, legal rights and quote capacity are checked against the staged state at every phase. A failed prior draw cannot fund a later action. A coupon announcement, invoice collection into a restricted correspondent account, licence, market opening or facility permission is not free cash. A missed earlier cutoff cannot be repaired by a later same-day coupon. Due obligations arise from contracts/events independently of candidate rejection; a rejected action cannot invent a payable. No future-day news is used to grade the current parent checkpoint.\n  28: \n  29: The clock cannot be advanced by a worker request other than committing that day's accepted actions. `hold_capital` is an explicit risk decision; it changes no cash and carries the capital profile. An empty action list does not create an accepted worker action. The observation horizon is evaluator configuration, not a worker-visible completion signal. Restarted workers retain the same work volume and current authoritative packet.\n  30: \n  31: ## State and receipts\n  32: \n  33: State fields are closed and versioned: `schema_version`, `family_id`, `day`, `as_of`, `financial_time`, `revision`, `market_version`, `legal_version`, `market`, `legal`, `accounts`, `lots`, `contracts`, `pending`, `obligations`, `accepted_action_ids`, `accepted_action_count`, `applied_event_ids`, `last_receipt_hash`, `last_receipt_sequence`. A public view includes the current state hash. The protected event path and evaluator outputs never enter it.\n  34: \n  35: Accounts are debit-positive trial-balance amounts with an explicit account-kind registry: unrestricted cash, restricted opening cash, restricted collections, retained U, deployment principal and accrued coupons, reinvestment principal, owned inventory, posted VM, unpaid receivables, repo debt, external unsecured debt, sale financing, legacy debt, received VM, return obligations, unpaid payables, claim allowances, contributed equity and named income/expense accounts. Total debits equal total credits. Each financial receipt identifies source/destination, contract, amount, asset/lot identity, economic purpose, available date and settled status.\n  36: \n  37: The management ledger is a separate overlay journal with `funding_mark`, `hedge_asset`, `deferred_management_gain`, `management_XVA` and corresponding mark, deferral, reserve and hedge income accounts. It is posted at each valued checkpoint from old-market roll, current-market remeasurement and accepted-action effects. The statutory journal never acquires these management-only funding assets or liabilities. Independent overlay equity plus the explicit statutory bridge must reproduce statutory equity; no balancing plug is permitted.\n  38: \n  39: Lots carry `id`, `instrument_id`, `quantity`, `owner`, `location`, `encumbrance`, `issued`, `return_obligation`, `reuse_permitted`, `enforceability`, `source_evidence`. Economic recognition does not imply legal title. U is statutorily retained but legally at the funding provider and cannot be sold or pledged again. A contingent issuance promise is not a security; a later issuance has a new identifier and no assumed liquidity.\n  40: \n  41: The actual runtime starts with the source book's cash and paid opening trades, plus the separately disclosed allocation inventory as an owner contribution in kind. The contributed value equals the sum of those source lots' values. It is neither cash nor P&L. Every lot and the equity contribution appear in genesis receipts. This makes the allocation exercise an actual owned inventory rather than spending assets from an unrelated controlled panel. `initial_operating_cash` is a subset of total opening cash; the remainder is restricted under a named mandate. Neither a certificate nor a capital release adds cash.\n  42: \n  43: Receipts contain `id`, `sequence`, `day`, `action_id`, `event_id`, `kind`, `source_evidence`, `terms`, `postings`, `operations`, `previous_receipt_hash`, `hash`. Both identity fields are present and nullable; an action receipt and an event receipt cannot claim each other's identity. `terms` preserves the authenticated immutable input record. `postings` are balanced account deltas. Operations are closed economic changes to lots, contractual states, current market/legal facts and obligations, never a wholesale replacement state. Historical fills, locked financing spread and previous receipts are immutable. Replay validates legal title and cash conservation independently of declared report totals.\n  44: \n  45: `legal.decisions` and `legal.approvals` begin empty and retain accepted institutional history. A decision is `{id,kind,rule_id,subject_id,reason_code,submitted_at,status,source_evidence}`. Its ID is `decision:<action_id>`, kind is `escalate` or `decline`, and status is `escalated` or `declined`. An approval is `{id,rule_id,subject_id,approver_id,requested_at,effective_at,expires_at,status,used_by,source_evidence}`, with ID `approval:<action_id>` and status `pending`, `approved`, `declined`, `consumed` or `expired`. `used_by` is null except for the consuming accepted action ID. Dates are ISO strings and evidence retains the authored rule shape.\n  46: \n  47: Decision records are immutable. Pending approvals can become approved, declined or expired; approved approvals can become consumed or expired, not declined. Later changes create new receipts rather than rewriting requests. A pending approval resolves in one of two ways: an authored `approval_response` event for the same rule, subject and approver dated on or after the request moves it to the authored outcome on that event's day under an `event:approval_response` receipt; the scheduled review keeps it pending until then even past `effective_at`, and only catches up, from the following day, a request accepted after that event's phase; with no such event the review applies the rule's constant `approval_outcome` once `effective_at` arrives. Either way `expires_at` is fixed by the request and expiry wins. Approvers are parties; a rule may name the bank or an `internal_function` party (role `credit_committee`, `legal`, `compliance` or `desk_head`), and a rule naming a party absent from the case is a reference error at load. Creating a decision or approval, or changing an approval's status, increments `legal_version`; an identical re-put is a no-op. Approval dates satisfy `requested_at <= effective_at < expires_at`. Source action IDs must be accepted, and replay verifies identities and transitions.\n  48: \n  49: Genesis binds parameter, family, public-policy and event-binding hashes. Closed `accept_action` and `commit_day` operations record accepted IDs, increment revision/day once and derive `as_of`/financial time from the authenticated clock, including a zero-cash hold day. Replay recomputes those fields; it does not trust a replacement-state blob. A semantic receipt checker derives each expected amount/obligation from the bound sources independently of the live transition implementation. Balanced invented debt and repeat payment under a new receipt ID must fail that check.\n  50: \n  51: `last_receipt_sequence` starts at zero in genesis. Each emitted receipt increments it by one and updates `last_receipt_hash`; only the journal may update these derived fields. No candidate operation can assign them. Replay verifies contiguous sequence independently, so pure transitions and persistence require no hidden mutable sequence counter.\n  52: \n  53: ## Envelope and atomicity\n  54: \n  55: The `desk-envelope.v2` envelope contains `schema_version`, `parent_state_hash`, `revision`, `market_version`, `legal_version`, `actions`, `calculations`. Each action has a closed payload, unique `action_id`, public `phase` and bound `quote_id`; the version belongs to the outer envelope, not individual actions. Candidates cannot supply receipts or replace a quote's settlement price. Calculations retain the `daily-book.v2` label and require all nine sections; old five-section reports are invalid, not adapted.\n  56: \n  57: The evaluator commits actions, generated receipts and the new state in one `BEGIN IMMEDIATE` transaction with unique action IDs. Stale parent/version/revision, unknown keys, nonfinite or malformed money, duplicate keys, oversize input, unknown quote and reused action ID reject before execution. A rejected economic batch is atomic; the run's rejection/blocker log is separate from economic state. Qualification can latch a fatal attempted legal/cash/title violation without pretending a rejected transfer occurred. No partial fill is manufactured.\n  58: \n  59: ## Executable action set\n  60: \n  61: 1. `hold_capital`: accept the current risk/capital cost without inventing a gain or cash.\n  62: 2. `execute_csa`: pay the quoted legal/operational price and schedule activation after the quoted business-day delay. Only the evidenced two-way agreement changes margined treatment. Actual VM transfers have separate receipts; RC uses transferred cash, not an unexecuted CSA label. Negative marks require liquidity. VM principal is not P&L.\n  63: 3. `substitute_collateral` and `reverse_substitution`: pay fees, meet custody/enforcement conditions and the effective date; swap actual rights. The quoted deployment yield concession starts only when substitution is effective. Original eligibility can return on reversal. Return obligation and existing reuse must be honoured before changing a lot.\n  64: 4. `execute_offset` then `consolidate_netting`: execute the separately quoted offset trade with its real upfront and future obligations. Consolidation pays its legal fee and changes netting only after the named jurisdiction opinions and novation confirmations arrive at the quoted delay. A master-agreement assertion alone creates no netting.\n  65: 5. `buy_protection` and `designate_protection`: execute the quoted CDS, accrue/pay its premium, preserve its own counterparty exposure and actual expiry. CCR maturity recognition and the economic tail are separate. Designation needs the stated eligible terms; it changes CVA-capital treatment, not premium history. An undesignated hedge retains the disclosed market-risk charge.\n  66: 6. `repo_allocate`: submit an actual whole-lot assignment to the quoted lenders. Recompute issuer concentration, minimum names, pool limits, market haircut, supervisory haircut and capital. Accepted cash arrives with title transfer/encumbrance and repo debt. Duplicate or unavailable lots reject. Repo maturity creates a real repayment/return obligation. Actual cash expense is contractual repo interest and explicit fees only. The static allocation objective's haircut funding and equity-hurdle terms remain disclosed noncash opportunity/capital allocation metrics; owner-contributed lots do not imply haircut borrowing. Never book the objective total as a cash fee.\n  67: 7. `repay_repo`, `sell_lot`, `buy_equivalent`, `return_collateral`: use current quoted prices, quantities and rights. An identical-return obligation forbids outright disposal; equivalent-return permission does not extinguish the obligation. Selling reusable received collateral creates a return liability, not sale profit. Buying an equivalent instrument uses cash and creates a newly identified lot. Returning a lot requires the secured debt's discharge and removes the matching obligation once.\n  68: 8. `draw_facility` and `repay_facility`: only the named, currently committed branch facility, within available limit. Permission is not a draw. Actual cash and debt move together; costs use its quoted unsecured funding spread. Default or legal suspension can remove undrawn capacity without erasing already drawn debt.\n  69: 9. `meet_margin_call`, `settle_payable`, `liquidate_collateral`, `reinvest`, `settle_claim`: act on identified existing obligations. No unknown payee, fabricated amount or unknown asset. Liquidation requires instrument existence, enforcement and an open realization market; default dependence and transfer controls are separate gates. Reinvestment spends actual matured principal at current quoted tenor/spread, not a precommitted year-five renewal.\n  70: 10. `escalate` and `decline`: submit a scoped `rule_id`, permitted `reason_code`, typed `premises` and `rationale` with the normal action/quote/phase fields. Accepted decisions create immutable dated receipts and `legal.decisions` entries, without financial postings. Escalation creates a pending approval resolved under the disclosed rule's approver, outcome, delay and validity period, or by that approver's authored dated response when one exists. A request is not approval. A declined route cannot execute without a new valid mandate or approval; unrelated routes remain available.\n  71: \n  72: Actions are priced by the public current quote board. Scheduled legal effects and payments survive worker restart. Only an obligation created by an already accepted contract or authenticated external event can become overdue and trigger a qualification blocker. A rejected proposed CSA, CDS, repo or sale leaves no fee, principal, return liability or other economic mutation. Cash never silently becomes negative. No risk remedy may manufacture equity.\n  73: \n  74: Mandate rules are scoped by action kind and subject, with tier `permitted`, `requires_approval` or `prohibited` and any stated amount cap. Execution under an approval requires the correct subject/rule, effective date, validity and unused authority; acceptance records consumption. Permission does not override intrinsic title, enforcement, instrument existence, cash, size or capital constraints. `escalate` and `decline` are accepted institutional actions, not no-op stand-ins for a failed trade.\n  75: \n  76: ## Event effects and legal axes\n  77: \n  78: Every authored event payload must map through an explicit, reviewed binding to closed effects, with its source ID. Unsupported `cash_rule`, right/status, settlement kind or contract is a reference failure. No keyword matching of prose. Effect categories are market curve/rating update; opening or closure of realization market; transfer restriction; named legal right status; current committed facility status; issued-instrument transition; contractual payment due; restricted collection receipt; final remittance; identified default; observability evidence; disputed claim recognition/payment; substitution request. News alone does not execute a trade.\n  79: \n  80: At borrower/reference joint default, already-issued same-issuer collateral has the stated conditional liquidation value, including zero where specified. Independent paper does not inherit that zero. A contingent promise cannot be priced from a traded line and cannot be liquidated before issuance. A payment-rights collection can survive borrower default yet remain trapped by transfer controls. Market closure prevents realization even when credit and title are sound. These paths are separate machine facts, not a W-label switch.\n  81: \n  82: A repo-form deployment supplies legal title subject to the stated return obligation; a pledge leaves title with the pledgor. Neither adds a second statutory asset when the repo is a secured lending accounting unit. Reuse requires explicit permission, effective enforcement and an unencumbered current right. Conditional or denied enforcement cannot be inferred effective from a document title.\n  83: \n  84: ## Valuation and accounting\n  85: \n  86: Use the common Decimal primitives and dated rules. The daily legal funding mark uses the matching quote's beta and conversion rate, actual remaining financial tenor, last paid price reset, actual delay to the next price settlement and current unpaid coupon stub. Its clean off-quarter component uses the explicitly quoted fractional-annuity convention; do not claim exact original-date coupon repricing. Exposure is derived from that mark and actual collateral. Current provider CDS drives CVA; current own unsecured bond spread drives actual debt funding. Bond-CDS basis is separately reported and is not substituted for the all-in spread over OIS.\n  87: \n  88: Actual current SA-CCR uses `saccr` with the full legal mark and transferred VM amount, not `funding_capital`'s fully-collateralized clean projection shortcut. A signed CSA with delayed or partial VM does not set collateral equal to value. Future CVA/KVA projections disclose their assumed contractual settlement schedule separately from current exposure. Whole-book capital explicitly maps every new balance-sheet asset: contributed allocation inventory, restricted cash/collections, posted VM, accrued and overdue receivables, purchased equivalents and recognized return liabilities. Their risk weights and leverage inclusion are current worker-readable desk/authority inputs. `wholebook_capital`'s original four-asset mapping cannot silently treat new contributed inventory as free Tier1 equity without its matching asset exposure.\n  89: \n  90: A reserve charge is not a borrowing receipt. Funding drag is accrued on actual outstanding debt. Any explicit exposure-prefunding transaction must show both borrowed cash and its funded asset before a quadratic funding charge is claimed. The actual base and that conditional transaction cannot be added as though both had executed.\n  91: \n  92: Produce statutory and management books with a reconciled bridge. The retained-U funding unit has no second statutory derivative. Management clean gain, gross inception deferral and CVA/KVA reserves are shown separately. Deferral uses frozen inception inputs and a disclosed time/observability trigger; reserve theta is repricing at the old market after clock roll, reserve MTM is the difference from that rolled old-market value, and action release is separated from both. Hedge cash/premium/mark and actual cash funding drag have their own lines. Each attribution equals the independently posted journal's equity movement, with owner contributions excluded from P&L.\n  93: \n  94: Prudent valuation applies only to identified recognised fair-value exposures and supplied uncertainty evidence. No mechanical AVA is invented merely because a management reserve grew. Show the separate CET1 deduction and the replacement-equity/KVA consequence where the actual identified exposure supports it. Scheduled maturity removes only paid/closed obligations. Unpaid claims, collateral returns and allowances survive the date until receipt-backed settlement or evidenced discharge.\n  95: \n  96: ## Daily score\n  97: \n  98: There are twelve owners with weights 7, 7, 10, 7, 8, 7, 6, 8, 10, 10, 10 and 10, totalling 100. Required report sections are `rates`, `credit_xva`, `capital`, `liquidity`, `accounting`, `legal`, `compliance`, `structure` and `recommendation`. The daily report remains `daily-book.v2`, distinct from the controlled static report `back_to_back_funding_book.v1r2`. The historical eight-owner weights and matrices remain evidence for their original versions only.\n  99: \n 100: O1 checks legal roles, current funding mark, source of cash, remaining tenors, contractual deployment spread and title. O2 checks independent CDS/bond drivers, CVA, debt-funded UFVA and noncash/debt distinction. O3 checks actual SA-CCR, collateral eligibility/haircut/maturity recognition and capital. O4 checks executed protection, regulatory recognition, designation and uncovered tail. O5 checks real quotes/capacity, current inventory allocation and action cost. O6 checks instrument existence, accessible cash and deadline shortfalls. O7 checks accounting unit, observability and deferral. O8 checks reserve attribution, independent journals, funding drag, AVA and outstanding terminal claims.\n 101: \n 102: O9 checks sourced legal conclusions and conditions. O10 checks the scoped mandate decision and current approval status. O11 checks the actual client outcome, including delivery, deadline, executable legal form, classification, return duties, required approvals, borrowing ceiling, contractual spread and bank viability. O12 checks the selected recommendation, binding constraint and alternatives against conclusion-specific support. `institutional.report_properties()` supplies the four schema sections; `grade_sections()` checks the report independently of the reference answer from `expected_sections()`. Supported alternatives can pass without matching reference wording or a whole premise list.\n 103: \n 104: Institutional premises identify `source`, RFC6901 `pointer`, `relation` and `value`. Relations are `eq`, `ne`, `gte`, `lte` or `contains`; source is `case`, `state`, `book` or `report`. Financial values are Decimal strings. Authenticated case/state/book facts provide authority. A report assertion cannot authenticate itself, and an unrelated true fact cannot support a conclusion. Rationales remain free explanation; neither length nor keywords determine the grade.\n 105: \n 106: Fatal legal/cash/title/ineligible-mitigation/fabricated-capacity errors disqualify independently of dense score. An accurate report of a rejected proposal is not an executed violation, but accurately reporting an unsuccessful client outcome does not earn O11. Missing evidence cannot earn an owner. A no-action run is not scoreable. The run result retains the final replay-valued book and elapsed-day-weighted owner history; later recovery cannot erase earlier unsuccessful or missing checkpoints. The static controlled KEEP proposal is not used to declare the capital-deficient live base viable.\n 107: \n 108: ## Required execution evidence\n 109: \n 110: After the family static gate: exercise all accepted action kinds, stale/duplicate/unknown quote refusals, atomic rejection, illegal reuse/double sale/double pledge/phantom cash refusals, no-action refusal, calculations-only state invariance, action-history dependence at the same final market, real restart with persistent work, independent receipt replay, every authored event binding and legal axis, deadline before later receipt, year-five reinvestment and year-twenty unresolved settlement. Grade each isolated daily-owner mutation and retain its matrix. Container canaries must exercise actual denied reads/network, not a Docker-argument inspection alone. Runtime and static financial audit receipts retain their distinct scopes.\n 111: \n 112: ## Implementation interfaces and ownership\n 113: \n 114: The historical family static gate in `evidence/build-and-prove/families-03/evidence/family-audit.json` records 64 generated roots/golds/identity matrices and 32 reseeds under the earlier contract. It is not current twelve-owner, runtime or statistical-independence evidence. A generated root contains `family.json`, `fixtures/numerical-inputs.json` and the selected case. Bindings remain evaluator-owned under the source bundle's `fixtures/event-bindings/`.\n 115: \n 116: `desk_contract.py` owns exact-decimal serialization, canonical hashing, calendar functions, closed state/envelope/receipt shapes and the journal primitive. `desk_ledger.py` owns opening receipts, atomic orchestration and checkpoint postings. `desk_events.py` owns authored effects, dated approval transitions and scheduled obligations. `desk_actions.py` owns quotes, scoped mandate checks and accepted-action economics. `desk_valuation.py` owns valuations and management overlays; its `client_outcome` comes from the shared pure institutional helper. `desk_replay.py` owns independent semantic replay. `daily_grader.py` owns the nine-section daily report and financial owner checks, consuming shared O9-O12 semantics. `desk_runtime.py` owns persistence and CLI. Main integrates and runs verification after writers finish.\n 117: \n 118: All of these files live under `src/`. Common helpers are `D(value)`, `serial(value)`, `canonical(value)`, `state_hash(state)`, `add_months(date, months)`, `financial_time(family, date)` and `as_of(family, day)`. `CandidateError` is a data/structural refusal; `ActionError` contains a stable refusal code and optional fatal blocker. Missing or inconsistent evaluator inputs raise `ReferenceError`. A complete validated source context is `context = {parameters, family, case, bindings, policy}`; the runtime obtains it with `load_context(family_root, source_root)`. Neither that object nor a source path supplied by a worker is a public worker capability.\n 119: \n 120: The loader computes `policy.source_binding` from the raw public policy, generated input files and required rule-document bytes. This derived object contains relative source identities and hashes, never evaluator filesystem paths. An authored policy cannot supply that reserved field. The raw policy hash excludes this loader-generated binding to avoid recursive hashing. The context remains the five-key object above; candidate packets cannot override its source manifest.\n 121: \n 122: Internal state is plain JSON-compatible data; monetary quantities remain decimal strings between modules. `accounts`, `lots`, `contracts` and `obligations` use stable identity keys. Accounts are signed debit-positive balances. Their closed prefixes identify statutory assets, liabilities, equity, income, expense or management-only overlay. `pending` is an ordered array of accepted dated effects. `legal.rights` is keyed by right, scope and collection identity; it cannot turn scoped permission into general permission. `legal` also holds decisions, approvals, transfer status, observability, facility status and irreversible default facts. `market` retains the authored curves, own CDS, role-specific rating labels and realization-market status. Opening incremental curve moves are explicitly zero by convention; required spreads and ratings still come from source inputs.\n 123: \n 124: A journal is `Journal(state)` with mutable `.state` and generated `.receipts`. `emit(kind, postings, operations, source_evidence, *, action_id=None, event_id=None, terms=None)` verifies debit/credit conservation, applies closed operations, chains a canonical hash and appends one immutable receipt. `postings` is an account-to-signed-decimal dictionary. `terms` is an immutable quoted/contract/event input record, not candidate-declared settlement truth. Operations may change a named lot, contract, obligation, current market/legal fact or accepted/clock field; they cannot replace the entire state. The journal enforces structure and conservation, while action/event handlers enforce economic eligibility. The replay verifier derives permitted economics separately; calling the same handler to reproduce a receipt is prohibited.\n 125: \n 126: Operations use the discriminator `op`. A journal may retain staging metadata `.parent_state`, `.parent_state_hash`, `.parent_revision`, `.parent_market_version`, `.parent_legal_version`, `.phase`, `.action_quotes` and `.blockers`. None is an additional economic state field or a candidate capability. Any `.sequence_start` is derived from `state.last_receipt_sequence`, never supplied as independent authority. The derived source binding may include `documents: {logical_id: {sha256, text}}` for exact reviewed citation spans. These documents must be hash-checked. Only spans actually made available to the worker can support a scored citation.\n 127: \n 128: Events export `load_bindings(source_root, family)`, `visible_events(context, day)`, `day_phases(context, state)`, `apply_event(context, journal, event)` and `settle_scheduled(context, journal, phase)`. Actions export `quote_board(context, state)` and `apply_action(context, journal, action)`. Actions include `phase`, `action_id`, `kind`, and `quote_id` where priced; each kind has a closed payload. Ledger exports `initial_state(parameters, family, *, context)`, `quote_board(parameters, family, state, *, context)` and `settle_day(parameters, family, state, actions, *, context)`. These retain the financial signatures above while making source context explicit. A successful result includes `state`, `receipts`, `blockers` and `accepted`; an atomic refusal returns the unchanged economic state and no receipts. Empty actions are calculation-only and cannot advance the clock. A hold is an accepted action.\n 129: \n 130: The current day's complete available event sequence and phase IDs are public. The action quote board binds the parent revision and each quoted phase's disclosed market/legal inputs. Cash, title and remaining capacity are checked again against the staged state when an action executes. Scheduled receipts respect authored ordering and period-specific overrides. Settlement processes only the current day's disclosed phases, then increments day once and publishes tomorrow's available packet. Publication alone does not receive cash. No future-day event may influence today's action eligibility or quoted capacity.\n 131: \n 132: Valuation exports `value_book(parameters, family, state, *, context)` and `checkpoint_overlay(parameters, family, previous_state, state, *, context)`. The latter returns explicit target overlay balances and an attribution independently tied to those balances; ledger emits the checkpoint postings. Valuation must not import action/event/ledger transition handlers. Current statutory totals, management totals and their bridge remain separate. Replay may use common pricing primitives and the pure valuation module, but cannot import `desk_ledger`, `desk_actions` or `desk_events` transition handlers. It independently verifies receipt sources, amounts, unique economic obligations, legal gates, operations and chain before comparing the final valued book.\n 133: \n 134: Daily grading exports `expected_daily_report(parameters, family, state, book, previous_book=None, *, context)` and `grade_daily(parameters, family, state, report, previous_book=None, *, context)`. Reports retain `schema_version=\"daily-book.v2\"`, `parent_state_hash`, nine required sections and current source support. Grades retain `daily-grade.v1`. Financial fields are owned separately; O9-O12 check institutional conclusions through `institutional.py`. The runtime grades the parent checkpoint, not the returned next-day state. A provisional opening grade is not a scoreable run until an actual worker action is accepted. A rejected action may retain a truthful parent report without pretending execution. Missing/rejected checkpoint credit is not dropped from the fixed observation denominator.\n 135: \n 136: Runtime commands are `init`, `packet`, `submit`, `replay` and `result`, with explicit family/source roots, database path and bounded input/output paths. The database stores source hashes, genesis, state, receipts, accepted-action uniqueness, rejected attempts, parent-checkpoint grades and actual client-outcome history. A single SQLite transaction covers an accepted envelope. Protected packets contain current state, quotes, available events/bindings, prior accepted receipts, public constraints, mandate and conventions/calculator. They exclude generated reference positions, gold, grade diagnostics, future external events, evaluator paths and the observation-stop horizon. The Modal bridge copies only the curated packet and bounded candidate output.\n 137: \n 138: ### Snapshot builder\n 139: \n 140: `desk_snapshot.py` is the one seam above `init` and `submit` that turns a desk path into a static case (ADR-0001). `build(family_root=, source_root=, script_path=, day=, output=, engine_root=None, node=\"node\")` and the CLI `build --family-root R --source-root S --script script.json --day N --output DIR [--engine-root E]` open a `DeskRuntime` in a temporary database, submit one envelope per scripted day, and freeze the day-N result under `DIR`. The frozen root is never appended to; `DIR` must not exist.\n 141: \n 142: The script is `{\"schema_version\": \"desk-snapshot-script.v1\", \"days\": [batch, ...]}` with exactly N batches. A batch is `{\"actions\": [...], \"calculations\": object|null}`; `actions` is nonempty because an empty action list is calculation-only and never advances the clock, so a pure prefix uses `hold_capital`. A scripted action carries `kind`, `action_id`, its closed payload, and optionally `phase` and `quote_terms` (a subset of the quote's `terms`); `quote_id` is never scripted because quote ids embed the parent revision and versions. The builder resolves each action against the current quote board by kind, then phase, then term subset, taking the earliest phase. Every batch must settle as `accepted` and advance exactly one day; a refusal, `settled_prefix` or `calculations_recorded` aborts the build with `SnapshotError` and no output.\n 143: \n 144: The frozen root is the `export_practice` layout plus the snapshot artifacts: byte copies of the static schemas, rule documents, `docs/exhibit-fields.md`, `fixtures/numerical-inputs.json`, `worker/legal-terms.txt` and `worker/docs/desk-runtime-contract.md` from the family root and `fixtures/desk-policy.json` from the source root; `worker/packet.json`, the day-N packet with every receipt page concatenated (`receipt_window.after_sequence` 0, `has_more` false; this file is not bounded by `max_packet_bytes`); `fixtures/case-exhibits.json`, one case whose `episode_id` is the family branch (one of the five static case ids, which is how the static grader selects it), whose public keys are verified identical to the packet's `public_inputs.case`, carrying the static-schema tables the family case already carries, plus the `RECEIPT_LOG` document and `snapshot: {day, parent_state_hash, run_prefix_hash}` where `run_prefix_hash` is `state.last_receipt_hash`; `docs/receipt-log.md`, one anchored section per receipt id whose summary line is the locator quote and whose body is the canonical receipt; and `snapshot-manifest.json` with the script digest and content hashes. `family.json`, `binding-manifest.json`, `fixtures/expected-reports.json` and `fixtures/mutation-fixtures.json` are excluded. The static validator requires `snapshot` and `RECEIPT_LOG` to appear together; cases without either validate unchanged.\n 145: \n 146: Determinism: two builds of the same roots, script and day are byte-identical. The packet's `run_id` (a UUID minted at `init`) is replaced by the first 32 hex digits of SHA-256(canonical script, parent_state_hash); attempt and run timestamps stay in the discarded temporary database; receipts carry no wall-clock fields; all generated JSON is written with sorted keys.\n 147: \n 148: Grader-only refusal: before any path is created, the builder scans the family's public surface (the case's public keys and `worker/*.json`) and every JSON value it would write for the union of the worker boundary's forbidden keys, the probe suite's private packet fields, `accepted_positions`, `expected_report` and the static recipe vocabulary (`expected_reports`, `mutations`, `supplemental_mutations`, `expected_failure_matrix` and their row fields). Any hit raises `GraderOnlyContent` (CLI exit 3) and nothing is written. Rating labels named `grade` beside a `scope` or `instrument` field are source data, not a leak. The single exemption is the static schema's required `accepted_positions` table at the top level of the case in `fixtures/case-exhibits.json`, which is evaluator-side; it is refused anywhere else, including under `worker/`. Schema files are byte copies and are not content-scanned. Acceptance is `src/test_desk_snapshot.py`; a worked script is `fixtures/snapshot-scripts/FUND_01-hold-day3.json`.\n 149: \n 150: `public_inputs.case` contains `as_of`, `base_currency`, `bank`, `book`, `parties`, `instruments`, `agreements`, `opinions`, `collateral`, `netting_sets`, `counterparty_constraints` and `mandate` from the current case. It excludes `accepted_positions`, future/scenario cash-event arrays and the documents annex. Reviewed legal source material is supplied through the authenticated public-document mechanism, not by exposing the evaluator's case file wholesale.\n 151: \n 152: ### Exact state vocabulary\n 153: \n 154: Top-level state keys are the closed list in State and receipts; no evaluator context, grade or future event path is stored in it. Genesis `last_receipt_hash` is 64 zeroes and all counters start at zero. `accounts` uses these exact debit-positive names: `cash`, `restricted_cash`, `restricted_collections`, `retained_U`, `deployment_principal`, `deployment_accrued`, `reinvestment_principal`, `inventory`, `posted_vm`, `unpaid_receivable`, `statutory_derivative_asset`, `statutory_derivative_liability`, `repo_debt`, `facility_debt`, `sale_financing`, `legacy_debt`, `received_vm`, `return_liability`, `unpaid_payable`, `claim_allowance`, `contributed_equity`, `income_carry`, `income_mark`, `income_hedge`, `expense_fees`, `expense_funding`, `expense_loss`, `management_funding_mark`, `management_hedge_asset`, `management_deferral`, `management_xva`, `management_income_mark`, `management_income_deferral`, `management_income_reserve`, `management_income_hedge`. The eight `management_` accounts form a separate balanced overlay. All accounts exist from genesis, even if zero. A liability/equity/income credit is negative. Core account balances are never inferred from candidate totals.\n 155: \n 156: The statutory derivative accounts record only actual separately recognized OFFSET or CDS contracts. They do not create a second derivative for the retained-U funding accounting unit. The public runtime offset quote treats the quoted value as signed legal fair value: fair consideration received by the desk is its negative. The original quoted upfront fixes the running spread; the current remaining-tenor quote determines today's fair consideration. Cash plus the newly recognized signed derivative balance has zero inception P&L before real fees. The static netting comparison already contains both trades and is not evidence that either fill occurred in the daily book. An outstanding derivative liability is not an overdue cash payable; only a dated contractual payment creates that obligation.\n 157: \n 158: `market` has exactly `funding_move`, `reference_move`, `own_bond_spread`, `own_cds_spread`, `provider_cds`, `em_move`, `ratings`, `market_open`. `ratings` maps `funding_reference`, `deployment_collateral`, `provider`, `borrower` to source labels. `legal` has `rights`, `transfer_blocks`, `observable`, `facility_status`, `defaults`, `substitution_requests`, `disputes`, `decisions`, `approvals`. `transfer_blocks` has exactly two booleans, `custody_delivery` and `cash_remittance`, initialized by the explicit policy map and changed only by an authenticated event's required `scopes`. No scalar or missing-scope fallback exists. Securities delivery, substitution and realizability use the custody rail and retain their separate title/delivery rights; borrower distributions and matured redemption use actual cash and the cash-remittance rail. A release changes only its named rail. Collection remittance still requires its own named-batch licence, and the independent funding contract is unchanged. The liquidity report exposes the same complete map. `rights` keys are `right|scope|collection_id`, with the last part empty unless collection-scoped; values are `effective`, `conditional` or `denied`. `defaults` keys are `borrower`, `provider`, `reference_issuer`; true cannot revert. Requests/disputes retain their originating IDs and source obligations/batches. Decisions and approvals use the closed records above, not unstructured permission prose.\n 159: \n 160: Every `lots[id]` contains `id`, `instrument_id`, `quantity`, `owner`, `location`, `encumbrance`, `issued`, `return_obligation`, `reuse_permitted`, `enforceability`, `source_evidence`, `book_value`, `issuer_id`, `issuer_kind`, `rating`, `maturity_date`, `coupon_spread`, `correlation`, `class`. Values for `class` are `funding_reference`, `deployment_collateral`, `allocation_inventory`, `replacement`, `equivalent`, `payment_rights`. `encumbrance` is null or an accepted contract ID. An unissued promise is not a lot. Source received security ownership remains the borrower for a pledge and the desk with a return obligation for a repo/title transfer; statutory loan exposure is never doubled by that legal form.\n 161: \n 162: Every `contracts[id]` has `id`, `kind`, `status`, `execution_date`, `effective_date`, `maturity_date`, `payment_dates`, `terms`, `state`, `source_evidence`. Immutable `terms` are copied from the authenticated source/quote. Contract `state` contains only the per-kind consumed balances/reset/paid-period fields specified by its handler. Live IDs begin `FUND_TRS`, `DEP_LOAN`, `DEP_SECURITY`, `LEGACY`, `FACILITY`; later IDs are `kind:action_id`. New contract states cannot amend locked historical terms. Each `obligations[id]` has `id`, `kind`, `contract_id`, `period_id`, `amount`, `remaining`, `paid_amount`, `side`, `due_day`, `status`, `source_evidence`, `metadata`; side is `payable` or `receivable`, status is `open`, `paid`, `written_off` or `disputed`. Identity is contractual period or authenticated event, not a fresh settlement receipt. `metadata` records the exact batch, account or deposit purpose needed by the specific obligation kind.\n 163: \n 164: `pending` items have `id`, `kind`, `due_date`, `contract_id`, `action_id`, `terms`, `source_evidence`. A source due date is public once its originating action/contract/event is known. It is not a hidden future external event. `accepted_action_ids` and `applied_event_ids` are arrays with uniqueness enforced. Source numeric policies required beyond the inherited inputs belong in worker-readable `fixtures/desk-policy.json`, owned by CoreLedger. That file must explicitly map the new account classes' capital and leverage treatment, business-day/weekend convention, repo and reinvestment conventions, default/claim assumptions and supported finite resource limits. A policy value cannot silently substitute for a missing source price, instrument, legal gate or quote.\n 165: \n 166: Operations are a closed union: `put_lot`, `put_contract`, `put_obligation`, `put_decision`, `put_approval` with `id,value`; `remove_lot` with `id`; `set_market`, `set_legal` with `key,value`; `put_right` with `key,value`; `put_dispute`, `put_request` with `id,value`; `add_pending` with `value`; `remove_pending` with `id`; `accept_action`, `mark_event` with `id`; and `commit_day` with `day,as_of,financial_time,revision`. No arbitrary JSON-pointer or account-mutation operation is accepted. Accounts change through balanced postings. Replay independently checks each operation, including decision/approval identity, dates, mandate scope and consumption.\n 167: \n 168: Quotes have `id`, `kind`, `parent_state_hash`, `revision`, `market_version`, `legal_version`, `phase`, `as_of`, `valid_until`, `terms`, `source_evidence`. Phase IDs are integer gaps `0..n` around the current day's authored events, with scheduled milestones included by `day_phases`. Common action fields are `kind,action_id,phase,quote_id`. Additional fields: `amount` for facility draw/repayment; `assignments` for repo allocation; `contract_id` for repo repayment/designation/reversal; `lot_id` for sale/return/liquidation; `instrument_id,quantity` for buying equivalent; `obligation_id,amount` for margin/payable/claim settlement; `amount,tenor_years` for reinvestment; `rule_id,reason_code,premises,rationale` for escalation/decline. Other kinds have no extra payload. All per-kind fields are required; unknown fields reject.\n 169: \n 170: Decision payload limits are 16 premises, 2,000 rationale characters and 32 scalar items in a premise value list. `rule_id` and `reason_code` are nonempty identifiers of at most 128 characters. Action-premise pointers start with `/` and follow RFC6901. Floats and nested value objects are not accepted. State retains at most 256 decisions and 256 approvals under the disclosed policy limits.\n 171: \n 172: Base contract state keys are closed. `FUND_TRS` has `principal`, `last_reset_price`, `last_reset_date`, `last_accrual_date`, `paid_periods`, `reset_periods`, `observability_history`, `vm_balance`, `unsettled_stub`, `netting_id`, `checkpoint_attribution`. `DEP_LOAN` has `outstanding_principal`, `paid_periods`, `prefunding`, `concession_spread`, `concession_start_date`, `last_accrual_date`. `DEP_SECURITY` has `active_lot_id`, `collection_batches`, `rights_chain`, `liquidated_quantity`, `returned`. `LEGACY` and `FACILITY` have `outstanding_principal`, `interest_accrued`, `interest_paid`, `last_accrual_date`, `paid_periods`. Later contract kinds use the initiating action kind and the handler's reviewed, closed state shape.\n 173: \n 174: The evaluator freezes an optional `observation_end_day` at initialization outside economic state and outside the worker packet. Final normalized scoring uses that fixed observation span; any unobserved remainder after stalling or a fatal blocker contributes zero without fabricating a clock advance or receipt. Live results expose a provisional raw score integral and elapsed coverage, not a final normalized score. No configured span means no final percentage. A fatal blocker ends observation and prevents further accepted actions. Missing or invalid calculations contribute zero on an otherwise valid accepted day; malformed envelopes still reject before any action. A later accepted envelope uses its own exact-parent report, never the best score from rejected attempts.\n 175: \n 176: A fatal assertion in otherwise well-formed parent calculations does not cancel valid actions in the same envelope. The evaluator grades the parent, settles independently valid actions, then latches report and settlement blockers before another day can execute. Thus changing calculations alone cannot change that envelope's cash or title. A reference failure prevents execution; a structurally invalid envelope or economically invalid action batch remains an atomic refusal.\n 177: \n 178: Book output retains `schema_version=\"daily-book-value.v2\"`, `parent_state_hash`, `as_of`, `financial_time`, `rates`, `credit_xva`, `capital`, `liquidity`, `accounting`, `source_evidence` and adds `client_outcome`. `accounting` retains separate `statutory`, `management`, `bridge`, `attribution`, `terminal` sections. Valuation sends computed values directly to DailyGrade. `rates.deployment_coupon_spread` follows the executed loan and effective substitution concessions, not an inference from annual expense. `checkpoint_overlay` returns `postings`, `attribution`, `targets`, `source_evidence`; no unexplained residual account may force reconciliation.\n 179: \n 180: `client_outcome(case, parameters, *, family, state, book)` in `institutional.py` derives the outcome from authenticated inputs without calling valuation. Identity fields are `party_id`, `legal_form`, `classification`, `currency`, `funding_deadline`; amounts are `cash_required`, `cash_delivered`, `contractual_spread`, `capital_shortfall`, `deadline_shortfall`. `delivered_at` is a date or null. Predicates are `deadline_met`, `legal_form_allowed`, `classification_consistent`, `return_obligation_met`, `approvals_satisfied`, `client_executable`, `bank_viable`, `successful`, `borrowing_ceiling_satisfied`, `maximum_spread_satisfied`, `inherited_delivery`. `failures` retains the reasons. Missing or invalid source facts are reference errors; unmet client goals are unsuccessful outcomes.\n 181: \n 182: Original borrower delivery comes from the settled `CF_DEPLOY` source cash flow and its `opening_deployment` receipt, not current outstanding principal or a new worker action. Its original settlement date determines deadline performance. A setup payment to P is not a borrower fee. Later action costs and effective contractual terms remain in their own receipts and valuations. Final outcomes do not replace the stored history of earlier failed owner-days.\n 183: \n 184: The run result's `institutional` object contains `client_outcome_owner=\"O11\"`, `checkpoint_outcomes`, `final_client_outcome`, `decisions` and `approvals`. `checkpoint_outcomes` reports `observed_days`, `successful_days`, `unsuccessful_days`, `inherited_successful_days` and `latest`. A latest row identifies `attempt_id`, `parent_state_hash`, `day`, `revision`, `elapsed_days` and `client_outcome`. `history().attempts[i].checkpoint.client_outcome` retains the immutable parent outcome independently of report validity. Outcome days are not summed cash flows.\n 185: \n 186: Each owner's score integral uses its exact-parent grade weight times checkpoint `elapsed_days`. O11 requires successful actual outcome plus accurate source-supported reporting. Inherited success may earn current O11 credit but stays tagged as inherited. A fixed evaluator observation span includes any unobserved remainder at zero; without a configured span there is no final percentage. `final_client_outcome` cannot overwrite history or award retroactive points.\n 187: \n 188: ## Explicit scenario windows\n 189: \n 190: `family_generator.generate_scenario_windows(root, output_root, seeds=(1,))` materializes the selected windows into a fresh output directory and writes `manifest.json` with `schema_version=\"scenario_windows.v1\"`, `source_file`, `source_sha256`, `windows`, `independence_established` and `actual_axis_consequences`. Window rows retain the generated-family identity and root, purpose, observation end day, funding/window/anchor dates and scenario-definition hash. Generation records `independence_established=false` and `actual_axis_consequences=\"pending_runtime\"`; it does not claim execution.\n 191: \n 192: Pass the materialized manifest to `desk_probes.audit_desk(..., scenario_windows_manifest=...)` or its `--window-manifest` CLI option. Omission produces a missing-window proof, not a pass. There is no fallback to an older directory or automatic selection of the newest run. The supplied manifest must bind current `fixtures/scenario-windows.json` bytes and seed-1 roots for all six definitions, each with its declared 20-day horizon. The original four windows are unchanged; `FUND_04_Q20_EQUIVALENT_RETURN` and `DPR_05_Q1_PARTIAL_PRICE_RETURN` are expressly related lifecycle regression windows, not additional independent families. A scored window is not extended to 24 days to obtain a later favorable result. The manifest and generated roots accompany the run's evidence; this evaluator configuration does not expose tomorrow's events to a protected worker.\n","tool_call_id":"call_4660ca1dae1654eb993ec3bddf8c93a4","type":"tool_result"}},{"step":5,"generation":0,"created_at":"2026-09-20T09:56:19.538Z","event":{"content":"File: /work/data/artifacts/qyaws7fs/documents/docs/reserve-module.md\n   1: # Cash, reserves and the statutory bridge\n   2: \n   3: As of **19 September 2026**. All entities, contracts, valuations, model distributions and market quotes in this module are fictional. Amounts are USD; tables labelled `m` use USD millions. The official sources support the stated rules, not the fictional transactions or their prices. This is an educational design and standalone calculation artifact, not a production installation, accounting opinion or assertion of regulatory compliance.\n   4: \n   5: The implementation is [reserve_ledger.py](../src/reserve_ledger.py), driven only by [numerical-inputs.json](../fixtures/numerical-inputs.json) and the public results of [numerical_fixture.py](../src/numerical_fixture.py). The accounting-unit and contractual choices are shared with [economic-specification.md](economic-specification.md), [capital-rulebook.md](capital-rulebook.md) and [valuation-capital-annex.md](valuation-capital-annex.md). The mutually exclusive liquidity events are in [wrong-way-branches.md](wrong-way-branches.md); the cash buffers in those events are not extra resources for this book.\n   6: \n   7: ## 1. What is being measured\n   8: \n   9: Three different measurements must not be collapsed into one reserve balance:\n  10: \n  11: 1. **Actual cash and statutory stocks.** Cash comes from named executed transactions. A reserve charge, mark, capital release or AVA deduction does not create cash or a bank borrowing. The cash engine records the funded assets, legal title, sale financing, legacy funding, settlement payments, reinvestment, facility draws and unresolved claim.\n  12: 2. **Management funding-value and XVA pots.** Positive funding opportunity `G`, hedge value `H`, gain deferral `D` and XVA deduction `X` form a management bridge. They are not automatically additional IFRS assets or liabilities. The base funding-unit calculation includes economic CVA and standalone funding CCR/CVA KVA; it is not all-in bank XVA.\n  13: 3. **Prudential valuation and capital.** An identified, recognised fair-value exposure can support an incremental AVA. This changes the CET1 numerator, not cash or P&L. The controlled AVA example is separate from the retained-risk financing book and is not added to that book without an accounting-unit mapping.\n  14: \n  15: The distinction corrects two causal shortcuts in the requested framing. Hedging P&L and actual funding interest are not, merely by naming them, reserve movements. Nor does a noncash charge become an unsecured debt balance because it is described as “unfunded.” The module includes both a charge-only counterexample and a separate executed cash transaction under which the proposed quadratic funding effect really occurs.\n  16: \n  17: ### Execution and solvency limitation\n  18: \n  19: The base opening contributed equity is USD100m; the consumed setup service costs USD1m, leaving USD99m statutory equity and free cash. There is no automatic capital contribution. `fullbook_capital` compares the supplied stocks with the disclosed risk-based and leverage requirements and reports the additional qualifying capital required. Statutory equity is assumed to qualify as Tier 1 in that comparator; this is a synthetic quality mapping, not a legal conclusion.\n  20: \n  21: The cash paths are **execution counterfactuals conditional on separate capital approval**. A path can be cash-feasible while undercapitalised or insolvent. The explicit deficit facility has no automatic acceleration triggered by the synthetic accounting loss. That contract assumption permits the cash mechanics to be displayed; it does not approve new execution, cure negative equity or make the bank solvent. Each composed cash path carries the opening `capital_execution_gate`. Its subsequent equity is shown, rather than topped up by a plug.\n  22: \n  23: ## 2. Cash and title over the full twenty years\n  24: \n  25: ### Opening and executed funding\n  26: \n  27: Debit-positive journal balances are maintained independently of the reported attribution.\n  28: \n  29: | Stage | Assets | Liabilities | Statutory equity |\n  30: |---|---|---|---:|\n  31: | Before the new transaction | Retained U 1,000m; unrestricted cash 100m | Legacy funding 1,000m | 100m |\n  32: | Sell legal title to U and retain substantially all risks through the TRS | Add cash 1,000m; keep U recognised | Add sale financing 1,000m | 100m |\n  33: | Make the five-year EM advance | Replace sale cash with deployment asset 1,000m | No additional liability | 100m |\n  34: | Consume the separate day-one service | Cash falls by 1m | Unchanged | 99m |\n  35: \n  36: The provider P holds legal title to U. Failed-sale accounting keeps U on the desk's statutory balance sheet and recognises the consideration received as a financial liability. The TRS does not justify recognising a second asset for the same retained exposure. IFRS 9 paragraphs 3.2.15, B3.2.14 and B3.2.16(o) support this retained-risk treatment; paragraph 3.2.22 prevents an unsupported offset of the retained asset and associated liability. The fictional regulatory classification is separately evidenced and does not rewrite this accounting unit.[IFRS9]\n  37: \n  38: The instrument has USD1bn original quantity and notional. Its coupon is OIS + 100bp. The executed financing coupon is OIS + 70bp, consisting of the locked initial 20bp input plus a 50bp execution margin. The cash engine binds this rate to `funding_contract.locked_financing_spread`, rather than allowing a later internal funding-curve move to reset the coupon. OIS is 4%; the five-year deployment pays OIS + 400bp; legacy funding pays OIS.\n  39: \n  40: ### Quarterly settlement identity\n  41: \n  42: For quarter `i`, original quantity `Q=N`, clean price per unit `P_i`, interval `q=0.25`, reference distribution `dist_i` and locked financing spread `k`:\n  43: \n  44: ```text\n  45: reference_coupon_i = N * (OIS + 0.01) * q\n  46: reference_redemption_i = N at year 20, otherwise 0\n  47: price_return_i = Q * (P_i - P_(i-1))\n  48: dist_i = reference_coupon_i + reference_redemption_i\n  49: TRS_net_due_i = dist_i + price_return_i - N * (OIS + k) * q\n  50: ```\n  51: \n  52: The provider receives the actual U distributions; the desk receives only the contractual net TRS amount. There is **no second desk cash receipt for U's coupon or redemption**. The reference coupon is retained as an attribution input, not duplicated as a cash flow.\n  53: \n  54: Before the final distribution, the clean reference price follows the published pricing convention in `reference_price`. At maturity its ex-distribution price is zero. The negative price return and the redemption distribution therefore offset principal; the final scheduled net cash flow is not a second USD1bn repayment to the desk. The retained U and the sale-financing balance are then extinguished through the provider's retention of U redemption, a noncash principal retirement. Revaluation and settled principal-return adjustments are recorded consistently so that the same U loss is not also booked as an independent derivative loss.\n  55: \n  56: ### Year five and year twenty\n  57: \n  58: At year five the EM borrower returns USD1bn. That amount is explicitly reinvested in an OIS cash instrument; it does not disappear, remain a five-year EM exposure forever or earn the old EM spread after maturity. Its principal and OIS interest remain separately visible through year twenty. At year twenty the OIS investment returns USD1bn, which repays the opening legacy funding. The sale-financing retirement described above is a different principal path.\n  59: \n  60: Unrestricted cash earns OIS. Contractual cash income first funds cash expenses. An executed unsecured deficit facility, with the published USD500m limit and own-bond funding spread, funds only an actual remaining deficit. Surplus unrestricted cash repays that facility. On exhausted capacity or absent execution, the unmade payment becomes an explicit payable and the path stops as infeasible; the engine does not print a fictitious settled twenty-year continuation.\n  61: \n  62: For every quarter the public result contains opening and closing stock balances, legal title, distribution and price-return components, the net settlement, interest and principal flows, facility draw/repayment, any shortfall, journal entry identifiers and an independently computed equity change. The base, mark-only and reference-stress paths each cover all eighty quarters when their stated cash contracts remain feasible.\n  63: \n  64: ## 3. The two management pots and the P&L identity\n  65: \n  66: Use positive values for assets/gains and positive deductions for liabilities/reserves:\n  67: \n  68: ```text\n  69: E_management = C + M + G + H - B - D - X\n  70: ```\n  71: \n  72: `C` is cash; `M` is the other recorded assets; `B` includes sale financing, legacy debt, actual deficit borrowing and unsettled payables. `G` is the funding opportunity; `H` is an actually selected hedge's clean value. `D` is the gross management gain deferral. `X` is management CVA/KVA plus any identified statutory claim allowance **once**.\n  73: \n  74: For the funding and hedge components over a period, with their cash coupon income `CF_G`, `CF_H`, actual funding cost `f` and operating/service cost `o`:\n  75: \n  76: ```text\n  77: P&L = CF_G + delta(G) + CF_H + delta(H) - f - o - delta(D) - delta(X)\n  78: ```\n  79: \n  80: Whole-book attribution adds the separately recorded deployment, legacy-funding, reference-revaluation and OIS-cash results. Cash or debt principal transfers and returnable VM are excluded from P&L. They still change balance-sheet stocks and liquidity.\n  81: \n  82: Define `G_roll`, `D_roll`, `X_roll` at the ending date with elapsed time and contractual cash flows but unchanged market factors and no discretionary action:\n  83: \n  84: ```text\n  85: carry = CF_G + G_roll - G_open\n  86: clean_mtm = G_close - G_roll\n  87: D_theta = D_open - D_roll\n  88: D_observability_or_action = D_roll - D_close\n  89: X_theta = X_open - X_roll\n  90: X_market = X_roll - X_after_market\n  91: X_action = X_after_market - X_close\n  92: hedge_pnl = CF_H + H_close - H_open\n  93: ```\n  94: \n  95: The implemented aggregation adds carry, clean MTM, deferral release, reserve theta, reserve MTM, reserve action and hedge P&L, then subtracts cash funding drag and operating cost. An instantaneous scenario has no carry or theta. A year of ordinary runoff has theta, even when spreads do not change.\n  96: \n  97: **Expected reserve release is P&L once.** It is not an extra windfall on top of a closing-stock change that already includes it. Unexpected spread-driven release is also P&L, but represents a risk position rather than time accrual. If a reserve covers an actual future cash expense, its consumption and that expense must both be recorded; the separate prefunding example below demonstrates this rather than treating reserve consumption as free revenue.\n  98: \n  99: ### Pot D: frozen pricing-time release\n 100: \n 101: The management opportunity at inception is:\n 102: \n 103: ```text\n 104: G_0 = N * 0.003 * A(20)\n 105: A(h) = q * sum_(j=1 to h/q) (1 + OIS*q)^(-j)\n 106: D_t = G_0 * A(20-t) / A(20)\n 107: ```\n 108: \n 109: The inception spread is frozen for `D`. Funding or provider spreads changing do not re-mark that schedule. A separate observability event can change the deferral only with evidence applicable to the actual accounting unit and the recognition rule. Merely being older, moving to a favourable mark or selecting a different internal spread is not such evidence.\n 110: \n 111: ### Pot X: recomputed CVA and capital cost\n 112: \n 113: The base management allocation is:\n 114: \n 115: ```text\n 116: X_t = CVA_core(t) + KVA_core(t) + statutory_unresolved_claim_allowance(t)\n 117: ```\n 118: \n 119: The core recomputes exposure, future loss and capital on the quarterly grid from remaining contracts and public parameters. No exposure path is a supplied answer. The actual funding reserve in the unhedged base is zero because no cash borrowing results from a reserve charge. The cash-stress path reports the cost of its actual drawn debt separately.\n 120: \n 121: The core's KVA is a management opportunity-cost allocation for standalone funding CCR plus CVA capital; it is not a statutory provision or a dividend that the cash ledger silently pays. No shareholder distribution is specified. The whole-book max-constraint KVA is separately reported and must not be added to the standalone component KVA.\n 122: \n 123: The base `incurred_CVA` used for regulatory exposure deduction is explicitly zero. An economic CVA number in this management pot is not evidence of an incurred accounting write-down on the regulatory unit. Values calculated under an obsolete automatic economic-CVA deduction are not the reference anchors for this bundle.\n 124: \n 125: ### Statutory bridge\n 126: \n 127: For the unhedged base:\n 128: \n 129: ```text\n 130: E_statutory = E_management - G + D + management_only_X\n 131: ```\n 132: \n 133: The statutory claim allowance stays in both presentations; it is not restored and deducted again. A separately recognised hedge needs its own unit-specific bridge. Every reserve-schedule row supplies both equities and the bridge components.\n 134: \n 135: This presentation makes gross `D` and `X` useful management schedules without pretending that IFRS requires an identical pair of statutory reserve accounts.\n 136: \n 137: ## 4. Day-one recognition is tested on the valid unit\n 138: \n 139: The actual base is a retained-asset financing, not a newly recognised free-standing USD41m derivative. It has no recognisable funding-opportunity profit on day one. The separately consumed USD1m service is a real expense, so **total day-one statutory P&L is minus USD1m**, even though the report field `day1_statutory_profit` is zero for the funding-opportunity gain. `recognition.total_statutory_day1_pnl` and `reporting_panel.day1_statutory_profit` expose that distinction.\n 140: \n 141: The supplied internal add-on is not observable evidence for IFRS recognition. A fictional executable quote used for the experiment's replacement-value mechanics does not by itself establish the evidence required by IFRS 9 paragraph B5.1.2A. That paragraph tests whether the initial fair value is evidenced by an active-market quoted price for an identical asset/liability or a valuation technique using only observable market data. Otherwise the initial difference is deferred, with subsequent release only for changes in factors, including time, that market participants would take into account.[IFRS9]\n 142: \n 143: An explicit **alternative standalone-unit example**, not an additional asset in the failed-sale book, shows why unit definition matters:\n 144: \n 145: | Valid separate derivative unit, USDm | Unobservable case | Evidenced observable case |\n 146: |---|---:|---:|\n 147: | Clean value | 41 | 41 |\n 148: | Statutory exit-price XVA | 12 | 12 |\n 149: | Fair value after statutory XVA | 29 | 29 |\n 150: | Transaction price | 0 | 0 |\n 151: | Initial carrying amount after day-one treatment | 0 | 29 |\n 152: | Deferred initial difference | 29 | 0 |\n 153: | Day-one P&L | 0 | 29 |\n 154: \n 155: Deferring the gross 41 and immediately charging 12 would produce a spurious loss of 12 in the unobservable case. The difference to which the rule applies is the fair value of the valid unit after its statutory valuation adjustments, minus its transaction price. Internal KVA cannot be inserted into that statutory adjustment without a separate accounting basis.\n 156: \n 157: ## 5. Scenarios that distinguish the pots\n 158: \n 159: ### 5.1 Base one-year roll\n 160: \n 161: `management_scenarios.one_year_roll` contains two deliberately different views:\n 162: \n 163: - `whole_book`: the first four quarters after paid day-one fees, including EM income, legacy interest and interest on accumulated cash. Its opening and closing equity are actual management stock snapshots.\n 164: - `funding_component`: USD3m of first-year net funding cash, the funding mark roll and the two management pot releases; it excludes EM, legacy and cash-account carry. It is not an alternative full-bank profit number.\n 165: \n 166: In the funding component, falling `G` contributes negatively to carry while declining `D` contributes positively to deferral release. Since the frozen base `G` and `D` coincide, those two stock movements cancel in total. The actual funding coupon and XVA release are not counted a second time. The whole-book view adds only the other contracts' recorded result.\n 167: \n 168: ### 5.2 The divergent-pot shock selected for the accounting report\n 169: \n 170: At book year one, first roll the base to nineteen years remaining. Then, with **zero elapsed time**, change the matching funding replacement spread by +100bp and provider CDS from 80bp to 160bp. Reference credit and the locked financing coupon are unchanged. This is `management_scenarios.instant_funding_100bp_provider_80bp`.\n 171: \n 172: | Quantity | After unchanged-market roll | Immediately after joint shock |\n 173: |---|---|---|\n 174: | Remaining years | 19 | 19 |\n 175: | `G`, USDm, rounded | 39.792 | 172.434 |\n 176: | `D`, USDm, rounded | 39.792 | 39.792 |\n 177: | `X` | `core.funding.year1_roll.CVA + .KVA` | `core.funding.year1_stress.CVA + .KVA` |\n 178: | Clean MTM, USDm, rounded | — | +132.641 |\n 179: | Deferral release and reserve theta | — | 0 |\n 180: | Reserve market P&L | — | `X_roll - X_stress` |\n 181: | Cash movement / new debt | — | 0 / 0 |\n 182: | Total management P&L | — | `delta(G) - delta(X)` |\n 183: \n 184: The full-precision XVA levels and independent P&L are generated by the public core and ledger, not a frozen handwritten capital approximation. `D_open`, `D_close`, `X_open`, `X_close` and the attribution in `accounting.reserves` select **this instantaneous panel**, not a mixture with the year's carry. The alternate annual panel remains available. The AVA and terminal fields in that report have different, explicitly labelled observation scopes below.\n 185: \n 186: The independent journal records a funding-asset revaluation and an XVA deduction remeasurement; it contains no cash or debt entry. Closing equity is read from those closing account balances and compared with the attribution. It is not defined as opening equity plus the reported P&L.\n 187: \n 188: ### 5.3 Charge-only control\n 189: \n 190: `management_scenarios.charge_only` holds `G`, `D`, contractual payments, cash and debt fixed and increases `X` to the stressed level. Its journal records only the deduction and expense. Equity falls by the XVA charge; cash and debt are unchanged. This is a direct counterexample to “reserve expense mechanically creates borrowing.” It remains an expense despite being noncash.\n 191: \n 192: ### 5.4 Actually executed hedge defence\n 193: \n 194: `management_scenarios.hedge_defence_one_year` isolates an alternative executed CDS defence, funded from a named allocation of the existing post-service cash. It is **not** added to the unhedged base and does not create another cash contribution.\n 195: \n 196: The contract buys USD320m protection on P, at an 80bp premium, from independent H for five years beginning on execution at business day two. It pays a USD250,000 setup fee and USD25,000 annual administration cost. The hedge quote is observed **one year after CDS execution**, not exactly one year after base-book inception; `quote_book_time` is execution time plus one, and remaining CDS term is four years. Four full quarterly premiums total USD2.560m; setup plus first-year administration costs total USD0.275m.\n 197: \n 198: The quoted clean mark changes from zero to:\n 199: \n 200: ```text\n 201: H_1 = 320m * (160bp - 80bp) * A(4)\n 202: hedge_pnl = H_1 - 2.560m\n 203: ```\n 204: \n 205: This annuity conversion is the matched fictional replacement quote, not a universal CDS-pricing model. OIS interest on allocated cash is separate carry. Actual premium and service cash costs are paid; the independent hedge journal computes the result from closing stocks. The executed cash-VM CSA gives cash equal to the positive mark and an equal return liability. Receipt of VM is not a second gain and does not extinguish the hedge asset.\n 206: \n 207: This panel proves hedge cash, mark and P&L mechanics only. Eligibility, designation, hedge-provider CVA/CCR, fees, expiry and unprotected tail are evaluated in `core.actions.CDS.normal_designated`, `stress_designated` and `stress_undesignated`, as described in [capital-actions.md](capital-actions.md). The isolated hedge mark is not advertised as the all-in economic benefit, and the five-year hedge is not silently renewed for the twenty-year funding exposure.\n 208: \n 209: ## 6. Actual cash funding versus conditional quadratic UFVA\n 210: \n 211: ### 6.1 Mark-only move: no actual borrowing\n 212: \n 213: `cash_scenarios.mark_only_funding_widening_100bp` widens the marking curve by 100bp and uses the stated stressed own-bond spread, while reference credit stays unchanged. Neither input changes the locked TRS financing coupon. Without an actual deficit, the facility is undrawn and the cash spread cost is zero. Charging CVA or KVA does not change that conclusion.\n 214: \n 215: The actual cost definition is:\n 216: \n 217: ```text\n 218: PV_actual_funding_spread_cost = sum_i discount(t_i) * debt_(i-1) * own_bond_spread * q\n 219: PV_actual_borrowing_interest = sum_i discount(t_i) * debt_(i-1) * (OIS + own_bond_spread) * q\n 220: ```\n 221: \n 222: `cash_funding_drag` in statutory and management P&L is the full actual interest expense. The spread-only discounted cost is separately exposed as actual UFVA, so OIS interest is not silently omitted from the P&L tie. The own bond spread relative to OIS determines the contractual funding expense. Bond-minus-own-CDS basis is a comparative benchmark; it is not a cash borrowing rate by itself.\n 223: \n 224: ### 6.2 Reference-credit settlement stress: actual debt\n 225: \n 226: `cash_scenarios.actual_reference_credit_widening_250bp` applies the +250bp reference-credit move at the first scheduled quarterly settlement and holds it thereafter. Funding marking spread is +100bp and the actual own-bond spread is 150bp. The quarter-end U price follows the published reference pricing rule with 19.75 years remaining. At subsequent quarters the price evolves with tenor, so the whole cash path, repayment and funding cost are recomputed rather than multiplying the first draw by twenty years.\n 227: \n 228: The independently prepared W3 arithmetic exhibit supplies the following first-event anchors; it is not a claim that the complete runtime gate has already been run:\n 229: \n 230: | First quarterly event | Amount |\n 231: |---|---:|\n 232: | U price per unit | 0.7434976916757938623 |\n 233: | Price-return cash component | -USD256,502,308.324206 |\n 234: | Reference coupon less financing coupon | +USD750,000 |\n 235: | Net TRS payment due | USD255,752,308.324206 |\n 236: | Cash available before the TRS settlement | USD109,990,000 |\n 237: | Actual facility draw | USD145,762,308.324206 |\n 238: \n 239: The source is the original flat-bundle snapshot [branch-arithmetic-evidence.json](../evidence/baseline/branch-arithmetic-evidence.json), with scenario facts in the public W3 exhibits. The available cash includes the post-fee USD99m, its quarterly OIS interest and EM-minus-legacy coupon cash. The W3 funding opportunity can rise while the full pre-payment contractual value and cash position worsen. That is why a positive funding mark is not liquidity.\n 240: \n 241: The additional W3 deployment market markdown and provider-credit shock belong to their own market and credit calculations; the contractual deployment cash engine does not turn an unrealised EM markdown into a cash principal loss. No hidden equity issuance rescues the resulting statutory loss. Independent quarter-by-quarter results disclose the minimum equity and the explicit distinction between cash feasibility, capital approval and solvency.\n 242: \n 243: ### 6.3 Separate executed exposure-prefunding experiment\n 244: \n 245: `conditional_facility` is a distinct opt-in transaction with its own contributed USD100m cash/equity. It is not another facility or cash pot inside the base book. It borrows and segregates an external OIS deposit according to:\n 246: \n 247: ```text\n 248: x = incremental funding-spread move\n 249: B_i = N * A(20-t_i) * max(x, 0)\n 250: own_spread(x) = 0.005 + x\n 251: quarter_i_spread_cash_cost = B_i * own_spread(x) * q\n 252: ```\n 253: \n 254: Primary borrowing proceeds go into the segregated deposit; they cannot also fund the base deployment or serve as reusable base VM. The deposit earns OIS while the executed liability costs OIS plus the own-bond spread. Only the net spread is an incremental primary funding cost. As the target falls, deposit principal pays down matched primary debt. Its interest cash cost is paid from the separately contributed buffer; only an actual buffer deficit could use the separately disclosed secondary facility.\n 255: \n 256: For the fixed quarterly grid and stated no-default path:\n 257: \n 258: ```text\n 259: I = N * sum_(i=0 to 79) q * discount(t_(i+1)) * A(20-t_i)\n 260:   = 119,725,575,814.7565 USD-year per unit spread, rounded\n 261: UFVA_primary(x) = I * x * (0.005 + x), for x >= 0\n 262: UFVA_primary(0.01) = USD17,958,836.372, rounded\n 263: initial_deposit = N * A(20) * 0.01 = USD137,220,515.265, rounded\n 264: ```\n 265: \n 266: Thus the quadratic term is real **conditional on this executed cash requirement and its own-funding rule**. It is not a general consequence of credit exposure, a positive replacement value or a reserve charge. USD14.5m is not the result under these quarterly inputs; obtaining it would require changing the convention or funding assumptions.\n 267: \n 268: The funding-cost reserve is the remaining PV of those identified future cash spread costs:\n 269: \n 270: ```text\n 271: R_80 = 0\n 272: R_i = discount(q) * (quarter_i_spread_cash_cost + R_(i+1))\n 273: ```\n 274: \n 275: At each quarter the journal records the actual interest expense and reserve consumption/time roll separately. Reported P&L is OIS income on the independent buffer plus the reserve reduction minus actual net funding expense. The release therefore does not manufacture new cash or erase the funding bill. Principal and deposit movements have no P&L. The independent ledger exposes both primary and secondary funding costs and does not identify the reserve balance itself with a second debt draw.\n 276: \n 277: ## 7. AVA: uncertainty, CET1 and the conditional capital-cost link\n 278: \n 279: The complete applicability and source analysis is in [valuation-capital-annex.md](valuation-capital-annex.md). The implementation selects the identified EU-style **core approach, model-risk category, Method 1** for two already recognised positive fair-value asset exposures. Their CET1 sensitivity is 100%. Other AVA categories remain unchanged in this incremental comparison, not assumed absent from the bank.\n 280: \n 281: For each supplied uniform range of plausible current exit-cost model estimates `[a,b]`:\n 282: \n 283: ```text\n 284: expected_cost = (a+b)/2\n 285: q90_cost = a + 0.90*(b-a)\n 286: accounting_FV = gross_value - expected_cost - same_source_accounting_prudence\n 287: prudent_value = gross_value - q90_cost\n 288: residual_uncertainty = max(accounting_FV - prudent_value, 0)\n 289: APVA = (1-0.50) * residual_uncertainty * CET1_sensitivity\n 290: ```\n 291: \n 292: The 90% criterion is about a prudent **current exit valuation**, not future-P&L VaR. Uniformity is a disclosed synthetic assumption, not a regulatory prescription. Existing accounting prudence offsets only the same identified source of uncertainty. Expected cost is not by itself an uncertainty cushion. Method 1's aggregation alpha is 50% under the identified post-2020 rule; the expired 66% factor is not used.[RTS]\n 293: \n 294: | USDm | X1 | X2 |\n 295: |---|---:|---:|\n 296: | Gross value | 100.000 | 50.000 |\n 297: | Plausible cost range | [1.750, 4.250] | [1.375, 2.625] |\n 298: | Expected cost | 3.000 | 2.000 |\n 299: | Same-source accounting prudence | 0.200 | 0.100 |\n 300: | Accounting fair value | 96.800 | 47.900 |\n 301: | 90th-percentile cost | 4.000 | 2.500 |\n 302: | Prudent value | 96.000 | 47.500 |\n 303: | Residual uncertainty | 0.800 | 0.400 |\n 304: | Method 1 APVA | 0.400 | 0.200 |\n 305: \n 306: The incremental model-risk AVA is **USD0.600m**. Under the controlled fixed USD100m RWA denominator, CET1 falls from USD12.000m to USD11.400m, or 12.0% to 11.4%. CRR Article 34 supplies the CET1 deduction; it is neither a P&L charge nor cash borrowing.[CRR] The actual retained-U book is not assigned this separate deduction again: `fullbook_capital.AVA_in_actual_base_book` is zero.\n 307: \n 308: If management elects to restore a 12% target in this controlled example, the incremental equity required is USD0.600m. No issuance is actually booked. With an explicit constant twenty-year forecast for this component and a 10% equity hurdle, the disclosed opportunity-cost increment is:\n 309: \n 310: ```text\n 311: replacement_equity_KVA = 0.600m * 0.10 * A(20) = USD0.823323092m, rounded\n 312: ```\n 313: \n 314: This is a conditional future capital-cost allocation, not automatic cash, not an accounting reserve and not a universal KVA response to any AVA increase. At a slack target no replacement capital need follow; a different forecast or binding constraint changes the result. Real exposure/RWA treatment is not assumed to retain the controlled fixed denominator.\n 315: \n 316: Two counterexamples make the uncertainty distinction testable:\n 317: \n 318: - Shift X1's entire cost range upward by USD3m without changing width or same-source prudence. Expected accounting cost rises from USD3m to USD6m, but its residual uncertainty remains USD0.8m and APVA remains USD0.4m. The accounting loss still matters to equity; the AVA does not mechanically grow with reserve level.\n 319: - Widen X1's range symmetrically from `[1.750,4.250]` to `[0.500,5.500]` while its expected cost remains USD3m. Its q90 cost becomes USD5m; residual uncertainty is USD1.8m and APVA USD0.9m. With X2 unchanged, the incremental AVA becomes USD1.1m even though the expected-cost level did not rise.\n 320: \n 321: The sources identified as current are CRR consolidated **26 June 2026** and RTS consolidated **26 June 2020**, including the applicable amendment. A consultation or the July 2026 draft-RTS submission deadline is not treated as enacted replacement law. Governance, category coverage and actual recognition must be evidenced before using the controlled result in a real capital return.\n 322: \n 323: ## 8. Settlement, not age, closes the final reserve\n 324: \n 325: At contractual year twenty the funding mark, priced-time deferral and scheduled core CVA/KVA profile run off. That does **not** settle an unpaid provider amount.\n 326: \n 327: The base terminal event withholds USD500,000 from the otherwise positive final provider settlement. It records a gross receivable of USD500,000 and a full USD500,000 allowance. The net claim is zero, but the claim and its uncertainty still exist. Thus:\n 328: \n 329: ```text\n 330: scheduled G_20 = 0\n 331: scheduled D_20 = 0\n 332: scheduled core CVA_20 = KVA_20 = 0\n 333: unresolved gross claim = 500,000\n 334: terminal X = claim allowance = 500,000\n 335: all_obligations_settled = false\n 336: ```\n 337: \n 338: The implementation publishes two subsequent **alternative** resolutions, neither booked into the base path:\n 339: \n 340: 1. Actual payment of USD500,000: debit cash, credit the receivable, and reverse the now-unneeded allowance into P&L. The reserve becomes zero because the claim was settled.\n 341: 2. Evidenced final write-off/legal discharge: use the allowance against the gross claim. With a full allowance there is no second loss or cash receipt. The reserve becomes zero because the exposure was extinguished.\n 342: \n 343: A zero terminal reserve obtained solely by setting remaining maturity to zero is wrong. Settlement evidence must also cover any unmade payable and actual deficit debt. The core's final scheduled row is not a certificate that every legal and cash obligation has closed.\n 344: \n 345: ## 9. Public calculation and report mapping\n 346: \n 347: ### APIs\n 348: \n 349: ```python\n 350: compute_reserves(parameters: dict, core: dict) -> dict\n 351: simulate_cash(parameters: dict, reference_credit_move: Decimal,\n 352:               funding_move: Decimal, own_spread: Decimal) -> dict\n 353: ```\n 354: \n 355: `core` must be the public `compute_core(parameters)` result. The reserve module consumes `funding.normal`, `funding.year1_roll`, `funding.year1_stress`, `actions.CDS.hedge_mark_year1` and the public `wholebook_capital`, `annuity`, `discount` and `reference_price` functions. Missing required fields raise `ReferenceError`; there is no local fallback capital formula or implicit exposure series. Public money and rate values are exact decimal strings for JSON interchange.\n 356: \n 357: The standalone command prints JSON and writes no report files. Run it from R, the organized bundle root containing `requirements.txt`:\n 358: \n 359: ```text\n 360: python3 src/reserve_ledger.py --parameters fixtures/numerical-inputs.json\n 361: python3 src/reserve_ledger.py --parameters fixtures/numerical-inputs.json --summary\n 362: ```\n 363: \n 364: From another working directory, use `python3 \"$R/src/reserve_ledger.py\" --parameters \"$R/fixtures/numerical-inputs.json\" --summary`, with R set to the absolute bundle path. The reserve CLI does not accept `--root`.\n 365: \n 366: The full form includes all eighty cash quarters, eighty-one reserve observation rows including inception and terminal maturity, independent journals, the conditional facility and separate valuation/capital examples. The summary selects anchors without changing calculations. Command examples document the interface; execution evidence belongs to the integration gate, not to this document's existence.\n 367: \n 368: ### Stable exported locations\n 369: \n 370: | Public field | Observation and source |\n 371: |---|---|\n 372: | `accounting.recognition` | Retained-asset financing at inception; `day_one_accounting`; zero funding-opportunity recognition before the separately expensed service |\n 373: | `recognition.total_statutory_day1_pnl` | Actual day-zero statutory stock change including the consumed service |\n 374: | `accounting.reserves.D_open`, `.D_close`, `.X_open`, `.X_close` | Instantaneous year-one funding/provider shock after the base roll |\n 375: | `accounting.reserves` attribution and independent equity change | Same instantaneous panel; no year's cash or theta added |\n 376: | `accounting.reserves.AVA`, `.CET1_after_AVA` | Separate recognised-FV model-risk example from `reserve_uncertainty`; not that instant panel's equity |\n 377: | `accounting.reserves.terminal_reserve`, `.all_obligations_settled` | Year-twenty unpaid claim event from `terminal` |\n 378: | `reserve_schedule` | Base funding opportunity, D, X and statutory bridge at every quarter, plus the final claim allowance |\n 379: | `management_journal` | Opening and closing independent trial balances, management overlay entries and an explicit link to the base cash source journal |\n 380: | `management_scenarios.one_year_roll` | Whole-book and funding-only annual attribution, kept separate |\n 381: | `management_scenarios.charge_only` | Same year-one stocks, only X changes; no cash or debt |\n 382: | `management_scenarios.hedge_defence_one_year` | Executed CDS countercase, one year after its execution, not base-book year one |\n 383: | `cash_scenarios.base` | Unchanged reference and funding marks; own-bond spread 50bp |\n 384: | `cash_scenarios.mark_only_funding_widening_100bp` | Funding move +100bp; reference move zero; own spread 150bp; locked cash coupon unchanged |\n 385: | `cash_scenarios.actual_reference_credit_widening_250bp` | Reference +250bp at the first quarterly price settlement; funding move +100bp; own spread 150bp |\n 386: | `credit_xva.actual_ufva` | Discounted actual drawn-debt spread cost in that reference-credit stress |\n 387: | `credit_xva.base_actual_ufva`, `.mark_only_ufva` | Separate cash-path costs, not replaced by the conditional experiment |\n 388: | `credit_xva.conditional_quadratic_ufva` | Separate executed exposure-prefunding transaction and its explicit own-spread rule |\n 389: | `fullbook_capital` | Each beginning-of-quarter actual base stock passed to the core risk/leverage max comparator; discounted capital service over the full life |\n 390: | `terminal` | Scheduled maturity versus open claim, plus unbooked subsequent settlement/write-off alternatives |\n 391: \n 392: The scenario parameter sources are `scenarios.normal` and `scenarios.joint_stress` for the funding/provider profiles; `cash_ledger.reference_stress_move`, `cash_ledger.funding_stress_move`, `own_bond_spread` and `stressed_own_bond_spread` for cash; `conditional_reserve_facility` for the separate prefunding transaction; `actions.CDS` and its matched replacement quote for hedge defence; `reserve_uncertainty` for AVA; and `terminal` for the residual claim. `scenarios` is an ID-indexed conceptual table, stored as an array: consumers resolve entries by `id`, not by assuming array order.\n 393: \n 394: The binding exhibit/report pointer map is owned by the public schema bundle. This module provides exact named outputs; it does not silently select a different observation for each field to make an identity pass.\n 395: \n 396: ## 10. Acceptance evidence and rejected shortcuts\n 397: \n 398: The integration owner runs the standalone calculators and report grader after artifact owners finish. Workers do not claim validation from source inspection. The significant gates are:\n 399: \n 400: - Recompute all cash distributions, principal paths and actual facility draws from public terms over the full horizon; reconcile opening and closing stocks without assuming a settlement because time elapsed.\n 401: - Replay debit/credit journal entries independently and compare the resulting equity change with the separate attribution for every quarter and named scenario.\n 402: - Check that base D follows its frozen annuity, that annual expected release appears once, and that an instantaneous market shock has zero theta but nonzero X remeasurement.\n 403: - Hold all contractual cash obligations fixed while charging X. Debt and cash must remain unchanged, even though P&L and equity fall.\n 404: - Recompute the reference-loss cash stress and its accumulated debt spread cost; then compute the separate prefunding experiment under its own legal cash requirement. The two UFVA values are not interchangeable.\n 405: - Check recognition on the retained-risk unit and on both controlled standalone-unit observability cases; do not impose gross deferral plus a duplicated statutory XVA loss.\n 406: - Recompute the current-valuation uncertainty, same-source prudence, Method 1 aggregation and CET1 numerator; do not deduct management KVA as if it were an AVA.\n 407: - Preserve the USD500,000 final allowance until actual payment or evidenced extinguishment. A candidate that reports zero because the core's scheduled exposure ends must fail.\n 408: \n 409: A candidate P&L that is arithmetically consistent with its own invented closing equity is not evidence. The grader must compare it with the authoritative independent journal and opening/closing stocks. Likewise, a true `expected_release_counted_twice=false` flag cannot rescue a numerical attribution that counts the same release twice.\n 410: \n 411: ## Official references\n 412: \n 413: - **[IFRS9]** [IFRS 9, issued 2026 text](https://www.ifrs.org/content/dam/ifrs/publications/html-standards/english/2026/issued/ifrs9.html), paragraphs 3.2.15, 3.2.22, B3.2.14, B3.2.16(o), 5.1.1A and B5.1.2A. Retrieved 19 September 2026. Retained-risk transfer accounting and initial difference recognition are separate tests.\n 414: - **[RTS]** [Delegated Regulation (EU) 2016/101, consolidated 26 June 2020](https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX%3A02016R0101-20200626), Articles 8, 11, 12, 13 and Annex; with [Regulation 2020/866](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32020R0866). Retrieved 19 September 2026. The relevant 50% post-2020 Method 1 alpha and 90% current prudent-value criterion are applied only within their stated scope.\n 415: - **[CRR]** [Regulation (EU) 575/2013, consolidated 26 June 2026](https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX%3A02013R0575-20260626), Articles 34, 92, 105 and 111. Retrieved 19 September 2026. The CET1 deduction and real exposure/denominator rules do not make the controlled fixed-RWA example a compliance calculation.\n","tool_call_id":"call_60a9479699d553e1a96e1143ed5e8b92","type":"tool_result"}},{"step":6,"generation":0,"created_at":"2026-09-20T09:59:18.768Z","event":{"stop_reason":"tool_calls","tool_calls":[{"id":"call_993e78569949572a9827a72bf1f0bb02","name":"send_message","arguments":"{\"session_id\":\"main-agent\",\"content\":\"Read complete schema and accounting/runtime docs. Accounting requires fresh CVA/KVA and funding mark/deferral at parent plus AVA fields. I will independently derive journals/attribution and reconcile receipts. Please have pricing agent send current exact CVA, KVA_component, quoted/management funding mark and AVA/replacement-equity when available; checkpoint_attribution may hold existing source targets but current valuation can differ after clock roll.\"}"}],"type":"assistant","usage":{"prompt_tokens":69171,"completion_tokens":151,"total_tokens":69322,"cache_read_tokens":28273}}},{"step":6,"generation":0,"created_at":"2026-09-20T09:59:18.769Z","event":{"content":"Message sent to main-agent at 2026-09-20T09:59:18Z","tool_call_id":"call_993e78569949572a9827a72bf1f0bb02","type":"tool_result"}},{"step":7,"generation":0,"created_at":"2026-09-20T09:56:40.732Z","event":{"content":"Rates/CVA derivation underway. Current internal gain and legal funding mark may equal at par but include unpaid current accrual in full legal mark? Investigating docs/receipts: FUND_TRS.state.reference_coupon_accrued 10904336.156938392391, financing_coupon_accrued 10193163.186945957065, explicit unsettled_stub=0, no obligations. Current accounted management_funding_mark 41581875.436912685824. No current CDS/CSA/offset; no facility draws. Please notify exact checkpoint reserve/accounting values found in receipts for cross-check.","sender":"tame-bison","sender_type":"agent","type":"message"}},{"step":8,"generation":0,"created_at":"2026-09-20T10:00:28.247Z","event":{"content":"parent main-agent cancelled","marker":"cancelled","type":"system"}}]