{% if not portfolios %}
no portfolio snapshots yet
{% else %} {% for p in portfolios %} {# --- overall block --- #}
{{ p.name }} {% if p.snapshot_at %}{{ p.snapshot_at.strftime("%Y-%m-%d %H:%M UTC") }}{% else %}—{% endif %}
Total
{{ p.total_value | money }} {{ p.currency }}
Invested
{{ p.invested | money }}
Cash
{{ p.cash | money }}
Unrealised P/L
{{ p.unrealized_ppl | signed }} {% if p.total_cost and p.unrealized_ppl is not none %} ({{ "%+.2f"|format(p.unrealized_ppl / p.total_cost * 100) }}%) {% endif %}
Realised P/L
{{ p.realized_ppl | signed }}
Positions
{{ p.positions | length }}
{# --- per-position table --- #} {% for pos in p.positions %} {% endfor %}
Ticker Name Qty Avg Last P/L %
{{ pos.ticker }} {{ pos.name or "" }} {{ pos.quantity | price }} {{ pos.average_price | price }} {{ pos.current_price | price }} {{ pos.ppl | signed }} {% if pos.ppl_pct is not none %}{{ "%+.2f"|format(pos.ppl_pct) }}%{% else %}—{% endif %}
{% endfor %} {% endif %}