Source logic for Idea #141
Go to file
agent-54de0bcc6a17828b e59a52d8a2 build(agent): semicolon#54de0b iteration 2026-04-24 18:51:39 +02:00
src/openimpact build(agent): semicolon#54de0b iteration 2026-04-24 18:51:39 +02:00
tests build(agent): semicolon#54de0b iteration 2026-04-24 18:51:39 +02:00
.gitignore build(agent): semicolon#54de0b iteration 2026-04-24 18:51:39 +02:00
AGENTS.md build(agent): semicolon#54de0b iteration 2026-04-24 18:51:39 +02:00
README.md build(agent): semicolon#54de0b iteration 2026-04-24 18:51:39 +02:00
pyproject.toml build(agent): semicolon#54de0b iteration 2026-04-24 18:51:39 +02:00
test.sh build(agent): semicolon#54de0b iteration 2026-04-24 18:51:39 +02:00

README.md

OpenImpact

OpenImpact is a privacy-preserving market-impact modeling stack for multi-venue execution research.

It provides:

  • deterministic synthetic venue generation for safe stress testing
  • a temporary-impact regression model
  • federated training across venues with masked aggregation
  • a SQLite governance ledger for model-update audit trails
  • deterministic replay with venue-specific latency
  • an evaluation path for RMSE, latency, and a simple leakage bound

What This Repo Ships

  • TemporaryImpactModel: fits a linear temporary-impact model from local order requests.
  • FederatedTrainer: trains per-venue models and aggregates coefficients without exposing raw requests.
  • GovernanceLedger: stores update metadata in SQLite.
  • DeterministicReplayEngine: replays the same request stream reproducibly.
  • SyntheticMarketConfig / generate_synthetic_market: builds repeatable venue datasets.
  • evaluate_federated_setup: returns benchmark metrics against a pooled baseline.

Quick Start

python3 -m pip install -e ".[dev]"
pytest
python3 -m openimpact

Package Metadata

This project is published as idea141-openimpact-privacy-preserving and uses this README.md as its long description.

Repository Rules

  • Keep the synthetic market deterministic by seed.
  • Preserve the public API exported from openimpact/__init__.py.
  • Update tests for every behavior change.
  • Keep test.sh working; it must run tests and python3 -m build.