Skip to content

Interactive backtest

Everything below runs locally in your browser: the yuzu engine and the lemon parser are compiled to WebAssembly, and the backtest is evaluated against a small synthetic sample dataset (8 tickers, ~3 years of daily bars). Nothing is sent to a server.

Ready. Runs entirely in your browser on a synthetic sample dataset.

Things to try

  • is_largest(sma(close, 2), 1) — concentrate into a single name.
  • close > sma(close, 50) — a pure trend filter across the whole universe.
  • is_smallest(pe, 3) and (close > sma(close, 20)) — cheap and trending.
  • is_largest(rsi(close, 14), 3) — momentum by RSI.

New to the syntax? Start with Your first strategy, or browse the lemon reference for the complete operator set.

How it works

  1. Your source is parsed by lemon-wasm into a JSON Expr tree (the spec).
  2. The spec, the sample panels, and a config are handed to yuzu-wasm.run_backtest(...).
  3. The returned Report (equity curve + metrics) is drawn above.

That’s the same pipeline the native engine runs — see Reading a report to decode the output.