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

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

Built distributions (wheels)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Download URL wickra_impact-0.1.4-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
3db976b3cd35a65d4dc47429ef7a00501e5be13e39da5ec827c08355e413840b
BLAKE2b-256 checksum
How to use checksums
0490f19d53d0ecc4e04c56c94a111195b879817775496fd26af2aee7ec60cada
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release history Release notifications | RSS feed

0.1.5

9 release files

This release

0.1.4 This release

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