RobustnessIntermediate25 min read

When several robots fail together: model shared execution errors

Build execution-error simulations around common causes, duration and recovery instead of independent random penalties on completed trades.

Several desk lamps connected to a single shared power strip on a cream workbench
Conceptual image: separate devices can depend on one common connection.

The strategies were different; the connection was shared

Imagine ten research robots with different rules. Their signals occur at different times, their individual histories look distinct and their developer has carefully avoided identical parameter settings. Then a shared connection stops delivering updates. Several robots now act on stale information or cannot reconcile their intended state with the account. The diversity of their signal rules has not protected the shared operational dependency.

This fictional example separates two kinds of dependence. Return dependence concerns how strategy outcomes relate under market conditions. Operational dependence concerns how common infrastructure, data or control failures affect several systems. They can interact, but they are not the same object. Different strategies can share the same failure mechanism. A simulation that adds independent random penalties to every trade may miss that mechanism even if it runs millions of repetitions.

The article develops a research framework for Monte Carlo experiments with correlated execution errors. The purpose is defensive analysis: identify dependencies, represent faults transparently and study how the policy responds. All numerical probabilities and losses are hypothetical. They are not measured reliability estimates for TradeAndRoll robots, brokers or infrastructure, and they are not instructions to operate an account.

Monte Carlo is a way to propagate assumptions through a model. It does not discover the assumptions for us. A large number of simulated paths can make an answer numerically stable while leaving the underlying fault model unrealistic. The useful starting point is therefore a causal description of what can fail together, how long the fault lasts and what evidence exists about its consequences.

Begin with a dependency map rather than a penalty distribution

List the resources shared by the systems. They may include a price source, clock, process, network connection, account, configuration file or reconciliation mechanism. A component that appears separate in the strategy catalogue may still rely on the same resource as every other component. The map should connect each system to the resources whose behavior can alter its observations or execution state.

Next distinguish faults that originate at different levels. A system-specific calculation error may affect one strategy. A shared data interruption may affect all systems using a feed. An account-level constraint may affect several systems even if their individual processes remain healthy. The simulation needs a place for each level rather than forcing every event into an identical per-trade error probability.

The economic effect also depends on exposure. A disconnected system with no open position and no intended action may experience no immediate profit change. Another system may miss a state update while holding exposure. A third may be waiting for confirmation of an earlier action. A shared fault does not imply an identical loss for every robot. The model should trace consequences through each system’s actual state under the scenario.

Preserve the distinction between an external event and an internal response. The connection interruption is one event; the policy’s decision to pause, retry or wait is another part of the model. If the response differs between implementations, the same fault can produce different paths. Treating every interruption as a fixed dollar penalty would erase precisely the behavior the investigation should examine.

Map the common cause before drawing its financial consequence. A simple dependency diagram can be more informative than a histogram of arbitrary penalties. It tells the researcher which failures deserve joint treatment and which observations would help estimate their frequency, duration or severity. It also exposes gaps that a strategy-only backtest was never intended to cover.

Three separate strategy processes share a data feed, clock and account reconciliation layer
Conceptual dependency map. Strategy diversity does not remove shared data and account dependencies.

Same marginal failure rate, very different joint outcomes

Consider two deliberately extreme hypothetical models with ten systems. In the first, each system independently experiences a fault on a given evaluation day with probability 2%. In the second, a shared event occurs with probability 2% and affects all ten systems together; otherwise none is affected. Each individual system has the same 2% marginal fault probability in both models.

The expected number of affected systems is also the same: ten times 0.02, or 0.2 systems per evaluation day. If every affected system is assigned a purely illustrative USD 100 loss and there are no other effects, the expected assigned loss is USD 20 in both models. Looking only at the mean would therefore fail to distinguish these very different assumptions about concentration.

Under independence, the probability of at least one affected system is one minus 0.98 raised to the tenth power, approximately 18.29%. The probability that all ten are affected is 0.02 raised to the tenth power. Under the shared-event model, both the probability of at least one and the probability of all ten are 2%. Faults are less frequent as portfolio events in the second construction, but they are completely concentrated when they occur.

Equal marginal probabilities do not determine the portfolio tail. The models have identical individual fault rates and expected assigned losses, yet very different distributions of the number affected. Neither model is asserted to be realistic. They are limiting teaching examples that make the dependence assumption impossible to overlook.

The USD 100 penalty is intentionally artificial. In a serious study, the consequence would depend on positions, market movement, costs, state and recovery. The example isolates joint occurrence before introducing those complications. It also explains why a simulation report should show more than the average loss: the count affected, clustering, durations and conditional severity can reveal structures that the mean conceals.

Independent and shared-event hypothetical models both have 2 percent fault probability per system and 20 dollars expected assigned loss, but shared events affect all ten together
Hypothetical limiting models. Matching individual rates does not match joint concentration or severe-event probability.

A public incident illustrates the mechanism, not its probability

The SEC’s account of Knight Capital’s August 2012 incident describes a software deployment problem that generated erroneous activity and losses exceeding USD 460 million. It is a documented example of an operational defect propagating through an automated process. It is not evidence that a small research portfolio has the same architecture or risk. SEC: Knight Capital enforcement release.

The associated SEC order provides the primary record behind the case. SEC administrative order. The useful methodological lesson is to investigate common causes and controls. A single prominent incident does not estimate a general annual probability, a typical loss size or a distribution that can be pasted into a Monte Carlo model.

Public cases can improve a scenario inventory by revealing categories of failure that an abstract return simulation omits. They should not become dramatic decorations used to justify arbitrary parameters. For each borrowed scenario idea, state which mechanism is relevant to the system being studied and which features of the public incident do not transfer. The closer the mechanism is to the actual dependency map, the more useful the analogy becomes.

A documented event can motivate a question without calibrating a model. If the project lacks evidence about frequency, use a clearly labelled sensitivity range or deterministic stress. If duration is uncertain, explore several durations separately. A scenario can be informative without pretending to be a statistically estimated forecast of operational losses.

This discipline also prevents the opposite mistake: dismissing every shared failure because a famous incident involved a much larger firm. Scale matters for consequences, but a common dependency can exist at many scales. The task is to inspect the actual design and its controls, not to assume that either institutional size or a small number of systems settles the question.

Represent duration and recovery as states

A fault is often more than a single independent instant. A connection can remain unavailable, a data stream can stay stale and an account discrepancy can persist until reconciliation. Sampling a fresh independent penalty for every trade may spread the effect across time in a way that the underlying mechanism would not. Represent the fault’s start, duration and transition back to a known state.

A minimal conceptual model can distinguish healthy operation, degraded observations, suspended decisions, reconciliation and resumed operation. These labels are not a universal implementation design; they help the researcher specify what the simulated policy knows and permits at each stage. The transition rules should be explicit, including the evidence required before the model treats its account state as reliable again.

Consider a hypothetical interruption that lasts three observation intervals. If several candidate actions occur during those intervals, they share the same event. They are not three independent interruptions merely because the log has three rows. Conversely, a long interruption during a period of no exposure may have different economic consequences from a brief interruption during an active state. Duration and exposure must meet in the simulation.

Recovery can matter as much as the interruption itself. A policy may need to reconcile which intended actions actually occurred before deciding what to do next. Assuming an immediate clean reset can omit uncertainty that persists after data delivery resumes. The model should describe how unresolved states are handled rather than automatically restoring the ideal baseline at the first new quote.

Restored connectivity is not the same as restored knowledge of the account. This distinction helps identify what a historical trade list cannot reconstruct. A list of completed trades may show final outcomes while omitting the intermediate state uncertainty. If those details are unavailable, preserve the limitation or construct explicit hypothetical states instead of claiming that the archive fully represents recovery behavior.

Draw the event first, then calculate its impact

A coherent simulation can begin with a shared scenario state for the environment. It then determines which dependencies are affected, which systems use them, which positions or candidate actions exist and how the policy responds. Financial consequences are calculated from the resulting path under the declared assumptions. This order keeps a common cause common instead of rediscovering it independently for every trade.

For example, the model might impose a hypothetical delay in recognizing a scheduled exit. A long position of 10,000 base units in a dollar-quoted pair would have exited at 1.1000 under the baseline convention, but the delayed scenario values its exit at 1.0980. The difference is negative USD 20 before additional costs. This arithmetic describes the specified two prices and quantity; it does not establish that either execution would have been available in a real event.

If several systems share the delay, calculate their consequences from their own positions and prices. A flat system may have zero immediate market effect. A position in the opposite direction may respond differently. A system whose intended action never became an execution may require a separate counterfactual treatment. Do not translate one common event into a copied penalty unless that simplification is intentional.

The model also needs to avoid double counting. If the delayed price already includes the movement during the interruption, an additional generic “delay loss” based on the same movement would count it twice. Separate price-path effects, explicit transaction costs and other adjustments. Reconcile the scenario account result to the component changes under the chosen convention.

Finally, preserve a baseline with the same market path and clearly defined normal operation. Comparing a fault scenario with a different favorable market history would mix operational effects with market variation. The baseline is not a promise of perfect execution; it is a specified reference against which the imposed fault’s consequences can be understood. Its own assumptions should remain visible in the report.

Separate frequency, duration and conditional severity

An operational risk model contains several questions that a single error percentage cannot answer. How often does a relevant event begin? How long does it persist? Which systems are exposed while it persists? How does their state translate the event into an economic consequence? Each question may require different data, and uncertainty in one should not be hidden by precision in another.

An event log can help describe frequency and duration, but its coverage matters. A log collected only during attended sessions may miss unattended interruptions. An alert that records every stale quote can produce many rows for one underlying outage. Before estimating a rate, define an event and the observation period over which it could have been detected. The denominator is part of the estimate.

Conditional severity may depend on the market path. A delay during a stable interval can have a different consequence from the same delay during a sharp move. It may also depend on quantity, direction and the policy’s response. Sampling a severity independently from all these variables is a simplification that should be justified or stressed, not treated as an automatic property of Monte Carlo.

Do not manufacture precision by multiplying uncertain inputs. A frequency estimated from limited logs and a severity borrowed from an unrelated example do not become a reliable annual loss forecast because their product has two decimal places. Report which inputs are measured, reconstructed or hypothetical. Where a frequency is not defensible, a conditional scenario can still answer what the system would do if the event occurred.

A useful sensitivity study varies one layer at a time before combining them. Hold the event mechanism fixed while changing duration, then inspect different exposure states, then examine a joint adverse combination. This sequence helps identify what drives the result. It also avoids presenting a complicated simulation whose most influential assumption is buried in a default parameter that nobody reviewed.

Market stress and operational stress may share a trigger

Operational events need not arrive uniformly across the calendar. A period of unusually high activity can increase the demands on data handling or reconciliation. A common external event may coincide with large price moves and more candidate actions. Whether that relationship exists in the intended environment requires evidence, but assuming independence by default can conceal a consequential modelling choice.

Create separate scenario families for independent timing and condition-linked timing. In the first, the hypothetical fault time is sampled independently of the chosen market state. In the second, its occurrence or duration is explicitly conditioned on a stated activity measure. Keep the marginal assumptions visible so that differences are attributable to the relationship being changed rather than to an unnoticed increase in overall fault frequency.

For example, one diagnostic can preserve a fixed number of imposed interruptions while moving them from quiet intervals to predefined active intervals. That does not estimate the true probability of an activity-linked outage. It asks how sensitive the policy is to that placement. If the result changes materially, the next research question concerns the actual relationship between activity and observed faults.

A joint adverse scenario is not automatically a likely scenario. The report should distinguish a deliberate concentration stress from an empirically estimated dependence model. It can be useful to test whether a control still behaves coherently under a difficult combination even when the combination’s probability is unknown. The conclusion should remain conditional rather than becoming a frequency claim.

This is also where market and operational models meet. A price path can change signals and quantities, which changes the state exposed to the fault. Reusing an unchanged trade list may be appropriate for a narrow accounting diagnostic, but a full policy experiment must recompute the decisions affected by the changed environment. State clearly which level of simulation was performed and what behavior was held fixed.

Validate the simulator with cases that have known answers

Before generating thousands of paths, construct small artificial cases. With no fault events, the scenario engine should reproduce its declared baseline. With no position and no intended action, a data interruption should not create a market loss unless the model explicitly includes another cost mechanism. A duplicated log record should not become a second independent outage. These checks target implementation consistency, not the realism of the underlying probabilities.

The two limiting models provide another useful check. With ten independent Bernoulli faults at probability 0.02, the simulated mean count should approach 0.2 as repetitions increase. With a shared Bernoulli event at the same probability, affected counts should be either zero or ten, never intermediate values under that deliberately simplified construction. The empirical frequency will fluctuate in finite simulations; exact agreement in every small run is not expected.

Test state transitions separately from financial arithmetic. An unresolved account state should follow the declared reconciliation route. The model should not silently resume ordinary decisions simply because a timeout elapsed unless that is the policy being evaluated. If a repair changes the rule, record the version. A simulator that ignores its own state rules can produce precise answers to the wrong experiment.

Reconcile each path’s account changes. Price effects, costs and any explicit adjustments should explain the difference from the baseline under the chosen convention. Preserve a small sample of complete event traces for inspection. Summary quantiles can hide impossible transitions that are obvious when the researcher reads a single path chronologically.

The checks should include boundary cases: a fault beginning just before an intended action, ending just after a valuation boundary or overlapping a second fault. The correct behavior depends on the specified model, so the purpose is to make that behavior explicit and reproducible. It is not to invent an ideal response after seeing which path produces the best financial result.

A conceptual state sequence distinguishes healthy operation, degraded observations, suspended decisions, reconciliation and resumed operation
The transition rules are part of the model. A new quote alone does not necessarily resolve an uncertain account state.

More simulation reduces numerical noise, not ignorance

Increasing the number of Monte Carlo repetitions can reduce numerical uncertainty in estimates under the chosen model. It does not repair an incorrect dependency map, an unsupported event rate or an unrealistic recovery rule. A million repetitions of the wrong mechanism can be more visually convincing than a hundred, while remaining equally irrelevant to the intended system.

Report simulation size and variability of the estimates where they matter. Rare scenario outcomes can be difficult to estimate precisely with a modest number of repetitions. If no severe event appears in a run, the correct conclusion is that none appeared in that run under that generator, not that the event is impossible. The distinction between a simulated absence and a structural impossibility should remain explicit.

There are at least two uncertainty layers to preserve. One is numerical variation from the finite simulation. The other concerns the input model and parameters. Repeating the same model with different random draws addresses the first. Exploring defensible alternative mechanisms, durations or dependencies addresses the second. A narrow Monte Carlo error bar does not imply a well-known real-world risk.

Use deterministic scenarios alongside random simulation when they answer a specific control question. A deliberately imposed shared interruption during an exposed state can reveal an impossible transition even if a random run rarely samples that situation. It does not need an estimated probability to serve as an engineering test. Its report should identify the imposed conditions and avoid converting the observed consequence into a probabilistic forecast.

Store the generator configuration and reproducibility information with the results. The important record is not just a random seed; it includes the model version, fault definitions, input paths and response rules. A seed cannot reproduce an analysis whose implementation or data have changed without being tracked. Keep the distinction between reproducible computation and validated assumptions clear.

A deterministic defect is not necessarily a random coin flip

Some operational failures are intermittent environmental events. Others are deterministic consequences of a particular configuration, input or implementation defect. Treating every possible bug as an independent coin flip on each trade can misrepresent both its persistence and the way it affects several systems. If a specific input always triggers a known defect, the relevant test should reproduce that input and verify the resulting behavior.

A probability in such a model may describe uncertainty about encountering the trigger, uncertainty about which configuration is present or an imposed mixture of scenarios. Those interpretations differ. State what the random draw represents. It should not be a decorative source of noise added because the analysis is called Monte Carlo. A deterministic test can be the clearest way to study a mechanism whose activation conditions are known.

For example, imagine a purely hypothetical configuration mismatch that affects every system using the same account convention. The model should not independently decide that only some of those identical dependencies notice the mismatch unless there is a reason for that difference. It can instead define alternative configuration scenarios and evaluate all affected systems consistently within each. The uncertainty then concerns the scenario selection, while the consequences follow from the specified configuration and state.

This distinction helps organize evidence collection. Event logs may inform the arrival rate of an intermittent interruption. Code inspection and controlled tests may establish whether a deterministic defect exists under a given input. Historical trade returns alone may establish neither. Choosing the right evidence source can be more valuable than refining the simulated probability to another decimal place.

Keep confirmed defects separate from speculative scenario categories. A hypothetical fault used for defensive testing is not a claim that the supplied system contains that defect. Conversely, a reproducible defect should not be diluted into a small arbitrary probability simply because most historical trades happened not to trigger it. The model should preserve what is known, what is conditional and what remains uncertain.

Evaluate a proposed control as a policy change

A shared-fault study may suggest a control, such as a stricter freshness requirement or a reconciliation condition before resuming decisions. Adding that control changes the policy. Its effects can include fewer uncertain actions, more missed opportunities, longer pauses and different exposure paths. A useful evaluation describes those effects rather than assuming that a control has only benefits.

Specify the candidate control before comparing scenarios. Preserve the baseline rule, the revised rule and the fault scenarios used to evaluate them. The comparison should use a common set of declared environments where feasible, so that a change in outcome can be traced to the policy rather than an unrelated change in market conditions. This is a research comparison, not a direction to alter an operating account automatically.

Measure operational outcomes as well as money. Time spent in an unresolved state, number of actions attempted with stale information and frequency of successful reconciliation can be informative about the mechanism. A favorable profit difference in one hypothetical path does not necessarily mean that the revised control is better designed. Control quality cannot be reduced to the luckiest simulated profit.

Include scenarios in which the control activates unnecessarily or remains active longer than intended. These cases reveal the cost of conservative behavior and the importance of a clear recovery rule. A policy that never resumes might avoid some execution errors while failing to perform the task for which it was designed. The evaluation should make that tradeoff visible rather than hiding inactivity as a zero-loss success.

Keep the research result separate from deployment. A promising simulated control still needs implementation review and testing appropriate to the target environment. The model may omit details that matter operationally. The value of the simulation is to sharpen the questions and expose failure mechanisms, not to certify that an implementation is ready for unrestricted use.

Report the mechanism before the headline percentile

A good report opens with the dependency being studied and the question the simulation answers. Then it identifies the event definitions, probabilities or imposed scenarios, durations, affected states and recovery behavior. Only after those assumptions are clear should it present distributions of financial and operational outcomes. This order lets a reader judge whether the headline statistic refers to a meaningful experiment.

Show the number of systems affected and event duration alongside portfolio consequences. A single loss percentile can conceal whether the result comes from frequent small errors, rare shared failures or a few long unresolved states. These mechanisms suggest different follow-up work. The report should preserve enough detail to distinguish them without overwhelming the reader with every simulated trace.

Label model outputs as model outputs. An assumed 2% event probability is not an observed reliability rate. An imposed price during a delayed exit is not a recorded fill. A simulation-derived loss range is conditional on the generator and policy. Clear provenance makes the analysis useful because future evidence can replace assumptions without pretending that the earlier model already knew the answer.

Document exclusions as well. If the experiment covers data interruption but not account-level constraints, say so. If it studies fixed positions rather than a full strategy replay, state that scope. Specific boundaries are more informative than a generic statement that all models are imperfect. They tell the next researcher what remains outside the experiment and where an additional test would add value.

A simulation record separates observed dependencies, assumed fault scenarios, policy responses and calculated consequences
Keep provenance visible from dependency to consequence. Simulation precision does not replace evidence for the assumptions.

Start with one shared dependency you can explain

Choose a single dependency used by several systems and draw its connection to their state. Write one deterministic fault scenario before adding randomness. Explain when the fault begins, which observations become unavailable, what decisions are permitted and what establishes recovery. Then calculate a small artificial example by hand so the simulation has a known result to reproduce.

An AI assistant can help identify missing states, inspect event traces and generate defensive test cases. Ask it to distinguish event frequency from the number of affected log rows and to preserve common causes across systems. Require every invented parameter to be labelled. A large generated simulation script is not evidence that the underlying mechanism has been understood or measured.

The TradeAndRoll free demo provides ten Forex systems with rules, source code, market CSVs and research prompts. Those materials can support investigation of shared assumptions and the execution adaptations required by a chosen environment. They do not include a measured reliability guarantee for every infrastructure arrangement. The code is a starting point for inspection, and the operational model should reflect what the researcher can actually verify.

Ten different rule sets can still depend on one shared connection. A useful Monte Carlo study respects that fact by modelling causes, states and recovery before assigning financial consequences. The result is a clearer research question: which common failures matter, what evidence supports their representation and how does the proposed policy behave when several systems encounter them together?

Back to the Blog