Audit backtest vs live trading consistency with CSV matching, event-log replay, and CLI reports.
Project description
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/REJECTEDchains 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.csvoutputs\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/specificationCHANGELOG.md— release historyCONTRIBUTING.md— local workflow and release checklist
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file consistency_auditor-0.2.1.tar.gz.
File metadata
- Download URL: consistency_auditor-0.2.1.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
308954c4bcd77cbdf87ad466638df2b2ed28180a65dbedeb198760295cb734d0
|
|
| MD5 |
ce8f2895c23c1902712abd96029c4489
|
|
| BLAKE2b-256 |
385134acea6db03ab91d163180e0f2ecf20b834222059d86d7c7a9389d48b4ed
|
File details
Details for the file consistency_auditor-0.2.1-py3-none-any.whl.
File metadata
- Download URL: consistency_auditor-0.2.1-py3-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23dc56610ebad5a0d223de499fcc4cd1367c717d0a05cf001ab9c5fe2d7c3094
|
|
| MD5 |
0d93a55c5ce272ae33597a36ef19f7b0
|
|
| BLAKE2b-256 |
bd1accde2a21e260f39a0a7dd9093e88ec27fb131c8e6e1735624cc5104650f1
|