{# Inputs: month_end_tiles: list[MonthEndEquityTile] month_end_summary: dict | None month_end_year: int month_end_year_picker_visible: bool available_years: list[int] selected_period: str selected_accounts: list[str] #}

Month-end equity

{{ month_end_year }} {% if month_end_year_picker_visible %} {% endif %}
{% for tile in month_end_tiles %} {% set _empty = tile.end_value is none %} {% set _pos = tile.mom_delta_pct is not none and tile.mom_delta_pct > 0 %} {% set _neg = tile.mom_delta_pct is not none and tile.mom_delta_pct < 0 %}
{{ tile.label }}{% if tile.is_current %} · current{% endif %}
{% if _empty %}
{% else %}
${{ '{:,.1f}'.format(tile.end_value|float / 1000) }}k
{% if tile.mom_delta_pct is not none %}
{% if _pos %}▲{% elif _neg %}▼{% else %}·{% endif %} {{ '{:+.1f}'.format(tile.mom_delta_pct|float) }}%
{% endif %} {% endif %}
{% endfor %}
{% if month_end_summary %}
{% if month_end_summary.ytd_delta_abs is not none %} {% set _ytd_pos = month_end_summary.ytd_delta_abs > 0 %} YTD {{ '{:+,.0f}'.format(month_end_summary.ytd_delta_abs|float) }} {% if month_end_summary.ytd_delta_pct is not none %} ({{ '{:+.1f}'.format(month_end_summary.ytd_delta_pct|float) }}%) {% endif %} {% if month_end_summary.best_month_label or month_end_summary.worst_month_label %}·{% endif %} {% endif %} {% if month_end_summary.best_month_label %} best {{ month_end_summary.best_month_label }} {% if month_end_summary.worst_month_label %}·{% endif %} {% endif %} {% if month_end_summary.worst_month_label %} worst {{ month_end_summary.worst_month_label }} {% endif %}
{% else %}
No activity in {{ month_end_year }}.
{% endif %}