{# Math explainer fragment for the TOTAL ACCOUNT VALUE hero KPI tile.
Receives `b: AccountValueBreakdown`. Loaded via HTMX from
/portfolio/explain/account-value and swapped into a div under the tile. #}
Total Account Value — current snapshot
{# Equation 1 — Composition: where the money sits today. #}
{# Footnote: economic vs tax-recognized clarification. #}
The Source equation uses economic realized — the cash that actually
netted from closed positions. The Realized P/L KPI tile shows
tax-recognized realized by default (with wash-sale-disallowed losses
added back to basis), so it can differ from this row.
{# Caveats. #}
{% if b.has_short_options %}
Short options estimated as intrinsic value + straight-line time decay; confirm cost-to-close with your broker.
{% endif %}
{% if b.reconciliation_residual != 0 %}
⚠ The two equations didn't fully reconcile. ${{ "{:,.2f}".format(b.reconciliation_residual|float|abs) }} is shown as "Other / unattributed" — likely an in-kind transfer-out, corporate-action adjustment, or similar flow not yet modeled by the explainer.
{% endif %}
{% if b.missing_symbols %}
⚠ {{ b.missing_symbols|length }} symbol{% if b.missing_symbols|length != 1 %}s{% endif %} carried at cost basis — no live quote
({{ b.missing_symbols[:8]|join(", ") }}{% if b.missing_symbols|length > 8 %}, +{{ b.missing_symbols|length - 8 }} more{% endif %}).
{% endif %}
{# Footer: snapshot freshness + standard disclaimer. #}
{% if b.fetched_at %}
as of {{ b.fetched_at.strftime("%b %-d") }} quotes
{% endif %}
⚠ This is informational only. Consult a tax professional before filing.