Private Flow, Public Shocks: Stress-Testing Market-Maker Inventory Without Leaking Client Behavior

A market maker is a firm that stands ready to buy and sell, profiting from the gap between its bid and ask prices. Its main risk is inventory: in a crash, clients keep selling into its bids, and it ends up holding a falling asset. Testing an inventory policy against crashes that have not happened yet requires synthetic order flow, meaning simulated sequences of client buy and sell orders. The realistic version of that flow comes from the firm's own client records, which it cannot share or publish. The standard way to make shareable synthetic data is differential privacy (DP), a guarantee that the output barely changes whether or not any one client's records were used. DP has a known cost: it suppresses rare, extreme values. Those extreme values are exactly the crash dynamics a stress test needs. Read naively, privacy and stress testing work against each other.

This note proposes that most of that conflict goes away once you notice where each piece of information lives. The shock itself is public. Every participant sees the same price collapse, volatility spike and widening spreads on the exchange tape, so it needs no privacy protection. What is private is how a given firm's clients respond to that public state: which side they trade on, how aggressively, and how informed they are. We therefore split the generator into two parts. The first is a public market-state model, where shocks are injected freely and tails are kept intact. The second is a conditional client-flow model, trained under per-client DP, which only has to learn how clients respond to market conditions. We judge the result by the question practitioners actually care about: does the synthetic stress environment rank inventory policies the same way the true stress environment does?

Core Claim

Training a full order-book generator end-to-end under DP forces the privacy noise to fall on the market-wide tail events. We claim this is unnecessary. If the joint process is factored as

$$ p(s_{1:T}, f_{1:T}) = p_{\text{pub}}(s_{1:T}) \prod_{t=1}^{T} p_\theta(f_t \mid s_{\le t}, f_{<t}), $$

where $s_t$ is the public market state at time $t$ (mid-price, spread, depth, realized volatility), $f_t$ is the firm's private client flow (signed order arrivals by client type), $p_{\text{pub}}$ is a public-data generator into which shocks are injected, and $\theta$ is the only parameter set trained under client-level DP, then two things follow. First, the privacy guarantee covers every client's flow history. Second, the heavy tails come entirely from the unprivatized public component.

The concrete prediction is about policy rankings. Under per-client DP at $\epsilon \in \{1, 4, 8\}$, the factored generator should preserve the ranking of inventory policies by tail risk on held-out large shocks, measured as Kendall rank correlation against ground truth. An end-to-end DP generator with the same budget should lose that ranking, and lose it disproportionately on large shocks. The main open risk is that client responses to extreme states are themselves rare in the training data, so the conditional model must extrapolate. The program tests this directly rather than assuming it away.

Positioning Against Prior Work

The motivation comes from three findings in the file. A Synthetic Limit Order Book Dataset for Benchmarking Forecasting Algorithms under Distributional Shift built DSLOB by injecting shocks into ABIDES, an agent-based market simulator. It showed that forecasters tuned for normal conditions degrade under shock. It evaluated only mid-price forecasting, with no privacy and no inventory control. We reuse its shock-injection design but change the downstream task to policy evaluation and add a private flow component.

Risk In Context found that privacy leakage in foundation-model synthesis comes mainly from reproducing rare values. Its recommended mitigations, low sampling temperature and summary-statistic prompts, deliberately push the generator toward majority patterns. For stress testing that is the wrong direction. This finding constrains our design: we must not obtain privacy by flattening tails, which is why tails are moved into the public component.

Measuring Privacy Risks and Tradeoffs in Financial Synthetic Data Generation and Evaluating Differentially Private Synthetic Data Generation in High-Stakes Domains document how DP erodes correlations, minority subpopulations and long-range coherence. The second paper also reports leakage of thousands of unique phrases even at $\epsilon=8$. Both work on static tables or text. Neither touches sequential market data.

On the generation side, LOB-Bench supplies our realism metrics. It also documents the "autoregressive trap," where small errors compound over long rollouts, and shows that adding synthetic order-book data to real data hurt downstream forecasting. That second result could look like a contradiction of our premise. We read it instead as evidence that distributional realism and downstream decision usefulness come apart, which is why we score generators on policy ranking. TradeFM shows that a large autoregressive model trained on public trade flow reproduces heavy tails and transfers across markets. It is a candidate for the public component $p_{\text{pub}}$. Its lack of exogenous conditioning is what we add through shock injection.

The policies under test come from the inventory literature. Adaptive Market Making with Inventory Constraints via Online Learning supplies two families of online-learning market makers: hard-constraint strategies with an inventory ceiling $R$, and soft-constraint strategies that skew quotes against holdings with risk-aversion coefficient $\gamma$. It evaluated them only on one realized month of CSI500 history. A Simple Strategy to Deal with Toxic Flow supplies closed-form strategies whose trading rates are linear in inventory and in a signal of informed flow. That paper names empirical separation of informed and uninformed clients as an open problem, and that separation is exactly what our private flow model encodes.

Concentrated Liquidity Provision: a Reinforcement Learning Perspective shows that risk-averse reinforcement-learning liquidity providers improve tail loss, but only in stationary Brownian-motion environments. Our testbed is meant to stress exactly that stationarity assumption, although we keep the main study on order-book market making.

Research Program

The first component is a ground-truth world in which client identities are known, so that privacy and fidelity can both be measured exactly. We build it in ABIDES-Gym and ABIDES-MARL. A population of several hundred heterogeneous client agents trades against a designated market-maker slot. The clients are informed, momentum, value and noise traders, each with individually drawn parameters. Each client's full order history is one privacy unit. Following the DSLOB recipe, we generate normal days, small fundamental-value shocks and large jumps, and we add two shock types that DSLOB does not have: a liquidity withdrawal and a momentum cascade. Training data contains normal days and small shocks only. Large shocks and the new shock types are held out.

The second component is the factored generator. The public model $p_{\text{pub}}$ is fit to the market-state stream without privacy, and shocks are applied by intervening on its fundamental-value or volatility inputs. We implement two versions:

  • a small sequence model trained on simulator tape;
  • a pretrained public trade-flow model in the style of TradeFM, used as an upper bound on public-side realism.

The conditional flow model $p_\theta$ predicts signed arrivals per client type given recent public state. It is trained with DP-SGD under per-client gradient clipping, a standard DP training method that bounds each client's influence and adds calibrated noise. To give it a chance of extrapolating to unseen stress, we build it at two complexity levels:

  • a structured intensity model whose arrival rates are monotone in features such as absolute return and spread;
  • a flexible neural model.

The third component is the evaluation harness. We assemble a pool of about twenty inventory policies spanning the hard- and soft-constraint online learners and the linear closed-form strategies, each across a grid of risk aversion and inventory limits. Each policy runs in the ground-truth simulator under held-out shocks and in each synthetic environment. We record mean profit and loss, conditional value at risk of terminal profit and loss (CVaR, the average of the worst 5% of outcomes), peak absolute inventory, and time to breach a limit. The primary outcome is Kendall's rank correlation between the synthetic and true policy rankings by CVaR. Secondary outcomes are absolute CVaR error and LOB-Bench realism scores on the public stream.

Privacy is audited in two ways. First, we run membership inference against individual clients. Second, because Measuring Privacy Risks and Tradeoffs in Financial Synthetic Data Generation warns that such attacks often sit near chance on DP models without proving safety, we also plant canary clients with distinctive stress behavior and measure whether that behavior can be recovered from synthetic flow.

Baselines

Naive reference. Inventory policies are evaluated under the injected public shock while client flow is replayed unchanged from normal days. This is what a desk does when it stress-tests prices but not counterparties. It tells us how much of inventory risk under shock comes from clients changing behavior. If our generator cannot beat this reference on rank correlation, the private flow model contributes nothing.

Strongest existing method. No published DP generator for sequential order-book data appears on Lacuna. We therefore construct the closest version of the obvious idea: an end-to-end shock-conditioned order-book generator over the joint stream, trained with per-client DP-SGD. Its architecture follows LOBS5 from LOB-Bench, which reports a price-impact-curve average $L_1$ distance of $\Delta R = 2.45$ against RWKV-6's 126 in the non-private setting. Its non-private version serves as a privacy-free ceiling. It gets the same data, the same privacy budget and privacy accountant, the same total training compute, and the same hyperparameter search budget as our method, with each method's hyperparameters selected on a validation set of small-shock days.

Beating it means two things at matched $\epsilon$:

  • a higher rank correlation on held-out large shocks, with bootstrap intervals over shock seeds that do not overlap;
  • membership-inference AUC and canary recovery no worse.

For context on whether risk differences are big enough to matter, Concentrated Liquidity Provision reports that risk-averse agents improved CVaR by about 27 USDC at a cost of about 4 USDC in mean profit and loss. That is the kind of policy gap the synthetic environment must be able to resolve. For DSLOB itself there is no reported numerical result found on Lacuna; the paper reports only qualitative degradation of DeepLOB and Transformer under shock.

Isolating ablation. We keep the factored architecture but apply DP noise to the public component as well. If performance collapses to the end-to-end baseline, the benefit comes from exempting public tails from privacy, not from the factorization alone. A second ablation swaps the structured flow model for the flexible one. This tells us whether extrapolating to unseen stress requires the monotone structure.

Utility-only reference. The factored generator is trained without DP and without client-level protection beyond removing identifiers. It bounds the utility we give up for privacy.

Why not just…?

Why not just replay historical crises? Public tapes from past crashes are real and need no protection, and we do use them, as the public half. They contain one realized path per event and nothing about how a specific firm's clients traded. Client response is the quantity that drives the market maker's inventory. Adaptive Market Making with Inventory Constraints via Online Learning illustrates the limit: its policies were validated on one month of history, which cannot speak to unseen shocks. The naive replay baseline above measures exactly how much this omission costs.

Why not just estimate a handful of flow parameters privately and plug them into a classical model? A low-dimensional model of arrival rates by side, with an informed-trader fraction in the spirit of A Simple Strategy to Deal with Toxic Flow, needs very little DP noise because it has so few parameters. It might be enough. This is a real threat, and we do not argue around it. It is the structured flow model in our program, and comparing it to the flexible model is a headline result. If the parametric version matches the flexible one on rank correlation, the conclusion is that public shock injection plus a few private parameters suffices, and that is the recommendation we would make. Classical models are weaker on public-side realism. TradeFM reports 2 to 3 times lower distributional error than compound Hawkes baselines. That weakness, however, is on the public side, where our design already allows a rich model.

Why not just use ABIDES with hand-coded agents and skip learned flow entirely? Hand-coded agents produce flow that reflects the modeler's assumptions, not the firm's clients. A Synthetic Limit Order Book Dataset for Benchmarking Forecasting Algorithms under Distributional Shift itself concedes that such flow misses real nuances. Calibrating the agents to real client records brings back the privacy problem. We include a baseline that uses a mismatched hand-coded agent population, with generic parameters rather than the true ones. It measures how wrong a well-meaning default can be.

Why not just strip client identifiers and train non-privately? Risk In Context shows that generators trained without formal protection reproduce rare records, with true positive rates up to 54 percentage points above safer baselines. A client's distinctive crash-time behavior is precisely such a rare record. The canary audit on the utility-only reference will show whether this happens for order flow.

Proposed Experiments

The main experiment crosses four generators (end-to-end DP, factored with structured flow, factored with flexible flow, and the fully-noised ablation) with three privacy budgets and four held-out shock types. Each cell uses twenty shock seeds and the twenty-policy pool. We report rank correlation, CVaR error, peak-inventory error and the privacy audits.

The decisive check is the large-shock condition at $\epsilon=4$. Our claim requires the factored generator to keep rank correlation within 0.1 of the utility-only reference while the end-to-end DP generator falls substantially below it. The claim is falsified if the gap between the two DP generators is within noise, or if the factored generator's advantage disappears on shock types absent from training. That second failure would mean the conditional flow model does not extrapolate, and the honest conclusion would be that private client flow under unseen stress cannot be learned from normal-day data at any useful budget.

A secondary real-data anchor fits the public component on the LOBSTER GOOG and INTC data used by LOB-Bench and reports its standard realism metrics after shock injection. Separately, we compare policy rankings from our pipeline, with flow fit to the simulator, against rankings obtained by historical replay on CSI500 paths as in Adaptive Market Making with Inventory Constraints via Online Learning. This anchor checks only plausibility. Real client identities are unavailable, so the privacy claims rest on the simulated world where they are known.