Skip to content

Wickra ImpactThe backtester that knows you moved the market.

Agent-based fills on the real historical L2 order book — your order is walked through recorded liquidity level by level, so slippage is measured, not guessed. Deterministic and byte-identical across ten languages.

Wickra Impact

The spec is JSON, not code

An ImpactSpec is a strategy (the same StrategySpec a backtest runs), a book_model, a participation_cap and a latency_ms. The strategy decides what to trade; the book model decides how the fill eats the recorded liquidity.

json
{
  "strategy": {
    "spec_version": 1, "symbol": "BTCUSDT", "timeframe": "1h",
    "indicators": { "ema": { "type": "Ema", "params": [20] } },
    "entry": { "cross_above": ["close", "ema"] },
    "exit":  { "cross_below": ["close", "ema"] },
    "sizing": { "type": "fixed_qty", "qty": 5.0 },
    "execution": { "order_type": "market", "fill_timing": "next_open" }
  },
  "book_model": { "kind": "orderbook_walk" },
  "participation_cap": 0.2,
  "latency_ms": 50
}

Install

The same impact-aware backtest from every language — native Rust, Python, Node.js and WASM, plus a C ABI for C, C++, C#, Go, Java and R.

pip install wickra-impact

Run it from any language

Construct an Impact from the JSON spec, then drive it with command(json) -> json. Every binding returns the same impact-aware report.

import json
from wickra_impact import Impact

spec = json.dumps({
    "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(spec)
data = {"IMPACT": [{"time": 0, "open": 100, "high": 101, "low": 99, "close": 100, "volume": 1000}]}
report = json.loads(impact.command(json.dumps({"cmd": "run", "data": data})))
print(report["stats"])  # carries the market impact a naive backtest hides

Built on the Wickra core

Wickra Impact is part of the Wickra ecosystem. It inherits the wickra-backtest engine over the 514 indicators of wickra-core, and changes only how orders fill — so a strategy sees exactly the same numbers, but pays the slippage it would really have paid.

Wickra Impact is a software library, not a trading system, and comes with no warranty — a backtest is not financial advice. Use at your own risk.