Run one strategy spec live, side by side, byte-identical in Rust · JS · Go · Python — 100% in your browser, zero backend.
Part of the Wickra ecosystem. A web app built on the same deterministic backtest engine (wickra-backtest) that powers the rest of the stack.
Every other TA/backtest library claims cross-language consistency. The
playground proves it, live: you write one StrategySpec, and the app runs it
through the same Rust core compiled along four independent paths — Rust→WASM,
JS-over-WASM, Go-over-WASM, and Python-over-Pyodide — then shows the four
BacktestReports in a diff view. When they are byte-identical, the diff reads
0 differences. Any drift in any panel is a bug you can see.
It is a static site: no server, no API key, nothing to host but files. The market data is fetched client-side (a Binance public stream or a bundled CSV), and every computation happens in your browser.
- You edit a
StrategySpec(indicators, entry/exit rules, sizing, costs) and pick a candle dataset. - The app hands the same spec and the same candles to each language panel.
- Each panel runs the core's
run_json(candles, spec)over its own binding path and returns the canonical report JSON verbatim. - The diff view hashes and compares the reports. Identical bytes → "0 differences"; the cross-language claim, proven in front of you.
The whole point is byte-identity. The core is deterministic (no RNG, no
per-language float reformatting), every binding forwards the core's run_json
string unchanged, and the diff view compares the raw bytes — so a green run is a
live proof, not a marketing line.
npm install
npm run dev # local dev server
npm run build # static build into dist/
npm run test # the determinism + diff unit testsNote: the app depends on
wickra-backtest-wasm, which is not yet on npm (its release is gated). Until it publishes,npm installcannot resolve the lockfile.
Four ready-to-run StrategySpec presets ship in the editor, each with a bundled
deterministic dataset:
- SMA crossover — fast/slow simple-moving-average cross.
- RSI reversion — buy oversold, sell into strength.
- MACD trend — MACD line crossing the zero level.
- ATR breakout — a Keltner-style breakout above an ATR band.
Pick one from the dropdown, edit the JSON, and every panel re-runs live.
The data source has three modes:
- Preset — the bundled CSV for the selected preset (fully static).
- Upload — drop in your own
ts,open,high,low,close,volumeCSV. - Binance — fetch recent klines for any symbol/interval directly from the
Binance public API (keyless; falls back to the
data-api.binance.visionmirror, then to the last-loaded dataset).
Whatever the source, all panels receive the exact same candles — that single source is what makes the byte-diff meaningful.
This repo is a GitHub template: click Use this template to spin up your own
byte-identity playground against a fork of the engine, or as a starting point for
any WASM-core-in-the-browser proof. The spec in the URL (#spec=<base64>) makes
every run a shareable, forkable link.
src/
main.ts app entry
App.vue the shell: spec editor + data source + panel grid + diff
spec/schema.ts the StrategySpec type + presets
runner/ one runner per language path (rust, js, go, python) + registry
lib/ wasm loader, candle loader, Binance client, hash, diff
components/ SpecEditor, DataSource, LangPanel, PanelGrid, DiffView, AboutCore
public/data/ bundled deterministic candle CSVs
See CONTRIBUTING.md and the Code of Conduct.
Report vulnerabilities per SECURITY.md.
Dual-licensed under either MIT or Apache-2.0, at your option.
wickra-playground is research and engineering tooling, not financial advice. A
byte-identical report attests only that the four language paths compute the same
deterministic result from the same spec and data — it makes no claim about the
quality, profitability or future performance of any strategy. Trading carries
risk; you are responsible for your own decisions. Everything runs in your own
browser: no hosted service, no data collection, no warranty.
