Skip to main content

Wickra Verify — deterministically confirm or refute a claimed backtest report against its strategy and data, in ten languages

Built on Wickra Status CI CodeQL codecov GitHub release crates.io PyPI npm NuGet Maven Central Go module R-universe License: MIT OR Apache-2.0 OpenSSF Scorecard OpenSSF Best Practices Build provenance Docs Verified across 10 languages


Verify any backtest. Hand over a (strategy, data, claimed report) triple and get a deterministic verdict — confirmed or refuted — that anyone can recompute in ten languages.

▶ Live demos: the backtester compiled to WebAssembly, an equity curve building bar by bar — backtest-live.wickra.org; one StrategySpec side by side in Python, Rust, JS and Go — playground.wickra.org; all 515 indicators of the core over a real Binance feed — live.wickra.org. Zero backend, all of them.

Part of the Wickra ecosystem. Built on the same deterministic backtest engine and ten-language binding surface as wickra-backtest, wickra-proof and the rest.

wickra-verify takes a claim — a strategy spec, the candle data it was run over, and the BacktestReport someone says that run produced — and recomputes the report with the pinned wickra-backtest engine. It then compares the claimed report against the fresh one, field by field, within an explicit tolerance, and returns a verdict: matches: true if every metric agrees, or a stable, sorted list of the exact mismatches if not.

It is a free anti-fraud tool against doctored backtests — not a hosted service, not a SaaS, not a backend. A CLI plus ten language bindings, and an optional static in-browser WASM demo. Nothing you submit ever leaves your machine.

use wickra_verify_core::{verify, Claim, DatasetRef};

// A claim is the strategy, the candles it ran over, and the report someone
// says that run produced. `verify` recomputes the report and compares.
let claim = Claim {
    strategy: strategy_json,
    dataset_ref: DatasetRef::Inline { data: candles_by_symbol.clone() },
    claimed_report: claimed_report_json,
};
let verdict = verify(&claim, &candles_by_symbol)?;

// `matches` is the whole answer; `mismatches` names every field that differs.
// The same triple yields the same verdict in all ten languages, byte for byte.
assert!(!verdict.matches);
assert_eq!(verdict.mismatches[0].field, "fees_paid");

The same call from the command line, against the doctored claim shipped in examples/data (exit 2 = refuted, which is what a CI gate wants):

cargo run -p wickra-verify -- \
  --claim examples/data/claims/fudged.json \
  --data examples/data/candles

Status

0.2.3 — the current release. The core, the CLI, all ten language bindings, the byte-exact golden corpus, the property + fuzz suites, the benchmarks and one runnable example per language are built and green across Linux, macOS and Windows. Packages are not yet on the registries. Track progress in ROADMAP.md.

Documentation

Determinism is the product

  • Recompute, never trust — the verdict comes from re-running the backtest, not from comparing two supplied numbers. A fudged Sharpe, an inflated PnL, a quietly-changed parameter all surface as a concrete mismatch.
  • Explicit tolerance — floats are compared within a fixed atol + rtol·max(|a|,|b|) tolerance (the numpy.allclose rule), never bitwise, so legitimate last-ULP noise never causes a false refutal.
  • Stable, sorted mismatches — the mismatch list is ordered by field, so the verdict is byte-identical across all ten languages.
  • Canonical hashes — every verdict carries the blake3 hashes of the claimed report, the recomputed report and the full inputs, under the same canonicalization wickra-proof uses; a verdict's inputs_hash equals the proof hash of the same inputs.

Quickstart

--claim is a JSON/TOML Claim; --data a CSV or a directory of <SYMBOL>.csv files (omit --data when the claim carries its candles inline). Exit 0 = verified, 2 = refuted (CI-friendly), 1 = error; --explain renders the mismatches and forces exit 0.

The example claim inflates fees_paid, so the verdict is refuted and names the fees_paid mismatch — a fabricated number cannot pass a recomputation.

Claim format

A claim is the assertion to be checked — "this strategy on this data produced this report":

  • strategy — the embedded wickra-backtest StrategySpec (indicators, entry/exit rules, sizing, costs, risk).
  • dataset_ref — where the candles come from: inline (embedded per symbol, fully self-contained) or files (named symbols resolved out of band).
  • claimed_report — the BacktestReport the claimant asserts this run produced. Untrusted: verification recomputes and compares, so a doctored claimed_report cannot pass.

Full schema in docs/CLAIM_FORMAT.md.

Verdict and tolerance

verify returns a Verdict:

  • matches — true iff every compared field agrees within tolerance.
  • mismatches — a field-sorted list of {field, claimed, actual, delta}.
  • claimed_report_hash / actual_report_hash / inputs_hash — 64-hex blake3 digests over the canonical forms.
  • engine_version — the wickra-backtest version the verdict was reached under.

Two floats count as equal when |a − b| ≤ atol + rtol·max(|a|,|b|), with tight defaults (atol = 1e-9, rtol = 1e-6) that absorb last-bit float noise and nothing more. See docs/VERDICT.md.

Canonicalization and hashing

The hashes are only as trustworthy as the serialization they run over, so canonicalization is byte-for-byte the contract wickra-proof uses (see crates/wickra-verify-core/src/canon.rs): keys sorted by code point, no structural whitespace, floats quantized to 1e-8 with trailing zeros trimmed and whole values collapsed to integers, no NaN/±inf. blake3 over that canonical string yields each 64-hex hash. A verdict's inputs_hash therefore equals the wickra-proof hash of the same inputs — the two products share one determinism moat. See docs/CANONICALIZATION.md.

Anti-fraud use in CI

Because a refuted claim exits 2, verification drops straight into a pipeline:

# Fails the job (exit 2) if the committed report does not match a fresh run.
wickra-verify --claim claim.json --data candles/

Wire this into a strategy repo's CI and a doctored claimed_report can never be merged — the recomputation is the gate. Recipes in docs/Cookbook.md.

Use in any language

The core is a JSON-over-C-ABI data API (Verifier::command) exposed natively in Rust, Python, Node.js and WASM, and over the C ABI hub in C, C++, C#, Go, Java and R. Every binding drives the same verify / explain / canonicalize / version commands and returns the core's canonical response verbatim; the cross-language golden tests assert byte-for-byte equality. One runnable example per language lives under examples/; per-binding quickstarts are in each bindings/<lang>/README.md.

Language Binding Package
Rust wickra-verify-core (native) crates.io
Python PyO3 (native) PyPI
Node.js napi (native) npm
WASM wasm-bindgen (native) npm
C / C++ C ABI header + library
C# C ABI (P/Invoke) NuGet
Go C ABI (cgo) Go module
Java C ABI (FFM/Panama) Maven
R C ABI (.Call) R-universe

Project layout

crates/wickra-verify-core          the library: claim + compare + canonicalize + verify
crates/wickra-verify-cli    reference CLI (verify), binary `wickra-verify`
crates/verify-bench         Criterion benchmarks
bindings/{c,python,node,wasm,go,csharp,java,r}   ten-language surface
golden/                     fixed claims -> expected verdicts (byte-exact)
examples/                   runnable per-language demos + static web demo
fuzz/                       cargo-fuzz targets (claim parse, compare, canonicalize, verify)

Building everything from source

cargo build --workspace
cargo test --workspace --all-features

Each binding builds with its own toolchain; see bindings/<lang>/README.md. The C-ABI consumers (C/C++, C#, Go, Java, R) need the C ABI library first: cargo build --release -p wickra-verify-c.

Testing

Run the suites with the commands in Building everything from source.

  • wickra-verify-core — unit tests for canonicalization (key ordering, float quantization, whitespace), the verify/round-trip path, tamper detection, and the engine-version pin. The golden fixtures in golden/ are the anchor: the same (spec, data) pair must fold to the same canonical bytes and the same blake3 hash here as in every binding.
  • Every binding asserts the same golden bytes. That is the whole cross-language claim, so it is checked the same way in each one rather than approximated per language: Python with pytest, Node with node --test, WASM with wasm-bindgen-test, C and C++ through ctest, C# with dotnet test, Go with go test, Java with JUnit, and R with the shipped tests/smoke.R plus the repository-level tests/run_tests.R.
  • fuzz/ — libfuzzer targets over the JSON boundary, run as a time-boxed smoke in CI. The goal is catching a regression in the harness, not discovering novel bugs; long campaigns belong on dedicated infrastructure.
  • Repository checks — scripts/check_version_sync.py, check_license_copies.py and check_readme_links.py run in CI and assert what the repository ships rather than what it computes.

Requirements

Rust 1.86 (workspace) / 1.88 (Node binding). Per-binding toolchains: Python 3.9+, Node.js 22+, .NET 8, JDK 22+, Go 1.23+, R ≥ 4.1, and a C11/C++14 compiler with CMake for the C example.

Benchmarks

Criterion benchmarks for verify, compare and canonicalize live in crates/verify-bench; numbers and methodology are in BENCHMARKS.md.

Ecosystem

Part of the Wickra family — each one a data-driven core with a CLI and the same ten-language binding surface:

  • wickra — main library (Rust core + Python / Node.js / WASM bindings + a C ABI for C / C++ / C# / Go / Java / R)
  • wickra-playground — a polyglot strategy playground: one StrategySpec live side by side in Python, Rust, JS and Go, entirely in the browser
  • wickra-exchange — unified market-data + execution across ten crypto exchanges
  • wickra-backtest — event-driven backtester over the Wickra core
  • wickra-terminal — the trading terminal: a TUI and a browser renderer over the stack
  • wickra-screener — parallel multi-symbol screening over 495 streaming indicators
  • wickra-radar — perp-universe alert radar: OI delta, funding flip, book imbalance, liquidation clusters, OI/price divergence
  • wickra-copilot — local market copilot grounded in real order-book, liquidation and funding microstructure
  • wickra-shazam — match an asset's current microstructure fingerprint against its entire history
  • wickra-benchmark — reproducible, golden-verified benchmark suite — recompute any (strategy, dataset, report) in ten languages and confirm it byte-for-byte
  • wickra-strategy-ci — Jest for trading strategies: golden-pin the report, catch regressions in CI, property-test against fuzzed data
  • wickra-verify — confirm or refute a claimed backtest report against its strategy and data, in ten languages
  • wickra-proof — Proof-of-Backtest: deterministic (spec, data) → report + blake3 hash, recomputable byte-for-byte in ten languages
  • wickra-zk — prove a backtest zero-knowledge — on-chain-verifiable performance without revealing the data or the strategy
  • wickra-impact — the backtester that knows you would have moved the market: agent-based fills on the real historical L2 order book
  • wickra-darwin — evolutionary strategy search at millions of backtests per second, mutating and crossing JSON specs across the 495-indicator space
  • wickra-gym — a Gymnasium-compatible, microstructure-aware backtest environment with O(1) steps for deterministic RL rollouts
  • wickra-feature-store — OHLCV and microstructure streams into ML-ready feature matrices over 495 O(1) streaming indicators
  • wickra-genome — a vector database of the whole market: every asset a 495-dim live vector, for similarity search, clustering and anomaly detection
  • wickra-timemachine — scrub the whole market like a video — every symbol, full order book, rewound to any moment via deterministic re-fold
  • wickra-synth — deterministic synthetic market microstructure: OHLCV, order book, trades and funding from a single seed
  • wickra-compile — compile a strategy spec into a standalone deployable: a WASM module, a self-contained binary, or a no_std artifact
  • wickra-embed — allocation-free, no_std streaming indicators for bare-metal and HFT, byte-for-byte identical to the core
  • wickra-pico — the O(1) indicator core running bare-metal on a $5 Raspberry Pi Pico — the LED blinks on the EMA cross

Docs at docs.wickra.org; the marketing site and in-browser demo at wickra.org.

Contributing

See CONTRIBUTING.md and the Code of Conduct. Every change runs the full CI matrix (all ten languages × three OSes) plus CodeQL, Scorecard and zizmor.

Security

Report vulnerabilities per SECURITY.md. The threat model is in THREAT_MODEL.md.

License

Licensed under either of

at your option. Use it, fork it, modify it, redistribute it — commercially or not — file issues, send pull requests; all welcome.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Disclaimer

wickra-verify is research and engineering tooling, not financial advice. A verdict attests only that a claimed report is (or is not) the deterministic result of a given strategy over given data — it makes no claim about the quality, profitability or future performance of any strategy, nor about whether the data itself is genuine. Trading carries risk; you are responsible for your own decisions. wickra-verify is free software you run yourself: no hosted service, no data collection, no warranty.


GitHub stars GitHub forks GitHub issues

Built on Wickra. If it saved you time, the cheapest way to say thanks is to ⭐ the repo.

wickra-verify star history

Metadata

Release files for wickra-verify 0.2.3

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

Source distribution (sdist)

Source distribution for wickra-verify 0.2.3
File Size Uploaded Provenance Actions
wickra_verify-0.2.3.tar.gz 78.3 kB Without provenance Details for wickra_verify-0.2.3.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for wickra-verify 0.2.3
File Actions
wickra_verify-0.2.3-cp39-abi3-win_arm64.whl CPython 3.9 abi3 Windows ARM64 Details for wickra_verify-0.2.3-cp39-abi3-win_arm64.whl
wickra_verify-0.2.3-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for wickra_verify-0.2.3-cp39-abi3-win_amd64.whl
wickra_verify-0.2.3-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details for wickra_verify-0.2.3-cp39-abi3-musllinux_1_2_x86_64.whl
wickra_verify-0.2.3-cp39-abi3-musllinux_1_2_aarch64.whl CPython 3.9 abi3 Linux musl 1.2+ ARM64 Details for wickra_verify-0.2.3-cp39-abi3-musllinux_1_2_aarch64.whl
wickra_verify-0.2.3-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for wickra_verify-0.2.3-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
wickra_verify-0.2.3-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for wickra_verify-0.2.3-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
wickra_verify-0.2.3-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for wickra_verify-0.2.3-cp39-abi3-macosx_11_0_arm64.whl
wickra_verify-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for wickra_verify-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 6.3 MB

Release files / wickra_verify-0.2.3.tar.gz

Download URL wickra_verify-0.2.3.tar.gz
Size 78.3 kB
Tags Source
SHA-256 checksum
How to use checksums
662a6bc65bfa217420305f1b12905ec02c87c28bc71607d73e1f6ff06adb8d7d
BLAKE2b-256 checksum
How to use checksums
26aed2641665c61e8766d1171ce6e44cd2d4c8ba0ddc6623f80a4cb7b87e6381
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wickra_verify-0.2.3-cp39-abi3-win_arm64.whl

Download URL wickra_verify-0.2.3-cp39-abi3-win_arm64.whl
Size 605.7 kB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
ad27441335c26802b20a5c524b2ba8f0a5f9ce87924dba05212383c939be8802
BLAKE2b-256 checksum
How to use checksums
4803c6ac03dc8ccb7aeaacc80b306843879e3794f34de664b49c08febc5f78f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wickra_verify-0.2.3-cp39-abi3-win_amd64.whl

Download URL wickra_verify-0.2.3-cp39-abi3-win_amd64.whl
Size 687.0 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
15707055d17b8a3ee60b6ae8602b0824898d2cd1c623726193bfb060fa01d950
BLAKE2b-256 checksum
How to use checksums
76fe3524363765b8a4fc8a51b66e5e8079eb3ed3629553fcccaab069a5ea6cdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wickra_verify-0.2.3-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL wickra_verify-0.2.3-cp39-abi3-musllinux_1_2_x86_64.whl
Size 1.0 MB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
15a8eafe04c9834240d75b1cb7916f3d8c6adeec89e15f827e91df0122936b2c
BLAKE2b-256 checksum
How to use checksums
d54de156283d7f8e6c529daeafe9184bde11f717f3c9e9ea33edc2a620a3ff58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wickra_verify-0.2.3-cp39-abi3-musllinux_1_2_aarch64.whl

Download URL wickra_verify-0.2.3-cp39-abi3-musllinux_1_2_aarch64.whl
Size 902.6 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
96ceda679d4fd78752c47dd6775b1d889f38a89b4a931bf23e62093e245ba5b5
BLAKE2b-256 checksum
How to use checksums
51cb489f84111c9c6d6491ee0af02fbc784eb891c75c1d54a36fdfdda28dc0ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wickra_verify-0.2.3-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL wickra_verify-0.2.3-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 805.7 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
d06c56879ec8177f407bc211111b1d620471b5e3151f740d58c66bafc2df1111
BLAKE2b-256 checksum
How to use checksums
1f062389567faa44d7b74f65d47e1952e6a86e6b4b6241f871288b2def689908
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wickra_verify-0.2.3-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL wickra_verify-0.2.3-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 726.6 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
b8f9ed58afaf4e52de36380a489394bdcb807041a8318c72809c8f8add368497
BLAKE2b-256 checksum
How to use checksums
02e3e1247e5beffb51008012cf37e46f54efab4657e576a786b428d3f8c283ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wickra_verify-0.2.3-cp39-abi3-macosx_11_0_arm64.whl

Download URL wickra_verify-0.2.3-cp39-abi3-macosx_11_0_arm64.whl
Size 665.3 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6d6a72642475a28b2072eacf7f1887e215e84cc7e5b0e5c44f48473c18f262c6
BLAKE2b-256 checksum
How to use checksums
eb8cce0fa75b80dcd0da7e2a7389ef8c5f5a05243e7dab8f9e7d880e8f1437d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / wickra_verify-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl

Download URL wickra_verify-0.2.3-cp39-abi3-macosx_10_12_x86_64.whl
Size 771.0 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
0c6e7f2ebc4cf48cbd04015ca483fb88c9b919321e3ee938ee331efaa87a7f41
BLAKE2b-256 checksum
How to use checksums
327fe9eb6cbcf5df67b39140afd73f3e95d9f35989a62d39dcae9ac277169615
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for wickra-verify 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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