EngineMarket Data

Instruments

Keep instrument and contract identity consistent across inputs, strategy state, and results.

An app selects one instrument. That identity determines which market observations and execution context the strategy should use. A display symbol alone may not identify the exact contract or market you intended.

Select the actual instrument

Use the app or Lab instrument selector and inspect the resulting contract. For futures, distinguish the root symbol from a dated contract. For other instrument types, preserve the relevant venue, currency, and provider identifiers supplied by the selector.

Record enough information to distinguish two similarly named instruments. Do not turn a provider-specific identifier into an unrelated broker identifier by changing only the display label.

Inspect the frame and context

The frame's bar.instrument and the session's context.instrument give context for the observation and configured app. The shared historical runner attaches the session instrument when invoking strategy processing.

A timestamp and plausible price are not sufficient proof that a dataset belongs to the desired instrument. Validate the data selection and compare its identity with the app configuration before evaluating a result.

Understand cached data keys

Concrete sessions expose their market-data cache through context.marketData. The shared scoping helper tries the configured instrument key, then a matching symbol, then a fallback key when several keys are available. It is not a validation service for arbitrary mixed-instrument input.

Do not assume that the first key in a cache is a reliable instrument-selection API. Keep your app and data selection explicit. Multi-app sessions can share infrastructure while each app still has its own instrument context.

Compare the same contract

Changing the selected contract changes the experiment. Record contract boundaries when checking a historical window; do not assume the engine automatically stitches expiring contracts into a continuous adjusted series.

Agent Lab includes the instrument in its dataset identity. A contract change can therefore select different saved bars even when the interval and dates remain unchanged.

If no data appears, verify instrument identity before widening the date range or modifying the strategy. Continue with bars and intervals.

On this page