Pre-trade risk controls are proven by evidence, not by the fact that they exist. That evidence is a chain: each control tested against orders already labelled as bad, a stress run at twice the firm’s highest message and trade volumes of the previous six months, a measured false-negative rate, latency reported in percentiles against a budget, a traceability matrix tying every control to its test and result, and a cutover plan with a rehearsed rollback. The doubled-volume stress test is not our invention: RTS 6 Article 10 prescribes it.
Proving pre-trade risk controls reject bad orders before matching
The first job is to show that each required control exists, fires, and fires before the order leaves your gateway. RTS 6 Article 15 requires price collars, maximum order values, maximum order volumes and maximum message limits on order entry. ESMA adds repeated automated execution throttles to that list and expects all five to be set for each instrument traded algorithmically. Every order sent to a venue must pass these checks, and a firm may not rely solely on the venue’s own controls. ESMA expects hard blocks to carry out these requirements.
US firms face the same logic under SEC Rule 15c3-5: orders that exceed price or size parameters, on an order-by-order basis or over a short period, or that look like duplicates, must be rejected. Rule 15c3-5 requires those controls to be applied on a pre-trade basis.
Timing matters as much as coverage. ESMA expects pre-trade controls to be tested at design and calibration before deployment, after any major change to the algorithm governing them, and after a risk event or a major shift in market conditions. It treats testing after every recalibration as good practice.
“Before matching” becomes testable when you assert at the gateway boundary. The FCA found that many firms run pre-trade controls at internal server level, so a breached order cannot leave the internal gateway. A useful test therefore checks two things for every bad order: it was rejected with the expected reason code, and it never appeared on the outbound venue session. An order state machine with event sourcing (NEW, then PENDING_RISK, then ROUTED, with every transition stored) lets you rebuild the state of any order at any point in time.
Can someone outside our team verify that the checks fire before the match?
Yes, but the responsibility stays with you. Under RTS 6 Article 7 a firm may test in its own environment or in one provided by a venue, a DEA provider or a vendor, and in every case it keeps full responsibility for the testing. ESMA says the same about outsourced algorithms: operational control and regulatory responsibility stay entirely with the firm.
The FCA describes as good practice an independent committee that checks documentation and test completion, plus a dedicated development team that verifies independently before each stage. After the Knight Capital failure, the SEC required the firm to retain an independent consultant to review its market access controls and deployment processes. Whoever does the verifying, the useful test is whether a reviewer can establish what happened without relying on the control owner’s explanation.
Which edge cases (partial fills, latency, limit resets) should the tests cover?
These are the edge cases the tests should cover, with the source behind each one:
- Working orders and partial fills. Position checks should evaluate current positions plus working orders, so that a limit holds even if a resting order fills later. For credit and capital thresholds, the SEC expects exposure to be measured on orders entered, not executions obtained. Knight’s position limits did not account for exposure from outstanding orders. Limit state also has to update correctly as fills arrive. Test a partial fill followed by a new order that only breaches once the rest of the resting order fills.
- Parent and child orders. ESMA expects volume and value limits on both the parent and the child orders, with cumulative checks so that slicing cannot exceed the parent’s size.
- Limit resets and temporary changes. FINRA found firms without procedures to make sure temporary threshold adjustments revert to their earlier values. Test day-boundary resets, expiry of temporary raises, and what happens to orders in flight during a reset.
- Missing limits and missing inputs. Systems should refuse orders for an instrument with no order size limit set. They should also block orders while stale or unreasonable market data is investigated. A check that cannot compute its input should fail closed, and a test should prove that it does.
- Duplicates and reconnects. Rule 15c3-5 covers duplicative orders. One architecture guide recommends testing idempotency by deliberately dropping connections during order submission in staging.
- Rate and time-window controls. A framework that tests one order at a time against a stateless engine cannot exercise short-period or message-limit controls, so passing it says nothing about your throttle.
- Soft blocks and overrides. FINRA expects firms to check that hard blocks actually trigger, and that soft blocks work as a control through documented review steps.
- Latency between check and match. Limit state has to update correctly as fills arrive, and a check that reads it just before a fill lands creates a race. Record hardware timestamps on both events and look for such races in replay rather than hoping a test hits them.
- Changes elsewhere in the stack. In a separate Citigroup incident, disabling a parent-level control judged duplicative also switched off a child-level duplicate order control because of a software bug. Monitoring saw nothing, because a disabled control triggers no notifications. Any configuration change should re-run the full bad-order suite, not only the tests for the control that changed.
Coverage is only as good as this list. New order types, new venues and market conditions you have not seen will fall outside it, and a pass at one point in time says nothing about configuration drift after it.
Worked example: what the 2 May 2022 basket shows about testing one system at a time
On 2 May 2022 a Citigroup Global Markets trader meant to sell a US$58m basket but loaded one worth US$444bn across 349 stocks, according to the FCA’s 2024 Final Notice. Two hard blocks that could not be overridden stopped US$248bn of it. The PRA’s notice records that US$1.4bn of sell orders were executed on European exchanges before the trade was cancelled.
The gaps were specific. The EMEA desk had no wave notional hard block on total basket value, although the New York desk had had one since May 2013. A US$100m wave notional soft block did trigger, but it reported that the wave notional could not be found because market data was missing. The trader saw 711 warnings in one pop-up showing 18 lines at a time and overrode the soft warnings. The order notional hard block was set at US$2bn per item and was later cut to US$250m. A price-move control calibrated at 5% in 2015 had been raised to 15% in March 2020 and stayed there until May 2022. Control testing was done system by system, with no scenario test of trading flow across systems. If a soft trigger was overridden in testing, nobody tested how the order then behaved downstream.
There is a lesson here for anyone asking for a pass/fail report per control category. Parts of the control framework operated as the firm expected. The failures were a control that was absent, a control that could not compute its input, a threshold left raised since 2020, and a flow nobody tested end to end. A per-category report is the right deliverable only if the categories come from the requirement, not from the controls already built. An absent control then shows up as a failing row instead of a missing one. The PRA notice also describes an annual threshold review that checked whether the values in the control inventory matched the values implemented in the application. That check belongs in the suite. One testing framework enforces this discipline by refusing to promote the build if any required rule was never fired by some test case.
How do you measure the false-negative rate of pre-trade risk checks?
You can only measure a false-negative rate against a test set where every order’s expected outcome is labelled before the run. The rate is the number of orders labelled “should reject” that were accepted, divided by all orders labelled “should reject”. Without labels you can count how often controls fired, but not how often they should have fired. ESMA expects firms to collect trigger statistics on each pre-trade control and use them to judge effectiveness. Those statistics complement a labelled test but cannot replace it.
To build the set, take replayed real order flow and inject constructed bad orders for every control and every edge case above. Record the expected decision and the rule id that should fire for each one, then compare actual against expected order by order. Compare the exact set of triggered rule ids, not just accept or reject, so that an order blocked by the wrong rule counts as a defect. The audit trail that makes this possible records every check, decision, limit change and kill-switch activation, timestamped and immutable. RTS 6 requires firms to identify which algorithm and which trader or desk sent each order.
For a simulated flash crash, start from historical data. The FCA saw some firms deliberately pick stressed periods and update their simulation data quickly when new stressed events happened. One architecture guide recommends replaying historical flash crashes and circuit-breaker events against the risk engine. What the harness must prove is an order-by-order result against labels.
Zero false negatives in the test means zero on the orders you labelled, and nothing more. Report false positives (good orders wrongly rejected) next to the false-negative rate, because desks feel those first and they create pressure to loosen thresholds. RTS 6’s own wording on minimising false positives and false negatives applies to the post-trade surveillance system’s alerts, not to pre-trade checks. The discipline carries over, but the obligation is not the same.
What load profile should a risk gateway stress test use?
The regulatory floor is set out in RTS 6 Article 10. Firms must run high messaging volume tests at twice the highest number of messages sent and received in the previous six months, and high trade volume tests at twice the highest trading volume in the same period, without affecting production. ESMA acknowledges that testing message volume is fairly simple, while testing the full cycle from order generation to post-trade processing is harder. For that full cycle, firms should evidence a reasonable level of assurance that they can handle twice their highest trading volume.
Twice the past six months looks backwards. If three new clearing members are about to go live, we would size the test to whichever is larger: the doubled historical peak, or today’s peak plus the new members’ expected flow with a margin on top. Each new member should run as its own session with its own limits, so that per-member limit state, credit checks and message throttles are actually exercised. Spreading the same load across existing accounts does not do that. Shape matters as much as volume. Latency tails are caused by bursts, so a system that looks fast at the median can be slow exactly when the market is busiest. The load should reproduce the open, auction transitions and correlated bursts, not a flat message rate.
Synthetic load maximises code coverage but gives poor state coverage, according to Google’s SRE guidance, and it can miss regressions that only appear in real traffic patterns. We would run synthetic 2x load and replayed stressed days side by side, and inject the labelled bad orders into both. A check that is correct at idle but takes a degraded path under load is exactly the failure this test is meant to find. One concrete assertion: under message pressure, throttles should never reject an order cancellation. Added latency under load is the other output of this run, and it is judged against a budget that is specific to the venue and the desk.
How much latency can pre-trade checks add, and how do you make them faster without weakening them?
RTS 6 does not set the number: it says nothing about how fast a system must be, only how it must behave. The budget is the largest added delay your desks will accept, set by the firm, written down and divided between components, and the checks have to fit inside it at full coverage.
Where a scoring model sits in the order path, TechnoLynx cuts its inference latency through the Inference Cost-Cut Pack, starting with an audit of that workload.
One architecture guide gives an example 10 ms end-to-end budget with 0.1 ms set aside for the risk check, and recommends running latency benchmarks on every build in CI to catch regressions. The same guide suggests algorithmic systems should finish pre-trade checks in under 100 microseconds. Treat both as one author’s design targets, not measurements. The guide’s own advice is to design for your actual latency requirement rather than a theoretical maximum. CI timing needs care: an interpreted engine timed on a shared CI runner measures the runner.
Report the median, the 95th and 99th percentiles, the maximum and the jitter, not the mean. Measure each stage separately, so you can tell whether the time goes into your software, your gateway or the network and venue. Hardware timestamps on the network card exclude operating-system jitter, which makes them the reliable measurement point.
Getting faster means changing how the checks are implemented, not removing them. Risk checks that can be disabled under time pressure, or that apply only to some order types, are essentially no controls at all. The levers we would reach for are these:
- Keep limit and position state in memory owned by the gateway process, so the order path never makes a remote call.
- Precompute per-instrument parameters such as collars and ADV-derived limits off the order path.
- Evaluate independent checks in a single pass, without locks or allocations.
- Move to hardware offload only when the software floor is reached.
If the optimised checks fit the budget at full coverage, ship them. If they do not, invest in acceleration. Reduce check scope only as a last resort, with an explicit risk sign-off and a retest, because ESMA lists changes to risk-control thresholds and logic as retesting triggers. Record the desk’s tolerated budget as an agreed, written number.
ESMA says firms should consider risks from AI-generated trading signals when designing pre-trade controls. One practitioner guide argues that a model should be treated as an untrusted order source and pass through the same deterministic checks as any other order. If a scoring model does sit in the order path, its inference latency is part of the budget. Where a hardware choice is involved, LynxBenchAI’s published results measure the candidate accelerators (it measures devices, not your gateway).
Who can help us make pre-trade checks faster without weakening what they catch?
TechnoLynx engineers and evidences faster pre-trade checks for firms whose budget is missed when nobody can say which check is responsible. When choosing a partner, ask how they will prove that coverage is unchanged, not only how much faster the checks will be. An engagement starts by scoping the latency breakdown against your desk budget. Where inference sits in the path, the Inference Cost-Cut Pack is the catalogue route.
That work does not suit every need. We engineer and evidence the checks. Our wider work with trading and risk teams is described under AI engineering for finance. For those, the routes are your risk management function and internal audit. Venue conformance programmes cover the exchange-facing interface.
What evidence of pre-trade control testing satisfies a board and institutional market makers?
We recommend giving a board one document with three layers: an article-by-article mapping to RTS 6 at the top, a traceability matrix linking each control to its test case and result underneath, and the run artefacts beneath that. The format is up to you. The Dutch AFM noted that no format is prescribed for RTS 6 self-assessments. ESMA expects the self-assessment to go article by article, say whether the firm considers itself compliant with each, and give a clear rationale. It places primary responsibility for the self-assessment in the risk management function, with internal audit review where applicable. When the FCA reviewed firms, it looked at the self-assessment, the validation report and the evidence behind the conclusions.
The question “pass/fail per control, a traceability matrix, or an RTS 6 mapping?” offers three options that are really nested parts of one document. Pass/fail is a column, the matrix is the structure, and the mapping is the index. A risk control matrix typically holds risks, controls, owners, frequency, testing procedures, evidence requirements, test results, findings and remediation. Its value is that a reviewer can start from a control and reach the evidence without searching through unrelated folders and email threads.
Evidence pack layout: a control-to-test-to-result matrix
| Control | Requirement mapped | Test case | Expected outcome | Observed outcome | Result | Evidence reference |
|---|---|---|---|---|---|---|
| Price collar | RTS 6 Art. 15(1)(a) | Order outside collar, per instrument | Reject, collar rule id | From run log | Pass / Fail | Run id, log extract |
| Maximum message limit | RTS 6 Art. 15(1)(d) | Burst above limit inside the window; cancels still accepted | Throttle new orders, accept cancels | From run log | Pass / Fail | Run id, rate trace |
| Position limit with working orders | Firm limit policy | Partial fill then breaching order | Reject, counting working orders | From run log | Pass / Fail | Run id, state snapshot |
The first two rows follow RTS 6 Article 15. The rows are examples, not all five Article 15 controls, and the layout is our recommended structure.
The FCA saw processes and decisions so poorly documented that firms struggled to show their sign-off procedures were robust. Knight’s compliance assessment mostly inventoried existing controls and confirmed they worked, without considering what a malfunction of its router could do. An inventory confirms only that the listed controls exist. A matrix whose rows come from failure scenarios shows what the controls actually catch. Under Rule 15c3-5 the chief executive must certify the controls every year.
RTS 6 sets organisational requirements for investment firms that trade algorithmically. A crypto venue outside its scope can still use its structure. Align voluntarily, and label it clearly as voluntary alignment, never as a compliance status. Add rows for risks with no RTS 6 equivalent. Continuous trading with no natural day boundary for limit resets is one example. Generate the matrix from test runs, not by hand, so it stays current as controls change. One consultancy’s template guidance recommends automating the data capture behind the annual report for the same reason. An automated pack is only as trustworthy as the tests feeding it.
How do we cut over to a new risk gateway without downtime, and roll back if it fails?
Run the old and new gateways in parallel. Certify the new one under doubled load before it takes real flow, move traffic by blue-green, canary or a hybrid of the two, and keep a rollback you have already rehearsed.
TechnoLynx engineers the cutover to a certified gateway with a rehearsed rollback, starting by defining cutover success criteria and the doubled-load scenarios.
There is precedent from the exchange side. For its Pillar migration, NYSE made gateway certification mandatory, kept the legacy and new gateways in production in parallel, and ran historical order flow through the new gateway adapter to report the orders that would now be rejected. For a risk gateway, the equivalent is shadow mode: copy live flow to the new gateway and compare its accept and reject decisions with the old one’s before it decides anything. Google’s SRE guidance warns that copied traffic can interact with production through shared state, such as a shared cache.
Choosing between blue-green, canary and hybrid
| Situation | Strategy | Reason |
|---|---|---|
| Two full environments are easy to maintain | Blue-green | Parallel capacity gives a ready fallback |
| Infrastructure duplication is constrained | Canary | A smaller parallel release needs less extra capacity |
| Customer impact is severe and gradual validation matters | Hybrid | Canary limits exposure while blue-green keeps a direct fallback |
| No reliable routing or observability exists | Neither yet | Improve traffic control and monitoring first |
The matrix above follows a 2026 deployment guide from ONES. Put simply, pick blue-green if a long recovery is the worst outcome, and canary if the worst outcome is a bad release reaching everyone.
Risk gateways add a constraint: credit and capital limits are aggregate. The SEC accepts aggregate credit limits split into sub-limits across venues, but only if each part assumes the customer has already reached the maximum everywhere else. A canary that splits one member’s orders across two gateways creates the same problem. We would canary whole accounts or members, not a random share of orders, so each limit is enforced by exactly one gateway. State has to survive a rollback. Canary requires the old and new versions to run against the same schema for the whole rollout, and blue-green rollback fails if green wrote something blue cannot read. For a gateway, that covers limit configuration, position and working-order snapshots, and session sequence numbers.
Rehearse the rollback before release. Confirm that routing, health checks and alerts behave, that one action removes a canary from every segment, and that the blue-green fallback is still ready. RTS 6 also expects controlled deployment: cautious limits on instruments, price, value and number of orders, positions and markets, with more intensive monitoring. Verify the deployment itself as well. During Knight’s staged rollout, a technician did not copy new code to one of eight servers, no second technician reviewed the deployment, and no written procedure required one. Over 45 minutes the firm’s router sent millions of orders, built positions of about US$3.5bn long and US$3.15bn short, and lost over US$460m. A cutover runbook should check that every node is running the certified version before any traffic moves.
Blue-green uses the same mechanism as a hot standby, so every release also tests your disaster-recovery procedure. For the gateway that becomes your failover path, validating failover and handback logic end to end covers the switch back as well as the switch over. Testing the kill switch without taking the live system offline is a separate exercise again.
The control you have not listed is the one that fails
The worked example and the Knight case share a pattern. Neither firm was missing controls altogether. What failed was a control that should have existed, a threshold left raised, a deployment step nobody checked, and a flow nobody tested end to end. That is why the evidence pack’s rows should come from the requirement and from failure scenarios, and why the false-negative rate needs labels written before the run.
One uncertainty remains: we would not rely on a stress test to catch a race between a check reading limit state and a fill updating it. Our practical answer is hardware timestamps on both events in production, and a replay process that can find the race after the fact.