{% extends "base.html" %}
{% from "_macros.html" import health_badge, plan_pill, exec_badge %}
{% block title %}{{ d.display_name }}{% endblock %}
{% block body %}
← Overview
{# ── TRADER HEADER: name + one plain-language verdict, so the FIRST thing you read is "is this working?" ──
The verdict separates the TWO signals a trader keeps confusing: the validated BACKTEST edge (years of
honest data — the real read) vs the LIVE paper record (a tiny, noisy sample while it warms up). #}
{{ d.display_name }}
{{ d.sleeve }} · {{ d.venue }}
· {{ d.gate_status }} {{ d.gate_reason }}{{ health_badge(d) }}
{% set warming = d.days is not none and d.gate_reason and 'building' in d.gate_reason %}
{# edge_ok keys on the backtest's OWN verdict. An explicit FAIL is NEVER overridden to "validated" by a high
Sharpe — that put a green "passed" directly above the FAIL badge in the card below. A strong Sharpe only
stands in when there is no formal pass/fail on record (bt_status == ''). #}
{% set bt_fail = d.bt_status == 'FAIL' %}
{% set edge_ok = d.bt_status == 'PASS' or (not bt_fail and d.bt_sharpe is not none and d.bt_sharpe >= 1.0) %}
{% if bt_fail %}
Backtest didn't clear the gate. {% if d.bt_sharpe is not none %}Its Sharpe is {{ '%.1f'|format(d.bt_sharpe) }}, but the full backtest gate marked it FAIL — {% endif %}treat it as unproven, not a validated edge{% if warming %}; the {{ d.days }}-day live record below is far too short to change that{% endif %}.
{% elif edge_ok and warming %}
Validated edge, still warming up. The backtest passed{% if d.bt_sharpe is not none %} (Sharpe {{ '%.1f'|format(d.bt_sharpe) }}){% endif %} — that's the real read. The live paper record below is only {{ d.days }} day{{ 's' if d.days != 1 }} — far too short to judge; watch it, don't react to it.
{% elif edge_ok %}
Validated edge. Passed backtest{% if d.bt_sharpe is not none %} (Sharpe {{ '%.1f'|format(d.bt_sharpe) }}){% endif %}; live paper record now confirming it.
{% elif warming %}
Building its forward record. Only {{ d.days }} day{{ 's' if d.days != 1 }} live — too short to judge yet.
{% else %}
Under review. See the numbers below.
{% endif %}
{# ── THE THREE NUMBERS THAT MATTER, big + colour-coded ── #}
{% if d.bt_sharpe is not none or backtest_reference %}
Backtested edge — the real signal (years of honest data)
{# Colour by the VERDICT, not the number: a passed edge is green; a FAIL/under-review Sharpe is neutral
grey (the figure itself — e.g. 1.7 — isn't "bad", it just didn't validate), never alarming red. #}
Sharpe {{ '%.1f'|format(d.bt_sharpe if d.bt_sharpe is not none else backtest_reference.sharpe) }}
{% if d.bt_cagr is not none %}{{ '%+.0f'|format(100*d.bt_cagr) }}%/yr · {% endif %}
maxDD {{ '%.0f'|format(100*(d.bt_maxdd if d.bt_maxdd is not none else backtest_reference.max_dd_pct/100.0)) }}%
{% if d.bt_status %}· {{ d.bt_status }}{% endif %}
{% if d.bt_oos_sharpe is not none %}· out-of-sample Sharpe {{ '%.1f'|format(d.bt_oos_sharpe) }}{% endif %}
{% endif %}
Live paper so far — {{ d.days }} day{{ 's' if d.days != 1 }}{{ ', still building' if warming }}
{{ '%+.2f'|format(d.total_return_pct) }}%
Sharpe {{ '%.1f'|format(d.sharpe) }} · maxDD {{ '%.1f'|format(100*d.maxdd) }}%
{% if warming %}
small sample — the backtest above is the read, not this{% endif %}
{% if d.alloc_dollars is not none %}
In the fund — real capital deployed here
${{ d.alloc_dollars|money }}
{% if d.alloc_weight is not none %}{{ (d.alloc_weight*100)|round|int }}% of the fund · {% endif %}{{ d.funding_label or 'funded' }}
{% elif d.funding_label == 'de-funded' %}
In the fund
$0
de-funded — held as cash
{% endif %}
{{ curve|safe }}
{# ── EXECUTION vs PLAN (only when real fills exist) — kept prominent: it's the "are the real trades tracking?" read ── #}
{% if d.recon is not none %}
Real trades vs the plan {{ exec_badge('paper') }} {{ plan_pill(d.recon) }}
{% if d.recon.has_exec %}
Tracking the plan
{{ '%.1f'|format((d.recon.divergence|abs) * 100) }}% {{ 'ahead' if d.recon.divergence >= 0 else 'behind' }}
Fees paid to date${{ '%.2f'|format(d.recon.total_fees) }}
What the real account actually did vs the modeled plan for this same book.
{% else %}
no real trades recorded yet
{% endif %}
{% if account_curve %}Value over time — real account (solid) vs plan (dashed)
{{ account_curve|safe }}
{% endif %}
{% endif %}
{# Non-IBKR exec twin (e.g. the Bybit book vs its executed testnet twin): "are the real trades tracking the
plan?". GUARDED on real exec data (exec_return_pct) so a suspended/no-fills book shows NO empty card —
it appears only once the executed twin has a forward record. Suppressed when d.recon already covers it. #}
{% if d.exec_twin_sid and d.exec_return_pct is not none and not (d.recon is not none and d.recon.has_exec) %}
Real trades vs the plan {{ d.exec_venue or d.venue }}
Real trades made{{ '%+.2f'|format(d.exec_return_pct) }}%
The plan expected{{ '%+.2f'|format(d.total_return_pct) }}%
Tracking the plan{{ '%.2f'|format(d.exec_divergence_pct|abs) }}% {{ 'ahead' if d.exec_divergence_pct >= 0 else 'behind' }}
{% endif %}
{# ── DETAILS: everything an analyst wants, demoted below the summary + the noisiest tables collapsed, so the
page reads top-down: verdict → three numbers → curve → (optional) exec → details. ── #}
Details
{% if d.holdings %}
Holdings right now{% if d.stray_holdings %} ⚠ {{ d.stray_holdings|length }} outside the book{% endif %}
{% if d.stray_holdings %}
Position outside the book: {{ d.stray_holdings|join(', ') }}. Not part of the multi-strat ETF book
(US + UCITS) — a legacy or stray holding sitting in the account. Check it: it shouldn't be carried in this
book's NLV.
{% endif %}
Marked at each holding's last trade price (no live mark), so it can lag the market.
| asset | what it is | shares | value | % of book |
{% for h in d.holdings %}| {{ h.symbol }}{% if not h.in_book %} ⚠{% endif %} | {{ h.description }} | {{ h.qty|qty }} | ${{ h.value|money }} | {{ '%.0f'|format(h.pct_of_book * 100) }}% |
{% endfor %}
{% endif %}
{% if d.recent_trades %}
Recent trades — honest cost to trade
| date | asset | action | shares | price | cost | fee |
{% for t in d.recent_trades %}| {{ t.at }} | {{ t.symbol }} ({{ t.description }}) | {{ t.action }} | {{ t.qty|qty }} | ${{ '%.2f'|format(t.price) }} | {{ '%.2f'|format(t.cost_to_trade_pct) }}% | ${{ '%.2f'|format(t.fee) }} |
{% endfor %}
{% endif %}
{% if d.per_strategy %}
Every strategy on this account
| strategy | real return | vs plan | holdings | trades |
{% for row in d.per_strategy %}{% if row.executing %}| {{ row.display_name }} | {{ '%+.2f'|format(row.recon.cum_exec_return * 100) }}% | {{ plan_pill(row.recon) }} | {{ row.position_count }} | {{ row.fill_count }} |
{% else %}| {{ row.display_name }} | not started yet |
{% endif %}{% endfor %}
{% endif %}
{% if sleeve_breakdown %}
Sleeves inside this book (each shown on its own)
| sleeve | Sharpe | ann ret% | maxDD% |
{% for sb in sleeve_breakdown %}| {{ sb.sleeve }} | {{ '%.2f'|format(sb.sharpe) }} | {{ '%+.1f'|format(sb.ann_return_pct) }} | {{ '%.1f'|format(sb.max_dd_pct) }} |
{% endfor %}
{% endif %}
{% if d.funding_label %}
Funding health — {{ d.funding_label }}
State{{ d.funding_label }}
First passed{{ d.funding_first_pass_date or '— (deploy-tier by config)' }}
De-funds after 10 straight days drifting from the backtest; re-funds after 15 clean days.
{% endif %}
Per-period returns (raw)
{% for period in ["daily", "weekly", "monthly"] %}
{{ period }}
| period | ret% | rolling mean% |
{% for p in d.periods[period] %}| {{ p.label }} | {{ '%+.3f'|format(100*p.ret) }} | {{ '%+.3f'|format(100*p.rolling_mean) }} |
{% else %}| no data yet |
{% endfor %}
{% endfor %}
Daily forward rows
| date | ret% | nav |
{% for p in d.history %}| {{ p.date }} | {{ '%+.3f'|format(100*p.ret) }} | {{ '%.4f'|format(p.nav) }} |
{% endfor %}
{% endblock %}