Backtest ≡ live
The engine consumes the exact same wickra-core O(1) indicator kernels that power live Wickra. The same engine, fed live bars, is the live bot — no reimplementation drift.
A streaming-native, event-driven backtester on the Wickra core. A strategy is a JSON spec, not code, so a backtest and a live run over the same spec produce identical signals — across ten languages.
A StrategySpec names the symbol, timeframe, the indicators to compute, the entry/exit rules over them, plus sizing, costs and risk. The same spec runs identically in a backtest and, fed live bars, in production.
{
"symbol": "BTCUSDT",
"timeframe": "1h",
"indicators": {
"ema_fast": { "type": "Ema", "params": [5] },
"ema_slow": { "type": "Ema", "params": [15] }
},
"entry": { "cross_above": ["ema_fast", "ema_slow"] },
"exit": { "cross_below": ["ema_fast", "ema_slow"] },
"sizing": { "type": "fixed_fraction", "fraction": 0.95 },
"costs": { "taker_bps": 5, "slippage": { "type": "fixed_bps", "bps": 2 } },
"risk": { "trailing_stop_pct": 5.0 }
}The spec can reference hundreds of wickra-core indicators by name, with multi-output fields addressed as "name.field" (macd.signal, bb.upper, adx.plus_di). Because the spec is data, the backtest report comes back byte-for-byte in every language.
The same engine 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-backtestFeed OHLCV arrays and a spec to run; the same call in every binding returns the same BacktestReport — metrics, trades, equity, fees_paid.
import wickra_backtest as wbt
spec = {
"symbol": "BTCUSDT", "timeframe": "1h",
"indicators": {"fast": {"type": "Ema", "params": [12]},
"slow": {"type": "Ema", "params": [26]}},
"entry": {"cross_above": ["fast", "slow"]},
"exit": {"cross_below": ["fast", "slow"]},
"sizing": {"type": "fixed_fraction", "fraction": 0.95},
}
report = wbt.run(opens, highs, lows, closes, spec=spec)
print(report["metrics"])Wickra Backtest is part of the Wickra ecosystem. Its indicators are the same O(1) kernels that wickra-core computes live and that wickra-exchange trades on, so a backtest reasons over exactly the numbers a live strategy would see.
Wickra Backtest is a software library, not a trading system, and gives no financial advice — backtest results are deterministic transforms of the input data and do not predict future returns. Use it at your own risk.