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

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

Built distributions (wheels)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Download URL wickra_impact-0.1.1-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
8f56d2adc1eefd7ee936478cdcf65c8dc2f90336b1f053d5e6230c3aec9d7a74
BLAKE2b-256 checksum
How to use checksums
e2f9b7a43375263ab3d03f25fb95af3a497d04fc95496358e6ad5d22a47614c0
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

0.1.2

9 release files

This release

0.1.1 This release

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