Sandbox
Table of Contents
- 1. Summary
- 2. Detail
- 3. Sources
- 4. See also
1. Summary
Users need two things that must not disturb the firm's official data:
- Importing trades and market data to look at them — a set of ORE samples, a counterparty's portfolio, a file from another system.
- Experimenting — changing trades and market data, running reports against the changes, and comparing the results with the official ones.
A sandbox meets both without a second copy of the firm's data. Trades are isolated by where they are booked and by what they are; market data and configuration are isolated by what a report selects. Nothing is hidden inside a container, and no official row is ever edited.
- A sandbox is an entity with an owner, a purpose and an anchor: the node of the official portfolio tree it belongs to, such as a business or a desk. A user opens one only where they hold the right to, and the anchor decides who else may see it, so desks keep their Chinese walls.
- Each sandbox has its own small portfolio tree of virtual books: books the trading system creates itself, which are never mapped to the ledger and hold no position of the firm. That tree never hangs under the official one.
- A trade in a virtual book is a draft, a test or a hypothetical. It is never live, so it is never a concluded agreement, never in a capital calculation, never reported and never in the ledger.
- A sandbox trade becomes real only through the ordinary lifecycle: a draft is executed into a real book, and a test or hypothetical is dealt as a new trade, linked to it.
- Imported and perturbed market data sit in the market data universe under their own source; the official configuration never resolves to them.
- A report runs against explicit inputs — the trades in scope, the market data configuration and snapshot, and the analytics configuration — so an experiment is a report whose inputs point into the sandbox.
2. Detail
2.1. Sandboxes
A firm with hundreds of users cannot share one sandbox. Desks would see each other's experiments and imports, and the permission model must be able to enforce Chinese walls between desks (see Book access and permissions). A sandbox is therefore an entity of its own, opened where the work belongs.
| Attribute | Meaning |
|---|---|
| Name and purpose | What the sandbox is for: an experiment, a sample set, or an import |
| Anchor | The node of the official portfolio tree it belongs to: a business, a desk, a sub-desk |
| Owner | The user who opened it, answerable for it |
| Visibility | Private to the owner; shared with everyone who may read the anchor; or shared with named members |
| Status | Open, or archived and read-only |
| Review date | When the owner must confirm the sandbox is still needed |
The name follows market usage: a sandbox is a space where actions have no effect outside it. The analysis notes use the same word for the holding area where broker-originated trades wait for a human check.
2.1.1. The anchor is a reference, not containment
The anchor decides who may open the sandbox and who may see it. It does not place the sandbox inside the official tree. Each sandbox has its own portfolio tree, rooted at the sandbox, holding its virtual books; no official portfolio contains it, so no official aggregation, report or rollup can include it, even by a forgotten filter.
The analysis notes describe personal portfolios the same way: used by traders to experiment, and not linked to the main global tree, whose changes are restricted to heads of desk.
2.1.2. Opening a sandbox
Opening a sandbox at a node needs a right held at that node: the right to open sandboxes there. A head of desk grants it on the desk, so users open sandboxes only where the desk allows; a quantitative team may hold it at the top of the tree to keep firm-wide sample sets. The right is reviewed and lapses like any other access to a book.
2.1.3. What a sandbox may hold
A user may copy into a sandbox only the trades they may already read. A what-if on a desk's trade therefore needs read access to that desk, and a sandbox shared at the anchor never shows its members anything the anchor's permissions would hide. Imported data belongs to the sandbox that imported it and to nothing else.
2.1.4. Keeping sandboxes in check
The review date and the archive keep sandboxes from accumulating: the owner confirms a sandbox is still needed, or archives it, and an archived sandbox is read-only. Nothing in a sandbox is deleted; trades in it are cancelled, because drafts are records (see the regulatory boundary below).
2.2. Virtual books
Every book the firm trades in maps to a book in the ledger and is created by Finance; the trading system holds a view of them and cannot create one. A virtual book is the one exception, and the rules that make it safe are what define it:
- It is created by the trading system, inside a sandbox, by the user or process that needs it.
- It is never mapped to the ledger. Its ledger feed is none, and no ledger book corresponds to it.
- It belongs to exactly one sandbox. A virtual book sits only in its sandbox's portfolio tree, and a real book never does.
- It holds no position of the firm. The next section states what its trades may be.
- Nothing official reads it. Official P&L, risk, capital, the ledger, settlement, confirmation and regulatory reporting exclude virtual books by construction, because the trades in them cannot reach the states those processes act on.
A virtual book has a classification like any other book, because valuation needs one — a what-if is meaningless if it does not know whether the trade would sit in the trading or the banking book. The classification describes the book the experiment imitates; it does not make the book part of either regulatory book.
2.3. What a trade in a virtual book may be
| Booking nature | State | What it is | Example |
|---|---|---|---|
hypothetical |
its own machine | A question; never an agreement | A what-if copy of a live trade, a trial hedge, an ORE sample trade |
test |
its own machine | An exercise of the system; never an agreement | A rehearsal of a migration, a test of a new product form |
actual |
draft, before any agreement |
Recorded before any agreement exists | A request taken down over the phone, a quote being explored |
The trade classification decides which machine a trade runs through, and the hypothetical and test machines hold no transition that confirms, settles or reaches the ledger. A draft is not an agreement either (see Trade lifecycle).
The lifecycle also files a pre-live trade — an agreement struck but
missing details — under draft. That trade is an agreement, so it
belongs in a real book, not in the sandbox; only a draft recorded
before any agreement may sit in a virtual book.
A trade in a virtual book can never be live. That is the single rule the schema enforces, and the regulatory rules below follow from it.
2.4. How a sandbox trade becomes real
Every route out of the sandbox goes through the ordinary lifecycle, so a trade that becomes real is checked, authorised and confirmed exactly like any other.
| From | How it becomes real | What happens |
|---|---|---|
| A draft | Execute, draft to live |
The agreement is struck. The same transition books the trade into a real book, so it is never live in a virtual one. It enters the operational authorisation queue as a new trade. |
| A hypothetical or a test | A new trade | A hypothetical never becomes anything else. Dealing it books a new actual trade in a real book, linked back to the hypothetical, which keeps the question that justified the deal. |
Leaving a virtual book is therefore not a book move: a sandbox trade has no position to move and no ledger history to carry. A live trade cannot enter a virtual book at all; to experiment on it, a user makes a hypothetical copy.
2.5. Experimenting on official trades
A what-if on a live trade never edits it. The user makes a hypothetical copy in one of their sandboxes, linked to the original, and changes the copy. The copy needs read access to the original, so a user experiments only on trades they may already see. The link lets a report set the copy beside the original, and lets a reader see what the experiment was about. A structure or a hedge can be tried the same way, from copies.
2.6. Market data and configuration
Market data needs no sandbox of its own, because the resolution pipeline already separates what exists from what a valuation uses:
- Imported market data enters the market data universe under its own source. The official configuration does not resolve to that source, so official valuations never see it.
- Changed market data is a new item with its own identity, which declares its source and the change applied. The analysis notes state the rule: market data is immutable, and anything derived by perturbation is a new element, never an edit.
- Run-time scenarios — the shifts ORE applies in a stress or sensitivity run — change nothing that is stored.
- A snapshot fixes the values a run used, so an experiment can be repeated (see Market data snapshot).
Analytics configuration — conventions, curve and pricing engine configurations — works the same way: an ORE sample brings its own configuration under its own name, and nothing official refers to it.
Making imported market data official is a decision, not a copy: the data's source is admitted to the official configuration, and that admission is recorded as an activity with who and why.
2.7. Reports
A report definition states its inputs explicitly: the trades in scope, the market data configuration and snapshot, and the analytics configuration. An experiment is a report whose scope is a sandbox, or whose market data or configuration points at sandbox data. A comparison is two runs that differ in one input. A report whose scope reaches into a sandbox is marked unofficial, and an official report cannot include any sandbox.
2.8. Imports
An import is a run of a process with an identity: who ran it, when, from what source, and what it created (see Trade sets and trade groups).
- An import to inspect, reconcile or rehearse runs into a sandbox whose purpose is import, anchored where the importing team works. It creates hypothetical or test trades in that sandbox's virtual books, its market data under the import's source, and its configuration under the import's name. Discarding it cancels what it created; nothing is deleted.
- An ORE sample is such an import into a sandbox whose purpose is sample: one sample set, one sandbox, one source, one configuration, and a report definition that ties them together. A team that keeps firm-wide samples anchors their sandboxes at the top of the tree.
- Real deals are never imported into a sandbox. A concluded deal is booked into a real book at once, and held as unauthorised until Operations releases it; the authorisation queue is the controlled staging area for agreements. The next section explains why.
An import is run more than once: an operator re-runs it after a failure, and a nightly job re-runs it over a directory that grew. It is planned from what the document set is, not from when it was read, so a second run names the same portfolios, the same books and the same trades. The trades it names are already booked, so the store refuses them and the run reports each one rather than booking it again.
A row the import cannot book is reported against its source file and its trade id, with the store's own message. Nothing of that row is stored: the booking it had already written is closed again before the run moves on, so a row is either booked whole or absent.
A row that does book raises the same operational authorisation request a manual booking does, because it takes the same write. A sandbox trade is a test and raises none.
2.9. The regulatory boundary
The sandbox stays outside every regulatory obligation by holding nothing that the obligations apply to. Each rule below is met by the single rule that a trade in a virtual book is never live.
| Rule | What it requires | How the sandbox meets it |
|---|---|---|
| Basel RBC25.1-2 | Every instrument the bank holds is in the trading book or the banking book; "all other instruments must be included in the banking book" | A virtual book holds no instrument the bank holds: no agreement is ever live there. Every concluded deal is in a real book from the moment it is struck |
| Basel MAR12 | Each trading account belongs to exactly one trading desk, which is the level of model approval and of the P&L attribution and backtesting tests | The sandbox is not a trading desk, and its results never feed desk P&L, attribution or backtesting |
| EMIR Article 9 | Every derivative contract concluded, modified or terminated is reported no later than the following working day | A sandbox trade is never a concluded contract, so it is never reportable; a concluded deal is never parked in the sandbox, so it cannot miss the deadline |
| MiFIR Article 25; MiFID II Article 16(6) | Records of all orders and transactions are kept for five years; records of all services, activities and transactions are kept | Drafts — quotes and requests — are records. They are cancelled, never deleted, and every sandbox act keeps its audit trail |
| Books and records | The firm's books are complete and its ledger reflects every position | A virtual book is never mapped to the ledger and holds no position, so the official books are complete without it |
| Market conduct | No order or trade without a genuine change of interest | Hypothetical and test trades have no transition that reaches a counterparty, a venue, a confirmation or a settlement |
Two further controls follow from book classification: test trades in production use test counterparties and entities, so nothing can mistake them for real business; and a sandbox report is never a source for official P&L, capital or regulatory figures.
2.10. What follows for the model
This section is analysis rather than reported practice.
The sandbox is modelled as ores.refdata.sandbox, its members as
ores.refdata.sandbox_member, and the rights at a node as
ores.refdata.portfolio_right. A virtual book is a book whose sandbox_id
is set; the book model holds the rules.
sandboxis an entity: name, purpose, anchor (an official portfolio), owner, visibility, members, status and review date. Its root portfolio is its own, and no official portfolio contains it.- The right to open sandboxes is held at a node of the official tree, and a sandbox's anchor must be a node where its owner holds it.
- A book carries whether it is virtual. A virtual book has no ledger book and belongs to exactly one sandbox's portfolio tree; a real book never does.
- Copying a trade into a sandbox checks the user's read access to the original.
- A trade's booking may name a virtual book only while the trade is
draft,testorhypothetical. The transition toliverequires a real book in the same write. - The links what-if copy (original to hypothetical) and dealt from (hypothetical to actual) join a sandbox trade to its official counterpart.
- An import is an activity with participants, like every other act.
- Market data and configuration carry their source; the official configuration names the sources it admits.
- Report definitions mark whether they are official, and an official definition cannot select sandbox inputs.
2.11. Open questions
- Sample counterparties. An ORE sample names its own counterparties and netting sets. Creating them as test counterparties keeps them out of real business but adds them to the tenant's reference data; a dedicated demonstration tenant keeps the tenant clean at the cost of switching tenants to explore a sample.
- Retention of experiments. Whether hypothetical trades in an experiment sandbox fall under the record-keeping rules — they are neither orders nor transactions — decides whether a user may discard an experiment completely or only cancel it.
3. Sources
- Basel Committee on Banking Supervision, Basel Framework RBC25, Boundary between the banking book and the trading book, paragraphs RBC25.1-2: https://www.bis.org/committees/bcbs/basel-framework/standard/rbc/25/inforce/2023-01-01/published/2020-03-27
- Basel Committee on Banking Supervision, Basel Framework MAR12, Definition of trading desk: https://www.bis.org/basel_framework/chapter/MAR/12.htm?inforce=20230101&published=20200327
- ESMA, EMIR Article 9, Reporting obligation: https://www.esma.europa.eu/publications-and-data/interactive-single-rulebook/emir/article-9-reporting-obligation-0
- BaFin, Reporting obligation under Article 9 of EMIR: https://www.bafin.de/EN/Aufsicht/BoersenMaerkte/Derivate/EMIR/Reporting/reporting_artikel_en.html
- ESMA, MiFIR Article 25, Obligation to maintain records: https://www.esma.europa.eu/publications-and-data/interactive-single-rulebook/mifir/article-25-obligation-maintain-records
- ESMA, MiFID II Article 16, Organisational requirements: https://www.esma.europa.eu/publications-and-data/interactive-single-rulebook/mifid-ii/article-16-organisational-requirements
- Nasdaq Calypso, Introduction to Calypso Pricing Environment, for the practice of valuing against an explicit, named selection of pricers, quotes and parameters: https://calypsoeducation.nasdaq.com/courses/129-introduction-to-calypso-pricing-environment
- Murex, Market Risk Management Platform, for what-if simulation and hypothetical trades as inputs to a run: https://www.murex.com/en/solutions/business-solutions/enterprise-risk-management
- Open Source Risk Engine, User Guide, for stress and sensitivity scenarios applied at run time: https://www.opensourcerisk.org/wp-content/uploads/2024/05/userguide.pdf
The personal-portfolio and test-book practices, the broker sandbox, and the rule that perturbed market data is a new element are drawn from internal analysis notes on books, non-contributing trades and market data. The sandbox design and the model consequences are this page's own analysis.
4. See also
- Trade — the structure note that orders this cluster, and where to read this page in it.
- Books and portfolios — the book and portfolio split the sandbox builds on.
- Book access and permissions — the permission model and Chinese walls a sandbox's anchor relies on.
- Book classification — the dimensions every book carries, virtual books included.
- Trade classification — booking nature, which selects the machine a sandbox trade runs through.
- Trade lifecycle — the draft state and the Execute transition out of the sandbox.
- Book moves — why leaving a virtual book is not a move.
- Trade link types — the what-if copy and dealt-from links.
- Operational authorisation queue — the staging area for real deals.
- Market data requirements and resolution — how configuration keeps imported data out of official valuations.
- Report definition and schedule — the explicit inputs of a run.
- FRTB trading book / banking book boundary — the regulatory books a virtual book is not part of.
- Book — the hub of the book cluster.
- Knowledge — the hub of all knowledge notes.