Trading-day operations: the open, the close, incident response with money moving, and change freezes

In a trading incident the first question is not "why" but "what is our position and can we still cancel". Risk first, state truth second, cause last — and nothing risky ships during the session.

Read the briefing
About 3 min to read 6 drills

What to remember

  1. Risk first, cause last. Flat or hedged and able to pull orders comes before any debugging. Platform instincts get this backwards.
  2. The venue is authoritative about your orders. Your book is a cache. After any disruption you reconcile against them before resuming.
  3. A kill switch you have not rehearsed is a wish. Cancel-on-disconnect, an out-of-band cancel-all, and gateway limits — tested out of hours, not discovered at 09:31.
  4. The trading day has hard edges: plan around them. Pre-open, open auction, continuous, close auction, settlement. Deploys land outside the session, full stop.
  5. Trading postmortems have two extra sections: the money and the regulator. P&L impact, erroneous fills, client impact — and whether it is reportable, with the clock starting at detection.

The big picture

Trading-day operations is reliability engineering with a clock and a balance sheet attached. The schedule constrains when you may act, the position constrains what you must do first, and the aftermath has a money and a regulatory dimension a platform postmortem does not.

The mental model

Two loops as always — protect first, then diagnose — but "protect" means position safety rather than uptime. If you can be flat and able to cancel, you have bought the time to think. If you cannot cancel, nothing else matters.

In depth

The shape of the day

Pre-open (systems up, connectivity verified, positions from overnight reconciled), the opening auction (the highest-rate, highest-stakes minutes), continuous trading, the closing auction (often the largest single volume event), then settlement and reconciliation. Infrastructure work is planned around those edges: risky changes land well outside the session, verification happens in pre-open with enough time to roll back, and anything that touches connectivity is tested against the venue's test environment first.

This is why "we deploy continuously" and "we run trading infrastructure" need reconciling rather than asserting: the pipeline is continuous, the window is not.

Incident order of operations
  1. Position and control: what is our exposure, and can we still cancel? Pull or widen quotes, throttle to under the venue's limits, and confirm what is genuinely live by client order ID.
  2. State truth: reconcile against the venue or drop copy. Your book is a cache; theirs is authoritative.
  3. Communicate: traders need to know in seconds what they can trust; risk needs exposure; compliance needs a timeline. Templates written in advance, updates on a cadence.
  4. Then diagnose, with evidence preserved (captures, logs, snapshots) because the postmortem will need it and the regulator may.

The instinct to fix before flattening is the single most expensive habit a platform engineer brings to a trading desk.

Kill switches and limits

A kill switch is a set of tested capabilities, not a button someone believes in: cancel-on-disconnect at the venue where offered; an out-of-band cancel-all that works when your gateway is the sick component; per-strategy and per-account limits enforced in the gateway (message rate, order rate, notional, position, order-to-trade ratio) so a misbehaving strategy is throttled by you rather than disconnected by them; and a documented, rehearsed procedure with named authority to use it. Rehearse out of hours, and rehearse the decision, not just the script — the risky part is somebody being willing to press it.

Change control and the postmortem

Freezes exist because the cost of an incident is asymmetric during market hours. Config changes go through the same review as code; "emergency" changes require an explicit, recorded risk decision by a named person; and the pre-open verification is a checklist that ends in a go/no-go.

A trading postmortem carries the usual timeline plus two sections. The money: exposure carried, erroneous or missed fills, P&L impact, and whether any client was affected. The regulatory view: whether the event is reportable, on what clock (which usually starts at detection, not at resolution), and what evidence has been preserved. Action items are mechanisms as always — a limit enforced in the gateway, an alert on staleness, a rehearsal added to the calendar.

Myths and facts

Myth: Debug first so you know what you are dealing with.

Fact: Reduce risk first. Understanding is worth less than being able to cancel, and diagnosis is cheaper once you are not carrying exposure.

Myth: Our own order book is the source of truth during an incident.

Fact: The venue is. Your state is a cache and diverges exactly when things are going wrong.

Myth: A change freeze is bureaucracy that slows teams down.

Fact: It concentrates change into windows where a mistake is recoverable. The pipeline stays continuous; the window does not.

Myth: Cancel-on-disconnect means we do not need our own kill path.

Fact: Not every venue offers it, and the case where your gateway is the broken component needs an out-of-band path.

Myth: A trading postmortem is the same as any other.

Fact: It adds the money and the reportability sections, and the evidence obligations are stricter.

How pros do it

  • Plan all change around the session's edges, with pre-open verification ending in a go/no-go.
  • In an incident: position and cancel-ability first, reconcile second, communicate third, diagnose last.
  • Enforce limits in the gateway with headroom under venue limits; monitor how close you run to them.
  • Enable cancel-on-disconnect where offered, build an out-of-band cancel-all where it is not, and rehearse both.
  • Write postmortems with the money and reportability sections, and preserve captures before rebuilding anything.

Questions people ask

Can we deploy during market hours if it is behind a flag?

No — a flag flip is a production change with the same blast radius, so it gets the same review and the same window. Ship the code dark outside the session and flip deliberately with an owner watching. The pipeline stays continuous; the window does not.

What do we tell traders during an incident?

What they can and cannot trust, and what is being done, in one or two sentences on a cadence. They are making decisions with your information, so speed and precision beat completeness. No speculation about cause in anything written down — compliance will read it later.

Who decides to use the kill switch?

A named role with pre-agreed authority, written down and rehearsed, so nobody is looking for permission at 09:31. The risky part is somebody being willing to press it, which is why the rehearsal covers the decision and not just the script.

How fast do we need to be able to cancel everything?

Fast enough that a runaway strategy cannot exceed your risk limits — usually seconds. That means the path cannot depend on the component most likely to be broken, which is why the out-of-band cancel-all exists alongside cancel-on-disconnect.

Is every incident reportable?

No, but the determination has a clock, it usually starts at detection, and it is not the on-call engineer's call alone. Compliance is a participant in the incident, not an audience after it — pull them in early and preserve the evidence.

Further reading

Drills · 6

Answer in your head, or out loud, before you reveal. Mark each one: "Again" brings it back, "Got it" counts on your desk.

1 Pick the strongest answer

It is the middle of the session. Your order gateway starts logging errors and the fills do not look right. What do you do first?

  1. Establish position and whether you can still cancel: pull or widen quotes, confirm live orders by client order ID, and reduce rate — then diagnose. Risk and control before understanding; diagnosis is cheaper when you are not carrying unknown exposure.
  2. Notify the venue and wait for their confirmation. Necessary in parallel; useless as the first action while exposed.
  3. Read the gateway logs to find the root cause before touching anything. That is the platform instinct, and on a desk it is the expensive one.
  4. Restart the gateway to clear the error state. Loses in-flight state and can leave live orders unmanaged.
In short

First find your position and make sure you can still cancel: pull quotes and confirm live orders, then diagnose.

Why

The ordering is: position and cancel-ability, then reconcile against the venue, then communicate, then diagnose. Every experienced trading-infrastructure interviewer is listening for that sequence.

The common mistake

Opening the logs. That is the platform instinct, and on a desk it is the expensive one — you are debugging while carrying unknown exposure.

Read the docs

2 Answer out loud

Walk me through how you run an incident during market hours, and what is different about the postmortem afterwards. Five to seven sentences.

In short

A strong answer puts position and cancel-ability first, reconciles with the venue, updates traders, risk and compliance, and adds the money and regulatory sections.

What a strong answer does
  • ordering: Position and cancel-ability, reconcile against the venue, communicate on a cadence to traders/risk/compliance, then diagnose with evidence preserved.
  • communication: Distinct audiences with distinct needs — traders in seconds, risk exposure, compliance a timeline — with templates written in advance and no cause speculation.
  • postmortem: Money section (exposure, erroneous or missed fills, P&L, client impact) and regulatory section (reportability, clock from detection, evidence preserved), with mechanism action items.
  • judgment: Names what they would not do — restart the gateway, trust their own book, deploy a fix mid-session — and why.
Why

Interviewers score the ordering, the three audiences, and the two extra postmortem sections; the "what I would not do" list is what makes it sound lived rather than read.

The common mistake

Telling a platform-style incident story with a trading noun swapped in. Without the position, the venue as source of truth and the regulatory clock, it is not a trading-incident answer.

3 Pick the strongest answer

What actually counts as a kill switch on a desk?

  1. Cancel-on-disconnect at the venue where offered, an out-of-band cancel-all that does not depend on the gateway, gateway-enforced per-strategy and per-account limits, and a rehearsed procedure with named authority. Independent paths plus enforced limits plus a rehearsed human decision.
  2. Killing the gateway process, since orders will expire. Only if the venue supports cancel-on-disconnect; otherwise orders stay live in the market.
  3. A risk limit in the strategy code. The strategy is the thing that may be misbehaving; limits belong outside it.
  4. A script that sends mass-cancel through the primary gateway. It depends on the component most likely to be the problem.
In short

A real kill switch has cancel-on-disconnect, a cancel-all path that avoids the gateway, limits in the gateway, and a rehearsed procedure.

Why

The test for a kill path is: does it still work when the most likely broken component is broken? A cancel that traverses the sick gateway fails exactly when you need it.

Read the docs

4 Find what's broken

Which four entries would a trading-infrastructure reviewer reject outright — and which one would you fix tonight?

# desk operations policy (excerpt)
deploy_window = "any time, behind a feature flag"
flag_changes = "no review required"
cancel_all_path = "mass cancel via the primary gateway"
cancel_on_disconnect = "not configured"
risk_limits = "enforced inside each strategy"
kill_switch_authority = "whoever is on call"
postmortem_template = ["timeline", "root cause", "action items"]
rehearsal = "none"
In short

The four bad lines are the cancel path through the primary gateway, risk limits inside the strategies, flag changes with no review, and nothing rehearsed.

What's broken
  • Line 4: The only cancel-all path runs through the primary gateway — the component most likely to be the problem.
  • Line 6: Risk limits live inside the strategies, so a misbehaving strategy polices itself.
  • Line 3: Flag changes need no review, yet a flag flip is a production change with the same blast radius as a deploy.
  • Line 9: Nothing is rehearsed, so the kill switch and failover are theories.
Why

Deploying behind a flag (line 2) is defensible if the flag flip is controlled — which line 3 removes. On-call authority (line 7) is fine if it is written and rehearsed. The postmortem template (line 8) is missing the money and reportability sections, which is a real gap but not what loses money this week.

Read the docs

5 Scenario: what do you do next?

14:20, mid-session. A security advisory drops: a critical remote-code-execution bug in a library your order gateway links. Patched version available. Security wants it deployed today; the desk is mid-position and the close auction is the day's largest volume event.

Step 1. What do you propose?

  1. Ask security to sign off on delaying, and take no other action. Delegating the decision without offering compensating controls is not engineering judgement.
  2. Deploy the patch immediately; security issues override change freezes. A gateway restart mid-position with an unrehearsed build risks a larger, more certain loss than the vulnerability.
  3. Wait for the regular maintenance window next weekend. If the path is genuinely reachable, days of exposure is not a decision one engineer should make silently.
  4. Assess exposure honestly — is the vulnerable path reachable from anywhere untrusted? — then propose compensating controls now (network restriction, WAF/firewall rule, disabling the feature) and the patch outside the session, with a named decision-maker on the risk trade. Balances two real risks with a mitigation that does not require touching the gateway mid-position.

Step 2. The vulnerable code path is only reachable from the venue's own session, which is authenticated and IP-restricted. Compensating controls are in place. When and how do you patch?

  1. After the close and settlement, on the standby first with a verification run against the venue's test environment, then the primary in the next pre-open with a rollback build staged and a go/no-go. Uses the window the day provides, proves the build before it touches production order flow, and keeps a way back.
  2. During the close auction, since volume means the standby will be exercised. The highest-stakes minutes of the day are the worst possible window.
  3. Patch both gateways simultaneously to keep them consistent. Removes your fallback exactly when you are introducing change.
  4. Immediately after the close auction, straight onto the primary. No verification step and no standby proof; the next open becomes the test.

Step 3. Afterwards?

  1. Record the risk decision and who made it; add the dependency to an inventory with alerting on advisories; define a pre-agreed policy for the security-versus-session trade so the next one is a lookup rather than a debate. Turns a judgement call under pressure into a standing policy with an owner.
  2. Move the gateway to a language without dependencies. Not a response to this class of problem.
  3. Note in the postmortem that security and trading have conflicting priorities. True and useless without a policy.
In short

Check whether the bug is reachable, add controls now, and patch after the close on the standby first, with a named person owning the risk.

Why

This tests whether you can hold two risks at once and produce a plan rather than a preference. The strong answer assesses reachability, offers compensating controls, uses the day's windows, verifies on the standby, and converts the decision into policy.

Read the docs

6 Quick recall

Trading-hours incident: before you touch the cause, what do you establish?

In short

Your position, and whether you can still cancel your orders.

Accepted

position and whether you can cancel · our position and cancel ability · risk and cancel-ability

Why

Position and cancel-ability. Being flat or hedged and able to pull orders buys the time to diagnose; the reverse order is how a technical problem becomes a trading loss.

That's the last lesson in mission 04 Pick your next mission
Drill · Trading-day operations
0:00

Loading…