Skip to main content

Wickra Impact — Python

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.

Built on Wickra License: MIT OR Apache-2.0 PyO3 Docs

Install

pip install wickra-impact

Build from source

maturin develop --release

Usage

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.

License

Dual-licensed under MIT or Apache-2.0.

Release files for wickra-impact 0.1.2

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.2
File Size Uploaded
wickra_impact-0.1.2.tar.gz 56.8 kB Details

Built distributions (wheels)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Download URL wickra_impact-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl
Size 735.1 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7ccd4e15dcae95099340e6cafdbe9d0fdec875fa30096c84c7ab6c781313ccdb
BLAKE2b-256 checksum
How to use checksums
c06503032d689719b2dd55319ac2acbe1d6ede7ed6dbedabba92ad02c5963fa4
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

0.1.3

9 release files

This release

0.1.2 This release

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