Skip to main content

Wickra Impact — the backtester that knows you would have moved the market

CI codecov PyPI License: MIT OR Apache-2.0

Wickra Impact — Python


Part of the Wickra ecosystem: — for Python. pip install wickra-impact — prebuilt wheels for Linux, macOS and Windows, nothing to compile.

Python bindings for the Wickra Impact market-impact backtester, built with PyO3 and maturin. An Impact handle is driven over a JSON boundary, so the same request yields the byte-identical report as every other Wickra Impact binding.

Install

pip install wickra-impact

Pre-built wheels ship for Linux, macOS and Windows — there is nothing to compile and no C library to track down.

Building from this repository (contributors)

maturin develop --release

Quick start

import json
from wickra_impact import Impact

spec = {
    "strategy": { "spec_version": 1, "symbol": "IMPACT", "timeframe": "1h",
        "indicators": {},
        "entry": {"ge": [{"price": "close"}, 0]},
        "exit": {"in_position": True},
        "sizing": {"type": "fixed_qty", "qty": 10.0},
        "execution": {"order_type": "market", "fill_timing": "next_open"} },
    "book_model": {"kind": "orderbook_walk"},
    "participation_cap": 1.0, "latency_ms": 0,
}

impact = Impact(json.dumps(spec))
report = json.loads(impact.command(json.dumps({"cmd": "run", "data": data})))
print(report["impact_stats"]["avg_slippage_bps"])  # the impact a naive backtest hides

API

  • Impact(spec_json) — construct a backtest handle from an ImpactSpec JSON ("{}" defers configuration to a later set_spec). Raises ValueError on an invalid spec.
  • Impact.command(cmd_json) — apply a command JSON and return the response JSON. Commands: set_spec, run, version. Raises RuntimeError on a command failure.
  • Impact.version() / wickra_impact.__version__ — the library version.

Determinism

The fill engine lives only in the Rust core; this binding forwards the command string verbatim, so the report is byte-identical to the CLI and to every other language binding.

Benchmark

Every binding forwards to the same data-driven Rust core, so what this one adds is the call overhead of PyO3, not a different result. The core's throughput is measured by the repository's benchmark suite and the nightly bench.yml run; the numbers, the machine and how to reproduce them are in the repository BENCHMARKS.md.

Documentation

The full guide, the spec reference and the API documentation live in the main repository and the documentation site:

Wickra Impact ships native bindings for Python, Node.js, WASM and Rust, plus a C ABI hub that any C-capable language (C, C++, C#, Go, Java, R) links against — all forwarding to the same data-driven, unsafe-forbidden Rust core.

Security

Found a security issue? Please don't open a public issue. Report it privately via the repository's Security tab ("Report a vulnerability") or email support@wickra.org with a subject line starting [wickra security]. Full policy: https://github.com/wickra-lib/wickra-impact/blob/main/SECURITY.md.

Disclaimer

Wickra Impact is a research and backtesting tool. It measures the slippage an order would have paid against recorded market data; it does not place orders, and a measurement over history is not a prediction about the future. Nothing here is financial advice. Trading carries risk, including the loss of the capital committed. Use it at your own risk.

License

Licensed under either of Apache-2.0 or MIT at your option.

Metadata

Release files for wickra-impact 0.2.2

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-impact 0.2.2
File Size Uploaded Provenance Actions
wickra_impact-0.2.2.tar.gz 62.3 kB Without provenance Details for wickra_impact-0.2.2.tar.gz

Built distributions (wheels)

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

Total release size: 6.0 MB

Release files / wickra_impact-0.2.2.tar.gz

Download URL wickra_impact-0.2.2.tar.gz
Size 62.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7a8944e5e6b539c877dd7387cc771e6d0d434bdebe2927019dbf36e433e9691f
BLAKE2b-256 checksum
How to use checksums
5cd61efc5ec0cf6ca25ae93b1351868e8653df80030977f49957494fed9762ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / wickra_impact-0.2.2-cp39-abi3-win_arm64.whl

Download URL wickra_impact-0.2.2-cp39-abi3-win_arm64.whl
Size 571.5 kB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
5ef3034a21c6c9df33840a01f2e82ddeb25304ea8426e442d225b1d8ca112d31
BLAKE2b-256 checksum
How to use checksums
6317ae5079046f2188116d957041c62be23acf484d6e28e61a13f522df0c27ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / wickra_impact-0.2.2-cp39-abi3-win_amd64.whl

Download URL wickra_impact-0.2.2-cp39-abi3-win_amd64.whl
Size 649.3 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
77f5eefcbdd0fa56d4c6e084dea1d36d9f58db97e780ddec220c3ad00768e768
BLAKE2b-256 checksum
How to use checksums
fdefd6b8e85b7bc8ae7c9d51d78311bfebaf48b26e38fe1d70e7c6a0cdc414fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / wickra_impact-0.2.2-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL wickra_impact-0.2.2-cp39-abi3-musllinux_1_2_x86_64.whl
Size 982.8 kB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
b978b03bfb46ea44d8d697a0a41402ee47cf4106fe3e01d838822c9cc78523f9
BLAKE2b-256 checksum
How to use checksums
8073314444eabff2b0ffde253d8678893eccde691fa8f32faeda0264f9d0f569
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / wickra_impact-0.2.2-cp39-abi3-musllinux_1_2_aarch64.whl

Download URL wickra_impact-0.2.2-cp39-abi3-musllinux_1_2_aarch64.whl
Size 870.8 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
2dfe8bd68c5f3a91f3159349dc213fb220b4a001aef55f9ea095c65d6e728852
BLAKE2b-256 checksum
How to use checksums
59a0ca3fae6a3b37302a5fd50ef3a26e37d90d7e25293e11fa61c6da636d9113
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / wickra_impact-0.2.2-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL wickra_impact-0.2.2-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 766.7 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
5e7699e467c76c5c3f1ddca70b79ac9df9ef27323d6155682a2bbc1ed9dad564
BLAKE2b-256 checksum
How to use checksums
1ec20fa358db12f14f765580d373fd09abc7c02ed4ed4142c42715e0a26559f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / wickra_impact-0.2.2-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL wickra_impact-0.2.2-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 693.5 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
8e99468dc3393e17e8a5bd3d196405596f7c015b8470cd09037bf145e8ba6712
BLAKE2b-256 checksum
How to use checksums
6a44044f6e9b4c389f7a5f8a2e96d0b2bba4d1aab91aa2a4d37f503889e9b0ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / wickra_impact-0.2.2-cp39-abi3-macosx_11_0_arm64.whl

Download URL wickra_impact-0.2.2-cp39-abi3-macosx_11_0_arm64.whl
Size 631.9 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
31b8161dbbf3d24fafd282c3486bd34768d057200973c5e03e2278b87252ce84
BLAKE2b-256 checksum
How to use checksums
1543c92d06a04b53f58f1d3e27c6f0ff067279a808dbac0c0dc69440a9d8a5ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / wickra_impact-0.2.2-cp39-abi3-macosx_10_12_x86_64.whl

Download URL wickra_impact-0.2.2-cp39-abi3-macosx_10_12_x86_64.whl
Size 731.9 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
4cbd461bcc2611e3bcca5935abd82a7b29eea347e7698f1e428abcc028ec7366
BLAKE2b-256 checksum
How to use checksums
052fa8346a5a33b455a48484f2f1ceb88955a55d2e6e3f57a238f4ca9597bdbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Security for wickra-impact 0.2.2

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