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

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.3
File Size Uploaded
wickra_impact-0.1.3.tar.gz 59.2 kB Details

Built distributions (wheels)

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

Download URL wickra_impact-0.1.3.tar.gz
Size 59.2 kB
Tags Source
SHA-256 checksum
How to use checksums
198d281e38d2746f9771b43f8427b2b345c46e22d7a86e790be52fc43f992d59
BLAKE2b-256 checksum
How to use checksums
3c47a113adad41df440af356f0c83bd56117fb742f07b146c493e7c425b0abad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

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

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

Download URL wickra_impact-0.1.3-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
58bd418c5b5412ecf9bd5e45ef4ada6e56a8b9615bc3c16e7f44f95da20a0f0d
BLAKE2b-256 checksum
How to use checksums
70babb88fdc2f981eccb495ec5b7b8a0d9da6178d68be550c83394814725eb81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

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

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

Download URL wickra_impact-0.1.3-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
0a624a0c7126b61d148594090512812bea47db9630aceb00d06101fec913a48f
BLAKE2b-256 checksum
How to use checksums
9447cf87c9fc30105f408371db5eb563eb7283c254cd4796d7bd1d5490818783
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_impact-0.1.3-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
297c06697094c38f0cc4e55c2c075d947d9f1ca42de5c1110c07336336901fcf
BLAKE2b-256 checksum
How to use checksums
d1ab629cc0719897f300ae3198eff1deded131f978d02d374471319a8f65aae5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_impact-0.1.3-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
170b2747ffa3e39963ecdddf1c78277ac65d60d7901b7efb4c1dbfcfef06baaa
BLAKE2b-256 checksum
How to use checksums
5fc79afbb10baa5ea7f54fa36f9ed5757f412a32ccc44bd5ee50321348f1a32a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

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

Download URL wickra_impact-0.1.3-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
22a26093d9209591ac9932cf1341737c0a37da5ffbb37f5a26545f75b9933ab7
BLAKE2b-256 checksum
How to use checksums
8a507a4c8785280fff3bfdbd25767ac6b1676eb1710639878f27ef5a0733068f
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

0.1.4

9 release files

This release

0.1.3 This release

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