Market Structures

StockMarketABM.MarketStructures collects the mutable containers used during a session: portfolios per agent and the Market aggregate that binds instruments, order books, tick sizes, telemetry, and expiry tracking.

TelemetryConfig controls how many snapshots the market keeps in memory (tick history, OHLCV bars). The Market struct stores a MarketTelemetry record per instrument so agents can read hot metrics in O(1) and optional flush queues allow long histories to be batched to persistent storage. Depth snapshots are collected lazily via get_depth_levels, avoiding per-tick work when agents do not need order-book depth. Market also maintains a rolling order-flow log (OrderFlowKind / OrderFlowRecord) capturing every add, cancel, trade, or expiry so the entire sequence of book mutations can be exported.

StockMarketABM.MarketStructures.MarketType
Market

Top-level container for a simulated market session. Maintains the set of instruments, associated order books, tick sizes, agent portfolios, and the store of expirable orders.

source
StockMarketABM.MarketStructures.MarketMethod
Market(instruments, order_books, tick_sizes, accounts; expiries)

Construct a Market from pre-existing dictionaries. The expiries store defaults to a fresh ExpiringOrderStore when omitted.

source