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.

Release files for wickra-impact 0.1.5

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.1.5
File Size Uploaded
wickra_impact-0.1.5.tar.gz 61.3 kB Details

Built distributions (wheels)

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

Total release size: 6.0 MB

Release files / wickra_impact-0.1.5.tar.gz

Download URL wickra_impact-0.1.5.tar.gz
Size 61.3 kB
Tags Source
SHA-256 checksum
How to use checksums
be3b81d846490ebf37731d11d418f7c57c27bf1996ca1a3f190c20f3ed5a0ea1
BLAKE2b-256 checksum
How to use checksums
5be68fc2dee406c64b02d9600fae755e9572fd6aeda21c24c158822dfb52a8c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_impact-0.1.5-cp39-abi3-win_arm64.whl
Size 568.1 kB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
87c99ea7cc2d0f3da1b16a0a8249fefd1d15c8f79085d8465046d9863a9c56f4
BLAKE2b-256 checksum
How to use checksums
e164886bd8b3799f1464cc6bb3da39e67b00282d975a192522b45dac5eb39539
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_impact-0.1.5-cp39-abi3-win_amd64.whl
Size 648.5 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ed3d769be5ca16ed81188e8a2418b4f1e34310979f8314845f93ec53ef06aba3
BLAKE2b-256 checksum
How to use checksums
777916a0faf70deaeb0d12feb73333ab48ebb8bb903541ec8a84bc4d20e8accb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_impact-0.1.5-cp39-abi3-musllinux_1_2_x86_64.whl
Size 989.8 kB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
8ec95336822a91488d2b0b96a79450b15039a599239f28b897c79c7855d90be8
BLAKE2b-256 checksum
How to use checksums
6f50f686c0678b4d57fb43a4716ae6f70bc67fc66b576b70af279cd965ecd51e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_impact-0.1.5-cp39-abi3-musllinux_1_2_aarch64.whl
Size 871.7 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
2011667f51f1fe12620654209f9a67a40060d6c80f0bc22f1ff9ce7d6a64b185
BLAKE2b-256 checksum
How to use checksums
532c8a2fac9065fd8d90d99633816441298df50b3b67341520d54d30ae355795
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

Download URL wickra_impact-0.1.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 693.5 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
1e4f0320e41b545de1487e0364baeb5f796411fb139c1f4dad6e5d65995bf6e0
BLAKE2b-256 checksum
How to use checksums
208e44a47479c0666f34dd4f645abc699eb663af784051943dc7d0dbb7b8b234
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

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

Release history Release notifications | RSS feed

This release

0.1.5 This release

9 release files

0.1.4

9 release files

0.1.3

9 release files

0.1.2

9 release files

0.1.1

9 release files

0.1.0

9 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