Artificial intelligenceIntermediate27 min read

A convincing model explanation can still identify the wrong cause

Separate model calculations, predictive associations and causal interventions using worked examples of execution costs, confounding and model counterfactuals.

A wooden object in warm sunlight casts a long shadow with a different-looking shape on a cream wall
Conceptual photograph: a visible pattern can reveal something about its source without being the source itself.

The prediction became cheaper. The execution did not.

Clara is inspecting a hypothetical model that forecasts execution cost. A local explanation assigns a large positive contribution to a spread descriptor. She changes that input in a copy of the observation, runs the model again and obtains a lower predicted cost. The demonstration is persuasive: change the feature, improve the output. But no order has been executed, no broker condition has changed and no evidence yet shows that the proposed real-world action would reduce cost.

The calculation may be entirely correct. What is missing is the bridge from changing a model input to changing the process that produces the actual outcome. Explaining a calculation, predicting an outcome and estimating an intervention are different tasks. They can inform one another, but the evidence required for each is not interchangeable. An explanation tool does not silently supply the assumptions needed to cross those boundaries.

All examples in this article are hypothetical. The costs, counts and mechanisms are invented to make the reasoning auditable; they are not observed TradeAndRoll results or claims about a particular broker. Clara wants to write conclusions that remain true when someone acts on them. Her first improvement is linguistic: she replaces “this feature causes the cost” with a precise description of what the analysis actually established.

The SHAP documentation on predictive models and causal insights explicitly distinguishes explaining predictive relationships from identifying effects of changing behavior. That distinction is our starting point. The rest of the article develops original examples and a practical review process for research material, including how to ask an AI assistant for a useful explanation without inviting it to invent a market mechanism.

Three questions that sound similar in ordinary language

The first question is computational: why did this saved model produce this numerical output for this input? It can often be answered by tracing transformations, coefficients, branches and reference values. The object being explained is software behavior. A successful answer reconciles the output and identifies which parts of the calculation contributed under the chosen explanation method.

The second question is predictive: among observations with these recorded characteristics, what outcome tends to follow under the studied data-generating conditions? This requires an appropriate evaluation population and a prediction assessment. The answer can be useful even when the features are proxies rather than causes. A clock can help anticipate a scheduled event without causing the event itself.

The third question is interventional: what would happen if a specified actor changed a specified decision while the rest of the relevant process evolved according to a declared model? That question needs a meaningful action, a comparison and assumptions connecting the action to the outcome. It cannot be answered merely by editing a spreadsheet cell if the cell is a measurement of something the actor cannot manipulate independently.

Write the intended claim before choosing the chart. Clara keeps one sentence for each question in her report. This stops a contribution plot from being introduced as a computational explanation and then summarized as a recommendation to alter the market. It also makes missing evidence visible: she may have a reproducible model trace and a good predictive evaluation while still lacking an identified intervention effect.

A perfect predictor can be only a proxy

Consider a deliberately simple invented mechanism with a binary condition U. When U is zero, a recorded spread descriptor S equals one and execution cost Y equals one. When U is one, S equals three and Y equals five. In equations, S = 1 + 2U and Y = 1 + 4U. There is no noise in this teaching construction, so a predictor Y = 2S − 1 reproduces every observed outcome exactly.

The predictor’s explanation can correctly say that a higher S raises its output. But in the declared mechanism, S is a measurement associated with U; it is not an input to the equation generating Y. If Clara overwrites the recorded S from three to one while leaving U unchanged at one, the model output falls from five to one, while the mechanism’s actual Y remains five. The edited record and the underlying process now disagree.

This example does not claim that real spreads never affect real execution costs. They often enter trading calculations directly. Its purpose is narrower: a predictive relationship alone does not determine the causal structure. A different hypothetical mechanism could generate the same observed pairs with S directly affecting Y. Distinguishing those mechanisms requires information beyond the fitted association in this tiny dataset.

Perfect prediction does not identify the effect of manipulation. Clara therefore asks whether a proposed change affects a recorded measurement, a controllable decision or the underlying condition. Those are different interventions. An assistant that lowers a model score by changing a proxy has solved a numerical task; it has not necessarily discovered a practical way to improve the outcome.

Hypothetical mechanism: U zero produces S one and Y one; U one produces S three and Y five; editing S alone changes prediction but leaves Y five
Invented mechanism with a perfect predictive proxy. Editing the recorded descriptor does not change the condition generating the outcome.

The proposed action needs an actor and a time

“Reduce volatility” is not a complete action available to a trader. “Do not submit this order while the measured volatility exceeds a declared threshold” is a possible policy rule. The first sounds like manipulating the market; the second changes which decisions the trader takes. Their outcomes and comparisons differ. Clara insists on describing the actual action before estimating its consequences.

She specifies the actor, the decision time, the available information, the allowed alternatives and the outcome horizon. For example, an execution-routing experiment might compare two routes for eligible orders, with a defined size range and cost measured over a fixed execution window. This does not guarantee identification, but it produces a question that can be examined. “Improve the system using the important features” does not.

The comparison also needs a target population. An effect among small orders in one sampled session need not describe larger orders or other sessions. Clara avoids turning a narrow result into a universal policy claim. She records eligibility and exclusions before looking at outcomes, because changing the population afterward can change the question while leaving the headline wording unchanged.

A decision rule is different from changing a feature value. A rule that avoids certain conditions can alter exposure, opportunity count, holding periods and costs. Its evaluation must include those changes. Showing that the model predicts lower costs on the retained subset is not enough to establish that the overall policy improves the objective the user actually cares about.

There is a particularly useful distinction when working with supplied source code. Clara can intervene directly on a software parameter, such as a filter threshold, and replay the program under a fixed simulation convention. The resulting difference establishes how that implementation behaves under the specified replay. It does not by itself establish the effect of changing the same parameter in a future live environment. The intervention on software is real and inspectable; the transfer of its simulated consequences is a separate claim.

She therefore keeps two descriptions side by side. The implementation description says which rule changed, which inputs stayed fixed and which candidate decisions changed. The outcome description says how fills and costs were reconstructed and what assumptions connect changed decisions to rewards. If a candidate disappears after tightening a filter, that is directly verifiable in the program trace. The profit that would have followed a retained or rejected candidate may still depend on execution assumptions.

This separation prevents another common mistake: interpreting a filter’s historical effect as proof that its underlying indicator causes favorable market movement. A filter may select observations associated with a different outcome distribution without manipulating that distribution. It can still be studied as a policy choice. The causal question then concerns the policy’s consequences under specified conditions, not whether the indicator itself moves the market.

Clara also records what happens to interactions with other rules. Removing one entry may free capacity for another, alter subsequent inventory or change whether a portfolio limit activates. A replay that merely subtracts the removed trade’s profit can miss those downstream effects. If the intended intervention changes the system’s decision sequence, the evaluation should reconstruct that sequence or state why a simpler calculation is adequate. The explanation becomes more useful when it names these dependencies explicitly rather than hiding them behind a single before-and-after total.

Confounding can make the wrong comparison look decisive

Use a second invented example with two execution routes, A and B, and two observed conditions, quiet and busy. In quiet conditions, route A costs one unit and route B costs two. In busy conditions, A costs five and B costs six. We define this toy mechanism so B adds one unit within either condition. This is a declared property of the example, not an estimated fact about real routing.

Now suppose the historical archive contains eighty quiet A orders and twenty busy A orders. It also contains twenty quiet B orders and eighty busy B orders. Each route has one hundred observations. Route A’s total cost is eighty times one plus twenty times five, or 180; its average is 1.8. Route B’s total is twenty times two plus eighty times six, or 520; its average is 5.2.

The raw difference is 3.4 units, even though the declared within-condition route difference is one. Route B was used more often in the expensive condition. The aggregate comparison mixes the route difference with a difference in context composition. A model explanation that attributes the association to route B may describe a useful predictive pattern while overstating the effect of switching routes.

The selection process belongs in the explanation of the evidence. Clara asks why each route was chosen and which variables influenced that choice. If the busy condition is recorded accurately and the example’s mechanism is accepted, comparisons within conditions recover the one-unit difference. In real data, whether the recorded variables are sufficient is an assumption to examine, not a fact established by matching sample sizes.

Hypothetical route A has eighty quiet and twenty busy observations with average cost 1.8; route B has twenty quiet and eighty busy with average 5.2, despite one-unit differences within each condition
Different context mixtures inflate the raw route comparison from the declared one-unit within-condition difference to 3.4 units.

Clara can make the composition issue visible by standardizing both routes to a declared fifty-fifty mixture of quiet and busy conditions. Under the toy table, route A then averages half of one plus half of five, or three units. Route B averages half of two plus half of six, or four units. The standardized difference is one. This calculation does not discover the mechanism; the mechanism was supplied when the example was defined. It demonstrates how the comparison changes when both routes are summarized over the same context mixture.

If the intended future population were instead eighty percent quiet and twenty percent busy, the corresponding standardized averages would be 1.8 and 2.8. The difference remains one only because our invented route effect is constant across the two conditions. A different hypothetical mechanism could have different route effects in quiet and busy periods, in which case the target population would also change the average effect. Clara therefore records the target mixture rather than treating an adjusted average as a property of the route that applies everywhere.

The distinction between adjusting the comparison and changing the population matters operationally. Choosing route A for orders that would otherwise use B does not necessarily convert busy orders into quiet orders. Delaying orders until a quiet period is another intervention, with different prices, missed opportunities and timing consequences. A report that combines these actions under the phrase reduce execution cost leaves the actual decision unclear. Clara keeps route choice and timing choice separate, even when both appear in the same predictive model.

Finally, the standardization requires usable information in each relevant condition. If the archive contained no route A orders in busy periods, the busy A cost would not be directly observed. A model could fill that cell under assumptions, but the report would need to distinguish extrapolation from comparison supported by both routes. A neat standardized table cannot create evidence in an empty cell.

Adjustment is not a contest to include every variable

Clara might try to solve the problem by adding every recorded field to a regression. That is not a substitute for reasoning about when variables were determined and how they relate to the action and outcome. Some fields describe conditions before the decision. Others are consequences of the action or parts of the outcome itself. Treating them all as interchangeable controls can change the quantity being estimated.

Suppose a route choice affects execution delay, and delay affects total cost in a hypothetical mechanism. If the intended question concerns the total effect of changing route, conditioning on the resulting delay can remove part of the very pathway being studied. If the question concerns a direct effect under a specified delay intervention, it is another question with additional assumptions. The word adjusted does not tell a reader which one was answered.

Selection can also occur through which records survive. If only successfully filled orders are retained, and both route choice and market conditions influence whether an order fills, the retained sample can distort the comparison. Clara therefore records rejected, canceled and unfilled orders where the research question requires them. She does not assume that a completed-trades table is a neutral sample of all relevant decisions.

More columns do not automatically mean fewer assumptions. The DoWhy documentation on causal effect estimation separates modeling assumptions, identification, estimation and checks. Clara uses that separation as a reporting discipline: an estimator is chosen after specifying the causal question and identification strategy, rather than being asked to manufacture a causal interpretation from a large feature table.

A model counterfactual can be impossible in the world

An explanation system may find a nearby input that changes the predicted class. For example, it might reduce a spread descriptor while keeping session, volatility, source quotes and all related indicators fixed. As a numerical exercise, this can reveal the classifier’s decision boundary. As a proposed real-world change, it may be impossible because the altered descriptor is derived from the supposedly unchanged inputs.

Clara labels such an exercise a model counterfactual or input perturbation. She then asks whether there is an actionable counterpart. Changing order timing may change the observed spread, but it also changes the price path, available liquidity and exposure window. The practical intervention is not “replace one number while everything else remains fixed.” It is a decision whose downstream consequences need an explicit model or experiment.

The smallest numerical change is not necessarily the easiest operational change. A one-unit adjustment in a standardized feature can correspond to a substantial raw-data difference. A small change in an unmodifiable market condition may be less actionable than a larger change in a user-controlled parameter. Clara keeps feasibility, cost and timing separate from distance in feature space.

A counterfactual explanation should say what has been held fixed and why. If the assumptions are purely computational, the conclusion stays computational. If a structural causal model is used, its mechanisms and uncertainties must be stated. A fluent narrative about what would have happened cannot replace the work of establishing which hypothetical world the calculation actually represents.

Comparison of three distinct tasks: edit a model input, change an operational decision, and estimate an outcome under a declared causal mechanism
Changing an input, changing a decision and estimating its effect are separate operations with different evidence requirements.

Chronology helps, but earlier does not automatically mean causal

A variable measured before an outcome can be useful for prediction without causing that outcome. Both may reflect a prior common condition. Clara therefore checks chronology as a necessary part of the argument, not as a complete identification strategy. A correctly timestamped feature avoids one kind of leakage while leaving the association-versus-intervention question unresolved.

Conversely, an apparently explanatory variable measured after the decision may contain information about the outcome. A report that uses the completed trade’s maximum favorable excursion to explain why an entry should have been taken has crossed the information boundary. The explanation can describe the completed history, but it cannot be presented as a reason available to the system before entry.

Clara records both event time and availability time. A data field may refer to an earlier market event while becoming available only after processing or publication. The same issue arises with revised values. If an analysis uses the final revised record, its historical explanation may differ from what a live system could have known. The report states which version is being analyzed.

A causal story needs a chronological ledger as well as a diagram. The ledger identifies when each variable was measured, when it became known and whether it could be affected by the proposed action. This practical record often exposes an incoherent story before any advanced statistical method is applied. It also makes the remaining assumptions easier for another researcher to challenge.

What a randomized research design would change

In the route example, a suitably designed randomized assignment could separate route choice from pre-existing context differences in expectation. That does not mean every trading decision should be randomized or that live experimentation is appropriate. It means the assignment mechanism is part of the evidence. Clara distinguishes an imagined design from a completed experiment and does not describe hypothetical randomization as something already performed.

A defensible design would specify eligible decisions, available routes, allocation probabilities, outcome measurement and stopping or exclusion rules before outcomes are inspected. It would also consider whether one order’s treatment affects another order’s outcome, whether capacity constraints matter and whether the alternatives are actually comparable. Random assignment is not a license to ignore execution mechanics or operational consequences.

Finite samples can still be imbalanced. A randomized design does not guarantee identical context counts in every realized sample. The analysis should follow the declared design and report uncertainty appropriate to it. Clara avoids the opposite mistake of declaring randomization failed merely because one observed group contains a few more busy orders. The design and the realized data both matter, but they play different roles.

The benefit is a clearer identification argument, not an automatic favorable result. A randomized comparison may reveal no useful difference, an unfavorable difference or insufficient precision. Those are legitimate findings. Its purpose is to learn about a specified intervention under a specified setting, not to manufacture a persuasive story for a feature already highlighted by a predictive model.

Observational analysis needs an explicit assumption ledger

When randomization is unavailable, Clara writes down the assumptions under which an observational comparison could answer the intervention question. She identifies the variables believed to influence both action selection and outcome, the regions where both actions were available, and the consistency of action definitions. She also states which relevant influences might be missing from the archive.

This ledger should use concrete language. “No unmeasured confounding” is a compact technical statement, but a reviewer needs to know what it means here. Did an operator route difficult orders using information not saved in the file? Did a platform outage affect both route choice and measured cost? Were larger orders sent to one route during conditions that the recorded descriptors only partially capture? These questions connect assumptions to the actual workflow.

Clara does not treat an algorithm’s successful fit as confirmation of those assumptions. A model can fit the observed data well under several incompatible causal explanations. Sensitivity analyses and alternative specifications can reveal fragility, but passing them does not prove that every relevant influence was measured. The report distinguishes checks that can be performed from assumptions that remain substantive judgments.

Identification is a claim about the problem, not a reward for fitting accurately. If the available information cannot support the intended effect, Clara narrows the conclusion to a descriptive or predictive statement. That is not wasted work. It tells the team which additional records, design changes or domain knowledge would be needed before making the stronger claim.

Mechanisms in a simulator are assumptions you can inspect

A simulator gives Clara direct control over a declared mechanism. She can change an action and recompute downstream quantities according to that mechanism. This is valuable for learning, debugging and stress testing. It also makes the boundary clear: the estimated effect belongs to the simulator’s rules unless evidence supports transferring it to the real execution environment.

In the proxy example, she can implement two alternative generators that produce the same observed S and Y pairs. One uses U to generate both; another uses S directly to generate Y. An intervention on S differs between the generators despite identical observational predictions. Running both is a useful teaching experiment because it demonstrates which part of the conclusion comes from the structural assumption rather than the observed fit.

For trading research, a simulator may include deterministic spread costs, order delays and position accounting. Those mechanisms can support explicit what-if calculations. But if it omits queue position, liquidity limits or a relevant broker convention, changing an action may produce effects that are optimistic or incomplete. Clara compares selected simulated events with recorded events where possible and states the scope of that reconciliation.

Simulation makes assumptions executable; it does not make them true. The most useful report exposes the mechanism, shows alternative plausible settings and identifies which conclusions depend on them. An agent that learns to exploit a simulator should be evaluated partly by whether its apparent advantage survives challenges to the simulator, rather than by how compellingly its actions can be explained afterward.

A useful explanation can end with a diagnostic question

Not every explanation needs to become an intervention recommendation. Suppose a predictive model relies heavily on a field identifying the source file. Clara may not know whether that field causes anything economically meaningful, but the finding can trigger a concrete data audit. Perhaps the source files cover different instruments, periods or preprocessing conventions. The explanation has helped locate a question worth checking.

Similarly, a strong contribution from a timestamp-derived variable may prompt a review of session definitions or information availability. The next step is to inspect the data pipeline and compare specific records. It is not to claim that changing the timestamp would improve the market outcome. The computational explanation is useful precisely because it points toward a testable implementation or sampling issue.

Clara records the diagnostic chain: observed model behavior, plausible explanations, evidence needed to distinguish them and the eventual check. She keeps alternative explanations alive until the evidence resolves them. A report that jumps from a surprising contribution to a single economic story loses this investigative value. The explanation should open a controlled inquiry rather than close it prematurely.

The right action may be to repair a measurement, not a strategy. If an input was shifted by one observation or computed with the wrong units, correcting it changes the model’s information. That correction needs its own evaluation. It should not be presented as proof of the causal story originally attached to the erroneous feature, even if the corrected model subsequently performs better.

Language can preserve or erase the evidence boundary

Clara reviews the verbs in the final report. “The model uses,” “the prediction increases when this input is changed” and “these observations have higher measured cost” describe different levels of evidence. “This feature makes the strategy profitable” is a much stronger statement and requires a different argument. A few words can turn a careful analysis into a claim it never established.

She also avoids laundering uncertainty through a diagram. A causal graph can be a concise representation of assumptions, but drawing a connection does not verify it. Each meaningful connection should have a stated rationale, and disputed connections should remain visible. Decorative complexity can make a diagram look authoritative while concealing that the relationships were chosen by the author.

For a model explanation, she states the model version, input definition, output scale and reference. For a predictive result, she states population, timing and evaluation method. For an intervention estimate, she adds action definition, comparison, identification assumptions and sensitivity. The report can be concise without collapsing these layers. Readers should be able to tell which kind of claim each result supports.

A precise modest sentence is stronger than an impressive ambiguous one. This matters when research material is used in marketing or an AI-generated summary. Clara checks that the shortened version preserves the original boundary. A paragraph that carefully says hypothetical simulation should not become a caption claiming a demonstrated way to increase real trading returns.

An evidence ladder for the next practical decision

Clara uses a four-level review for a proposed change. First, can she reproduce the model’s calculation? Second, does the predictive relationship hold under the intended evaluation procedure? Third, is the proposed real-world action defined and supported by an identification argument? Fourth, does the resulting operational implementation behave as specified? These levels are not a universal certification system; they are a practical way to keep distinct questions from being answered by one attractive chart.

In the spread-proxy example, the first level can pass perfectly while the intervention claim fails. In the route example, the raw predictive association is clear but the unadjusted comparison mixes context composition with route differences. In a simulator, the intervention may be well defined inside the model while transfer to the execution environment remains unresolved. Each case points to a different next task.

She records the smallest useful next step. It might be a hand calculation, a timestamp audit, a request for missing selection fields or a reconciliation of simulated and recorded costs. This keeps causal ambition from expanding into an unfocused project. The question is not whether the team can produce a sophisticated explanation; it is whether the next piece of evidence will resolve a specific uncertainty that matters to the decision.

Stopping at the supported level is a valid outcome. A model may remain useful as a predictor without yielding an actionable causal insight. A descriptive pattern may justify further research without becoming a trading rule. Clara preserves those contributions while declining to promote them beyond their evidence. This makes later work easier because the unanswered questions are explicit rather than hidden inside confident prose.

Four separate evidence questions: reproduce the calculation, assess prediction, identify an intervention and verify implementation
A practical review framework. Evidence for one question does not automatically answer the next.

Ask AI to label the claim before expanding the explanation

Clara’s prompt begins: “Classify each claim as computational, predictive or causal. Reproduce the model output and state its reference and units. For every proposed action, identify who can perform it, when, and which downstream variables may change. Do not infer a causal effect from feature attribution alone. List missing assumptions and suggest a small check that could distinguish competing explanations.” This asks the assistant to clarify the evidence rather than decorate it.

She then supplies the two toy examples and checks whether the assistant preserves their logic. In the proxy mechanism, editing S changes the predictor but leaves Y unchanged when U is fixed. In the route example, the raw averages are 1.8 and 5.2, while the declared within-condition difference is one. An assistant that calls the raw 3.4-unit difference the route’s established causal effect has crossed the boundary the exercise was designed to expose.

The earlier article on global importance and a single trade distinguishes population reliance from local explanation. This article addresses a further boundary: neither kind of explanation automatically identifies an intervention effect. Keeping both distinctions visible makes model inspection more useful, because each result can be connected to the appropriate next test.

If you want systems to inspect rather than a black-box claim, the free TradeAndRoll demo includes ten Forex systems with rules, source code, demo CSV data and research ideas. Use explanations to make your investigation more precise. A reproducible calculation, an honest assumption ledger and a well-defined next question are practical progress even when the model cannot tell you what caused the market to move.

Back to the Blog