{% extends "base.html" %} {% from "_macros.html" import exec_badge %} {% block title %}Backtest{% endblock %} {% block body %} {# ===== BACKTEST: the HONEST real-cost curve over the Bybit books (the cockpit's only venue since Task 7a removed the legacy venue toggle + the legacy-vs-bybit "compare" view) — same header/section/badge skin as Overview + Paper. book + capital + period -> the precomputed MEASURED (real per-coin L1 spread) curve. There is NO configurable cost: the cost is a measured FACT, not a slider (a draggable cost is a fund foot-gun — drag it to 0 and you resurrect the +7097% mirage). The Bybit 4-edge DEPLOY book is the default (the honest deployable curve; the fund's crypto allocation targets this risk-parity book again, reverted 2026-07-16 — plan `2026-07-16-book-representation-and-venue-cap.md` Task A). PAPER-badged. ===== #}
{# ── TRADER HEADER: h1 + a one-line subtitle. No orientation blurb — the form + curve below carry the page. #}

Backtest {{ exec_badge('paper') }}

a what-if on capital & period at real trading cost, read-only — for the actual traded track see Replay
{# Book switch — Bybit 4-edge (deploy, default) · Bybit 4-edge levered (shadow) · the IBKR paper books (Task 1/D1), each labeled in PLAIN LANGUAGE via book_labels — never the raw registry id. Relative URLs. #}
{% for b in books %} {% if b == 'bybit_4edge' %}Bybit 4-edge book · deploy {%- elif b == 'bybit_4edge_levered' %}Bybit 4-edge levered · shadow {%- else %}{{ book_labels.get(b, b) }}{% endif %} {% endfor %}
{# Wired with HTMX ATTRIBUTES (not an inline