EngineOrders & Positions

Simulation versus broker

Keep simulator assumptions and broker execution responsibilities explicit.

Historical simulation and broker-backed execution share strategy concepts, but they do not provide identical order behavior. Record the execution runtime with every comparison.

Compare responsibilities

ConcernGeneric shared simulatorBroker-backed runtime
Fill priceEligible quote closeBroker/venue execution updates
DelayConfigured delay measured in session market timeSubmission, network, and venue processing
Price pathClose-based checks, no inferred intrabar pathBroker-specific trigger and matching behavior
Fill quantityNo volume-based partial-fill processAdapter and broker report execution quantities
CapitalSimplified close × quantity checkBroker/account rules
ModificationShared object replacement with matching rulesAdapter-specific; not implemented in every path
Completion evidenceUpdated simulated orders, positions, and recordsAcknowledgments plus subsequent reported state

Known accounting limits

Shared same-side fills increase position quantity without establishing a fully weighted average entry basis. Partial-close accounting also uses simplified position-cost calculations. Avoid treating these paths as exact broker accounting for scaling strategies.

The walkthrough deliberately uses one unit and a full close so readers can inspect a small, explainable sequence. That example's simplicity does not remove other simulation assumptions.

Verify the selected adapter

Verify the selected broker's supported order operations. Simulator behavior does not establish broker modification support.

Similarly, retry, cancellation, order identifiers, and reported state must be interpreted through the actual adapter. A common TypeScript method signature is not evidence of identical lifecycle semantics.

Use historical runs for what they establish

A historical run can demonstrate how source and supplied observations produce requests under its configured rules. It cannot establish exchange priority, guaranteed live fills, or identical account behavior.

Before evaluating a broker-backed workflow, verify its instrument mapping, order support, source controls, and state reporting. Continue with debugging.

On this page