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

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.0
File Size Uploaded
wickra_impact-0.2.0.tar.gz 61.5 kB Details

Built distributions (wheels)

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

Total release size: 5.9 MB

Release files / wickra_impact-0.2.0.tar.gz

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

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

Download URL wickra_impact-0.2.0-cp39-abi3-win_arm64.whl
Size 569.9 kB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
6c94d64bdafe56d51c9f12402dd2ee17a37dda22a33a10046a4fe8fa695ccc4e
BLAKE2b-256 checksum
How to use checksums
65b44c6979f1802be0295f2cfcabe9cccc752d79583b704d2369f1ef50350039
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

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

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

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

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

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

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

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

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

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

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

Download URL wickra_impact-0.2.0-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
faea2ba429c23971e6df313ef9223ecbedec248e1e76a2aa76a89b9af8678605
BLAKE2b-256 checksum
How to use checksums
377ed3100675074738cb0e941fa63a807d24943519b973877106fa9378fbfad2
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.2.0 This release

9 release files

0.1.6

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