Agent Reliability LabDiscuss your needs
Automation

Multi-dimensional portfolio stress-testing against liquidity shocks

Use an explicitly scoped scenario grid and source/schema checks to inspect combined price, volatility and margin assumptions.

A portfolio report can hide the effect of a joint price, volatility and margin shock. This note is a control instrument: how to see hidden fragility before a broker’s margin call. It is not investment advice, not a product that produces yield, and not a claim that any book “survived” a period.

A static utilisation figure and a statistical risk estimate have different assumptions from a joint stress scenario. Correlations, implied volatility and margin requirements can change; no universal response to a given market drop is asserted here.

Separate the arithmetic from the scenario assumptions

Take a fictional arithmetic fixture in abstract units: NAV 100, current margin 40. Utilisation U = Margin / NAV is 40 percent. A later utilisation result requires new NAV and margin inputs; it cannot be inferred from that starting fraction alone.

A joint scenario should examine the relevant sensitivities and margin assumptions together:

  1. Price curvature. For a position with negative gamma, the response to a price change is nonlinear. Inspect the actual position sensitivities rather than assuming constant beta.
  2. Volatility sensitivity. Changes in relevant implied volatility affect option values; direction and magnitude depend on the positions and model assumptions.
  3. Margin assumptions. Recompute the applicable requirement under the chosen methodology; do not assume a fixed relationship between market movement and the broker response.

Recalculate both numerator and denominator with the scenario inputs. This article does not establish a liquidation threshold or a predicted utilisation for any account.

Four layers, not one overnight job

A control loop that depends on a person noticing is already late. The build is a stack:

  • L0 — input snapshot. Use an operator-defined cadence or event trigger, record source times and make stale or missing inputs explicit. No live instrument list or trigger threshold is disclosed here.
  • L1 — pre-open score. Before the cash session, a deterministic pass over the open book: net and beta-weighted delta, portfolio gamma, aggregate vega, daily theta, HHI concentration, share of margin in the top five names. Status is HEALTHY, WARN, or CRITICAL BREACH, with a de-risking queue — names, not a essay.
  • L2 — material deltas only. Versus yesterday: margin up more than a set percent, quiet delta drift from expiry or from going in-the-money, vol quotes outside a historical IQR. The desk is not asked to re-read a sheet that did not change.
  • L3 — weekly (and on a macro shift) what-if. The same shock grid the rest of this note describes, plus a multi-agent reading of the tails. The ensemble does not pick trades. It is asked where the matrix is lying.

A scenario grid and a local approximation

The question is not “where does the market go.” It is: what does this book do at every pair of price shock and vol shock.

A local sensitivity approximation can help inspect a scenario, but it is not a substitute for validating the model over the chosen shock range:

ΔV ≈ delta · ΔS + ½ gamma · (ΔS)² + vega · Δσ + theta · Δt

This schematic is for one position with consistent sensitivity units: ΔS is its underlying-price change, Δσ its implied-volatility change and Δt elapsed time. It omits cross terms and higher-order effects. Map instruments, units and currencies before aggregation and compare representative shocks with a fuller valuation.

An illustrative qualitative display for a hypothetical short-volatility exposure, not a calculated live-book result:

Price \ vol Quiet (−2 IV) Unchanged +5 IV Panic (+12) Crash (+25)
Rally +10% modest gain smaller gain smaller still near flat loss
+5% gain gain smaller small loss loss
Flat small theta theta loss larger loss large loss
−5% loss larger larger large severe
−10% large larger severe severe very severe
−20% severe severe severe extreme extreme

Compare the scenario output with the operator-defined capacity constraint. A breached constraint should produce a reviewed status and recovery decision; this engineering example does not prescribe a hedge or a trading action.

Keep capacity limits explicit and operator-owned

For an explicitly chosen utilisation limit, the arithmetic is headroom = NAV × U_max − Margin_now. The operator owns the limit and its assumptions. No fixed percentage is recommended or disclosed as a live policy.

Check a broker-supplied snapshot against applicable consistency constraints and source freshness. An implausible or incomplete value should invalidate the observation for review, rather than being silently accepted or replaced by zero.

Schema drift: a green report on a missing test

The dangerous cousin of a bad number is a missing number that still grades as pass.

A failure fixture to test: remove a required stress field while leaving the schema version unchanged. Verify that the final consumer rejects it rather than treating a missing value as zero and emitting PASS. This is an acceptance test proposal, not a new incident-frequency measurement.

The fix is a contract, not a better prompt:

  1. Explicit schema_version. Any JSON shape change bumps the version.
  2. Fail loud. A missing required field stops status generation. It does not emit a zero.
  3. Deprecation log. A removed field names its replacement in metadata.

What this is for

The instrument exists so a joint price-and-vol shock is visible while there is still headroom, and so a missing field cannot impersonate a pass. It does not claim a count of margin calls, a yield, or a track record. Those sentences belong in a pitch. They do not belong here.

If the failure mode you care about is “the monitor was green and the work did not happen,” that is the same class as a silent no-op in any other pipeline. Request a scope when the book, the broker gateway, and the failure you will not tolerate can be named in writing.

What to check in your system
  • Is there a hard ceiling on margin use in calm weather (well below the broker's last-minute call)?
  • Is P&L read on a joint shock: a price gap and a volatility jump, not one axis at a time?
  • If a broker snapshot is missing a required field, does the monitor fail loud, or pass with a zero?
  • Does a material change versus yesterday surface on its own, or is the desk expected to re-read the whole pack?
Agent Reliability Lab
AI consultant

AI replies may be wrong. Messages and chat history are sent to an external AI service. Do not share passwords or confidential information. Privacy · Contact the studio directly