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.1.6

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.6
File Size Uploaded
wickra_impact-0.1.6.tar.gz 61.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for wickra-impact 0.1.6
File
wickra_impact-0.1.6-cp39-abi3-win_arm64.whl CPython 3.9 abi3 Windows ARM64 Details
wickra_impact-0.1.6-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
wickra_impact-0.1.6-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details
wickra_impact-0.1.6-cp39-abi3-musllinux_1_2_aarch64.whl CPython 3.9 abi3 Linux musl 1.2+ ARM64 Details
wickra_impact-0.1.6-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.6-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
wickra_impact-0.1.6-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
wickra_impact-0.1.6-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.6.tar.gz

Download URL wickra_impact-0.1.6.tar.gz
Size 61.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4c72d45daa1d58bf99ddf748708d9bd5c60fe6baebf20215cabe7f7f80c1bcd9
BLAKE2b-256 checksum
How to use checksums
11ae189baff14ef0f70e057da29d53c6d473e0cbafada8a209f9e693edda0794
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

Download URL wickra_impact-0.1.6-cp39-abi3-win_amd64.whl
Size 649.0 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
8ff531deed161ea8c5e2f10a23da50c03d13b17d9efcfbeabd4180614b5475ab
BLAKE2b-256 checksum
How to use checksums
6d19a0b41f170d979e7b413662c9300720b0fc7703b9e212fc31bdfa1369f2b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

Download URL wickra_impact-0.1.6-cp39-abi3-musllinux_1_2_aarch64.whl
Size 873.0 kB
Tags CPython 3.9 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
622c59e2aa4cb2236f9cdb9d3de1b087f6e880416aafbdd0ea223dfa5e8e22e1
BLAKE2b-256 checksum
How to use checksums
d322058974d30ed05790ceaff42e3770f8e67f38163e650f52d2e2373e894d94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

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

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

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

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

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

Release history Release notifications | RSS feed

0.2.0

9 release files

This release

0.1.6 This release

9 release files

0.1.5

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