Module Trading_engine

module Account : sig ... end

Exact multi-currency cash, signed-position, cost-basis, and P&L accounting.

module Artifact_writer : sig ... end

Exclusive staged-file writer with a typed internal lifecycle.

module Audit : sig ... end

Deterministic audit events emitted by the pure engine.

module Bar : sig ... end

One instrument's completed OHLCV bar in a synchronized market slice.

module Boundary_effects : sig ... end

Minimal effect dispatcher for deterministic boundary failure injection.

module Codec : sig ... end

Stable JSON codecs for public files and audit events.

module Contract : sig ... end

Version and capability identifiers for the process/file boundary.

module Corporate_action : sig ... end

Split and cash-dividend events applied before matching their effective market slice.

module Diagnostic : sig ... end

Stable structured errors for process and file boundaries.

module Engine : sig ... end

Pure deterministic reducer for synchronized market slices.

module Execution : sig ... end

Deterministic synchronized-slice execution simulation.

module Execution_model : sig ... end

Contract-selected resumable execution model modules.

module External_replay : sig ... end

Replay runners driven by one supervised external strategy process.

module Fee_schedule : sig ... end

Deterministic, composable execution-fee schedules.

module Fill : sig ... end

One immutable execution report accepted by the order manager.

module Financing : sig ... end

Effective-time borrow availability and multi-currency financing policy.

module Id : sig ... end

Validated opaque identifiers used across engine boundaries.

module Initial_portfolio : sig ... end

Immutable point-in-time portfolio state used to start a replay.

module Instrument : sig ... end

Executable instrument metadata supplied by an approved catalog.

module Instrument_lifecycle : sig ... end

Deterministic mutable-listing state keyed by stable instrument identity.

module Journal : sig ... end

Append-only JSON Lines writer with atomic successful finalization.

module Market_event : sig ... end

Causally observable quote and trade events.

module Market_slice : sig ... end

One synchronized completed-bar observation, complete FX snapshot, and pre-match corporate-action batch for the configured market.

module Metric : sig ... end

Typed, dimensioned strategy observations.

module Oms : sig ... end

Deterministic order-management state.

module Order : sig ... end

Immutable orders and their legal state transitions.

module Order_book_event : sig ... end

Causally ordered level-two order-book observations.

module Planner : sig ... end

Exact portfolio-target sizing helpers.

module Reducer_phases : sig ... end

Pure reducer-phase sequencing behind one transition contract.

module Replay : sig ... end

Run a complete deterministic scenario and optionally persist its audit events.

module Resource_limits : sig ... end

Versioned inclusive limits for boundary and reducer resources.

module Risk : sig ... end

Deterministic signed-position, exposure, leverage, and margin checks.

module Scalar : sig ... end

Checked fixed-point values for executable state. Prices and money use six decimal places.

module Scenario : sig ... end

Strict replay scenario input contract.

module Scenario_shape : sig ... end

Strict top-level JSON shapes for batch and streamed scenarios.

module Scenario_stream : sig ... end

Bounded-memory reader for versioned JSON Lines replay scenarios.

module Scenario_validation : sig ... end

Cross-field and cross-record scenario semantics.

module Scripted_strategy : sig ... end

A deterministic strategy driven by intents scheduled after market slices.

module Settlement : sig ... end

Deterministic trade-settlement calendars, policies, and instructions.

module Sha256 : sig ... end

SHA-256 digests used to bind audit journals to exact scenario bytes.

module Strategy : sig ... end

Pure strategy callback contract.

module Strategy_process : sig ... end

Supervised stdio session for one external strategy process.

module Strategy_protocol : sig ... end

Versioned JSON Lines protocol for an out-of-process strategy.

module Strategy_transcript : sig ... end

Append-only external-strategy protocol transcript.

module Venue_calendar : sig ... end

Immutable venue-local session policies resolved outside the reducer.