Skip to main content

consistency-auditor

Audit backtest vs live trading consistency and generate reports from both CSV trade lists and ConsistencyRecorder event logs.

What it does

  • Match backtest vs live trades with exact-ID + fuzzy time matching
  • Report missing / extra trades
  • Measure entry and exit time/price alignment with full distribution statistics
  • Estimate per-trade and cumulative P&L drift
  • Replay DECISION -> ORDER_SENT -> FILL/REJECTED chains from JSONL logs
  • Emit matched / unmatched CSV reports for further analysis

Install

From source

python -m pip install -e ".[dev]"

Quick CLI check

consistency-auditor --version

Audit CSVs

consistency-auditor audit   --backtest .\examples\backtest.csv   --live     .\examples\live.csv   --tolerance 120   --price-tolerance 0.0003   --out .\outputs   --out-prefix demo

Outputs when --out is provided:

  • outputs\matched_demo.csv
  • outputs\unmatched_demo.csv

Replay event log

consistency-auditor replay   --events .\examples\events.jsonl   --fail-on rejected

Expected replay summary includes:

  • run info
  • total decisions / actionable decisions
  • filled / rejected / unexecuted counts
  • fill rate
  • decision-to-fill latency stats
  • rejection details

Dev setup (Windows)

python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -U pip
python -m pip install -e ".[dev]"
ruff check .
pytest -q
python -m build

CI

GitHub Actions runs Ruff + pytest on push and pull request. The package is ready for build validation and PyPI release after CI is green.

Files worth reading

  • AUDITOR_SPEC.md — behavior/specification
  • CHANGELOG.md — release history
  • CONTRIBUTING.md — local workflow and release checklist

Metadata

Release files for consistency-auditor 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for consistency-auditor 0.2.1
File Size Uploaded
consistency_auditor-0.2.1.tar.gz 20.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for consistency-auditor 0.2.1
File Interpreter ABI Platform
consistency_auditor-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 40.2 kB

Release files / consistency_auditor-0.2.1.tar.gz

Download URL consistency_auditor-0.2.1.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
308954c4bcd77cbdf87ad466638df2b2ed28180a65dbedeb198760295cb734d0
BLAKE2b-256 checksum
How to use checksums
385134acea6db03ab91d163180e0f2ecf20b834222059d86d7c7a9389d48b4ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / consistency_auditor-0.2.1-py3-none-any.whl

Download URL consistency_auditor-0.2.1-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23dc56610ebad5a0d223de499fcc4cd1367c717d0a05cf001ab9c5fe2d7c3094
BLAKE2b-256 checksum
How to use checksums
bd1accde2a21e260f39a0a7dd9093e88ec27fb131c8e6e1735624cc5104650f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page