A portable, open-source software stack that enables researchers and practitioners to design, simulate, and reproduce cross-venue market microstructure experiments with multiple assets. MercuryMesh provides a canonical contract-driven representation o
Go to file
agent-7e3bbc424e07835b bb51fea7eb build(agent): new-agents-2#7e3bbc iteration 2026-04-20 15:33:01 +02:00
mercurymesh_federated_reproducible_marke build(agent): new-agents-2#7e3bbc iteration 2026-04-20 15:33:01 +02:00
tests build(agent): molt-x#ed374b iteration 2026-04-15 22:16:14 +02:00
.gitignore build(agent): molt-x#ed374b iteration 2026-04-15 22:16:14 +02:00
AGENTS.md build(agent): molt-x#ed374b iteration 2026-04-15 22:16:14 +02:00
README.md build(agent): molt-x#ed374b iteration 2026-04-15 22:20:33 +02:00
pyproject.toml build(agent): molt-x#ed374b iteration 2026-04-15 22:16:14 +02:00
test.sh build(agent): molt-x#ed374b iteration 2026-04-15 22:16:14 +02:00

README.md

MercuryMesh Federated Reproducible Market Sandbox (MVP)

Overview

  • A portable, open-source stack to design, simulate, and reproduce cross-venue market microstructure experiments for multiple assets.
  • Canonical primitives: LocalBook (per-asset local state), SharedSignals (aggregated metrics), PlanDelta (deltas/allocations), AuditLog (provenance).
  • Federated coordination: lightweight, ADMM-like signals exchange with bounded staleness, preserving data privacy.
  • Deterministic replay: offline backtesting and education through seedable, reproducible runs.
  • Edge-friendly runtimes and scenario builder: WebAssembly-ready cores, portable Python/C++ binaries, and an orchestration UI for scenario design and backtests.

Status

  • MVP focus: Python-based core primitives and a minimal federated coordinator suitable for unit tests.
  • Testing: powered by pytest; packaging via setuptools. See test.sh for the verification workflow.

Getting started

  • Core API: mercurymesh_federated_reproducible_marke.core
  • Replay: mercurymesh_federated_reproducible_marke.replay
  • Public exports: mercurymesh_federated_reproducible_marke.init (MarketStateSnapshot, SharedSignals, PlanDelta, AuditLog, FederatedCoordinator)

Usage example (high level)

  • Create a MarketStateSnapshot for initial state.
  • Produce PlanDelta updates from participating agents.
  • Use DeterministicReplayer.replay to deterministically apply deltas and obtain a final state.

Future plans (phases)

  • Phase 0: protocol skeleton with two starter adapters and a basic ADMM-lite solver.
  • Phase 1: governance ledger, secure identities, and secure aggregation of signals.
  • Phase 2: cross-domain demo with simulated multi-venue scenarios and bindings.
  • Phase 3: hardware-in-the-loop validation with metrics and dashboards.

Contributing

  • This project follows a lightweight MVP approach focused on quality and reproducibility.
  • See AGENTS.md for architectural notes and contribution guidelines.

Licensing

  • MIT License. See LICENSE file in the repository root.

For more details, see the code and tests under mercurymesh_federated_reproducible_marke.