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

Built distributions (wheels)

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

Total release size: 5.9 MB

Release files / wickra_impact-0.2.1.tar.gz

Download URL wickra_impact-0.2.1.tar.gz
Size 61.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b1119d0413fa6892dddd4721bb2490e18d5c282a120187c68eb599abce82c95c
BLAKE2b-256 checksum
How to use checksums
6c786ccbbae2a60dfd26c7959bd487abc989c6b95e3e0b4697506aad5fe717a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_impact-0.2.1-cp39-abi3-win_arm64.whl
Size 560.3 kB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
90aa0213bcef3d39c13d10fafe80e63c1335d01edde30cf081f9e223585bd293
BLAKE2b-256 checksum
How to use checksums
1a946f8a95a723979943c38057498bb9bc432a45401e26b3daf3260cb9eb7281
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_impact-0.2.1-cp39-abi3-win_amd64.whl
Size 644.8 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
4d1ef6c9ad3f1e272a8887a5abc1fafdd478f2ffc84f7330f335e19446672985
BLAKE2b-256 checksum
How to use checksums
576ab6714cf61e4f3623ef77a3fd1dbb9371011a74562ad43ee3b44265dc821c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_impact-0.2.1-cp39-abi3-musllinux_1_2_x86_64.whl
Size 979.1 kB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
11441bf52b53b8e17dd59e4823d02a81ec2afac3b6c0f98e52f5e64172ae29d0
BLAKE2b-256 checksum
How to use checksums
9d61400b6be47d11792a0d629d90c1acba3b76460209cf9ce7abf04cf56970a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_impact-0.2.1-cp39-abi3-musllinux_1_2_aarch64.whl
Size 860.3 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
9dfb6d2ad2c27959da09c709c852a5728deaf473c70c7342ab309d1480753ea5
BLAKE2b-256 checksum
How to use checksums
32e54c251a8f4341bd39d0a658b72fc0a44ec29c01e3a86fe970260f955bf757
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_impact-0.2.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 762.2 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
ef4d7a1ec0858c6220ab363c387e898fce3b9d2cb8fb2382e137f9bc8715d0b3
BLAKE2b-256 checksum
How to use checksums
6cdf05c35faf1c123fc75a7378e2917e6b7fd7fca942432e6b23fc5705fc2a49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_impact-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 681.4 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
0e18b66a250875f341b398de8ec2a4c637a010e40711467f65138504035d2e77
BLAKE2b-256 checksum
How to use checksums
4e104e8e4ee56881539d7468e9b874062c5306c3445de685b621f11ce62ddd71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_impact-0.2.1-cp39-abi3-macosx_11_0_arm64.whl
Size 621.0 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
eafc575b164fad4d3f5da9092b3980ed9748c4363664c53e69bf94948f9527a6
BLAKE2b-256 checksum
How to use checksums
a96656a228bdc2b46a2358951896c5e8d6c1d26352d9fda4b9e22245cab77a0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_impact-0.2.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 728.2 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
a8f481093d6bab3b6e3a3070f40703fc0b72e903689130e37eefecb7c8b9a2fa
BLAKE2b-256 checksum
How to use checksums
d2843b6a38141e413cc9c8b51a563fdde5ad6a30451f845e6433657c434addb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Security for wickra-impact 0.2.1

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