Docs

Execution Truth & Research Labs

Documentation for the 20 execution-truth and research-science tools — session gates, reality profiles, partial fills, financing, margin lab, TCA, data passports, contracts, sensitivity, ablation, counterfactuals, experiments, and reproducible run manifests.

By Setup.Cash TeamLast updated 2026-07-128 min read

Setup.Cash's research philosophy is simple: truth before activity. A simulator that trades often but models reality poorly teaches the wrong lesson. This page documents the two tool families that enforce that philosophy — Execution Truth (does the simulation respect market reality?) and Research Science (is the strategy's edge real, robust, and reproducible?).

Everything below is included in the platform today. Not financial advice; trading involves risk.

Part 1 — Execution Truth

Market Session & Stale-Candle Gate

A price is not merely a number: it has an age, a market session, and a tradability context. Every scan passes a hard gate before signals can fill:

  • Session calendars: FX (Sunday 17:00 → Friday 17:00 New York, global holidays), US equities (09:30–16:00 ET plus the market-holiday calendar), crypto (24/7). Daylight-saving shifts are handled automatically.
  • Freshness: the newest candle must be younger than a configurable bar-age limit (default 3 bars), and quotes younger than a quote-age limit.
  • Policies per run: Reject (block stale/closed evaluation entirely), Defer (wait for fresh data), or Evaluate-without-fill (signals compute, orders never place).

Every blocked evaluation writes a run event — MARKET CLOSED, DATA STALE, or WAITING FOR FIRST FRESH BAR — so "why didn't my bot trade" always has an answer. Configure the policy from the Execution Reality card on any run page.

Simulator Reality Profiles

Paper profit without friction is fiction. Five named profiles control simulated slippage, spread widening, commissions, and deterministic order rejection:

ProfileSlippageExtra spreadRejected orders
Idealized000%
Retail Typical0.3 pips0.3 pips0%
Thin Market1.2 pips1.5 pips~5%
News Shock2.5 pips3.5 pips~12%
User Calibratedyour strategy's fees model0%

The Execution Reality card shows your run's estimated net P&L under every profile side by side, and warns when a run is only profitable under favorable assumptions. Live broker orders are never modified — profiles shape simulated fills only.

Partial Fills & Queue Position

An order is a request to a market, not a command to a database. Simulated orders are capped by bar-volume participation: a large order against a thin bar fills partially and the remainder is canceled with an explicit reason. Requested vs. filled quantities are stored on every position and totaled per run.

Order-Type Laboratory

Entry logic and order mechanics are separate hypotheses. The Order Lab teaches market, limit, stop, stop-limit, bracket, and OCO orders on five deterministic price scenarios — including the gap-open scenario that shows why a plain stop fills through a gap at a worse price while a stop-limit refuses the fill and misses the move. Includes a broker capability table.

FX Financing & Rollover Engine

Time has a price. Simulated FX positions held across the daily rollover accrue overnight financing from real interest-rate differentials, with the Wednesday triple swap and per-broker profiles (markup, rollover hour) for 16 providers. Financing P&L is tracked separately from trading P&L on every position and in run reports.

Margin & Liquidation Sandbox

Leverage should be understood at the point where it can destroy choice. The Margin Lab sweeps an adverse price shock against your whole book and shows exactly where the margin call arrives, where stop-out triggers, and which positions the broker would force-close first — under your chosen liquidation policy.

Corporate Actions & Data Quality Passport

Historical data is not self-explanatory. The Data Truth page provides:

  • Corporate Actions Ledger — every split and dividend for a stock, with exactly how each action rewrites raw history (a 4:1 split looks like a crash to indicators computed on raw data).
  • Data Quality Passport — grades any dataset A–F on completeness, in-session gaps, duplicate bars, statistical outliers, and freshness, with provider, timezone, and adjustment provenance. Downloadable as JSON evidence.

Execution Quality (TCA) Score

A profitable decision can still be executed badly. Every run receives a transaction-cost-analysis grade from arrival-price slippage (broker fill vs. decision-time quote), fill latency, and worst-trade analysis — shown in the Execution Reality card.

Broker Capability Contracts

Portability requires an honest account of differences. The Broker Capabilities matrix documents what each broker can express — asset classes, order types, attached stops, fractional units, minimum sizes, hedging vs. netting, time-in-force, and paper-vs-live differences. Open it with a strategy selected (the Broker fit button on the strategy map) and it reports blockers ("OANDA cannot trade AAPL") before you deploy.

Part 2 — Research Science

Dimensionally Safe Strategy Graph

Many strategy bugs are grammatical: they compare quantities that do not mean the same thing. Every indicator output carries a semantic unit (price, price-delta, 0–100 oscillator, volume), and unit-mismatched comparisons — like RSI compared against an EMA price — are flagged in the Dependency Map and Fix-It.

Strategy Contract Tests

A strategy should state what must never happen. Five enforceable invariants on every strategy's map page: never order on stale data, one position per symbol, stop distance greater than 3× the live spread, no entries outside session, and total concurrent risk below your ceiling. Each failure comes with a concrete counterexample.

Parameter Sensitivity Surface

A durable strategy lives on a plateau, not on one lucky coordinate. The sensitivity sweep re-backtests a 5×5 grid around your two most influential parameters on identical candles, renders the heatmap, and scores fragility 0–100 — distinguishing robust regions from curve-fit knife edges.

Ablation Lab

A component earns its place only if removing it makes the system worse. Each condition, filter, and exit is removed one at a time and the strategy re-backtested; components are ranked Load-bearing, Neutral, Decorative, or Harmful. Find it in each strategy's Research Lab.

Counterfactual Trade Lab

Learning requires asking what a nearby choice would have done. For any closed trade: skip it, enter one bar later, halve the size, double or halve the stop, remove the take-profit — replayed on the same candles with the same information set, labeled as analysis, never as fact.

Signal Decay & Half-Life

An edge is often a temporary relationship. Rolling hit rate and expectancy across your trade history, early-vs-late comparison, an estimated half-life when decay is detected, and a latency test that shows whether the edge survives 1–2 bars of entry delay.

Capacity & Market Impact

A return is partly a function of how little money is asking for it. A square-root impact model over bar liquidity finds the position size where costs consume the per-trade edge, under conservative, base, and aggressive scenarios.

Benchmark & Factor Attribution

Profit is not proof of skill when the same exposure could be bought more cheaply. Every run compares against cash and buy-and-hold, computes correlation and beta to the market, separates trading from financing P&L, and states the verdict in plain language.

Experiment Registry & Hypothesis Ledger

Research becomes hindsight when the hypothesis is written after the result. Experiments lets you preregister the hypothesis, primary metric, and failure threshold, lock the record (immutable from then on), attach runs as evidence only after locking, and conclude Accepted / Rejected / Inconclusive — permanently.

Reproducible Run Manifests

A result that cannot be reproduced is a story, not evidence. Every run can produce a deterministic manifest — engine version, strategy content hash, settings, fees, data provider, random seed — with its own SHA-256, downloadable as JSON. Reproduce This Run starts a fresh simulation pinned to the exact strategy snapshot and settings of the original.

Where to find everything

ToolLocation
Session gate policy, reality profiles, TCA, financing, partial fillsRun page → Execution Reality card
Counterfactuals, attribution, manifestsRun page → Counterfactual Lab / Run Evidence cards
Contracts, cost estimate, unit checksStrategy → Map
Sensitivity surfaceStrategy → Map → Sensitivity
Ablation, signal decay, capacityStrategy → Map → Research Lab
Order Lab / Margin LabTrading System menu
Data passports, corporate actionsMarkets & Research → Data Truth
Broker capability matrixTrading System → Broker Capabilities
Experiment registryTrading System → Experiments
Not financial advice. Trading involves risk. These docs describe software workflows and risk controls, not guaranteed outcomes.

Start here

Build your trading bot workflow with structure

Use Setup.Cash to create, backtest, and paper trade rule-based strategies without relying on guesswork. Not financial advice. Trading involves risk.