{# Compare result partial: Binance combined vs Bybit 4-edge over the SAME OVERLAP window, charged a per-COIN MEASURED cost (taker fee + half the Corwin–Schultz measured spread from real high/low), overlaid on one dual-series chart with a side-by-side metrics table — apples-to-apples AND de-inflated. The old flat cost flattered Binance's broad/illiquid universe; now each coin pays its real measured spread, so the broad book's gross-vs-net gap widens. Per-book turnover-weighted AVG cost drag is shown so the illiquidity penalty is auditable (the old per-book MEDIAN spread column was dropped: ~78 delisted shadow coins have no high/low → 0, dragging the median to 0.0 and reading as "no spread" while the real drag is ~45bp). NO per-day slider here — the point is the de-inflated A/B. #}
{% if no_overlap %}

no overlap between the two books for this window — Binance and Bybit don't both have data between {{ cfg.start or '(open)' }} and {{ cfg.end or '(open)' }}. Clear the dates to use the auto-detected overlap window, or pick a range both books cover.

{% else %} {% if measured_pending %}

measured-cost view pending precompute — showing flat-cost. Run fxhnt compare-measured-precompute to populate the per-coin measured-cost compare.

{% endif %}
Same window {{ window_start }} → {{ window_end }} · {% if measured_pending %}flat {{ '%.1f'|format(cfg.cost_bps) }}bp cost{% else %}per-coin MEASURED cost{% endif %} · both normalized to ${{ cfg.capital|money }} start capital.
{{ curve|safe }}
{% if not measured_pending %} {% endif %} {% for row in rows %} {% if not measured_pending %} {% endif %} {% endfor %}
book Sharpe CAGR total return max DD final $avg cost drag (bps)n days
{{ row.label }} {{ '%.2f'|format(row.sharpe) }} {{ '%.1f'|format(100*row.cagr) }}% {{ '%.1f'|format(100*row.total_return) }}% {{ '%.1f'|format(100*row.max_dd) }}% ${{ row.end_value|money }}{{ '%.1f'|format(row.cost_drag_bps) }}{{ row.n_days }}
{% if measured_pending %}

Flat-cost fallback: both books charged the same flat {{ '%.1f'|format(cfg.cost_bps) }}bp per-turnover cost over the same window, both normalized to the same start capital. This is the LIGHT view; the per-coin MEASURED-cost compare (taker fee + half the Corwin–Schultz spread) is precomputed out-of-band by fxhnt compare-measured-precompute and will replace this once available.

{% else %}

Per-coin cost = the Bybit/Binance taker fee ({{ '%.1f'|format(taker_fee_bps) }}bp) + half the Corwin–Schultz MEASURED spread (from each coin's real daily high/low); no assumed market impact. The Binance book trades a broader/illiquid universe whose measured spreads are wide, so it now pays its REAL costs — its curve de-inflates relative to the deep/liquid Bybit set. Both books over the same window, both normalized to the same start capital.

{% endif %} {% endif %}