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

Built distributions (wheels)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Download URL wickra_impact-0.1.0-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
9e2b8b556acfaeb8be25f5c3ac262f7dfff1dfe6f7d8b12eff36d135355bab4a
BLAKE2b-256 checksum
How to use checksums
7e28ec5efc172066d49f1de9a5c6e1d51a5aafb1af410e9eb139cf2c2510b2fe
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

0.1.1

9 release files

This release

0.1.0 This release

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