{# Closed positions — historical realized lots from the Realized G/L import. Reads `closed_rows` (list of ClosedLotRow) and `closed_total_realized` from context, populated by routes/positions.py when `selected_view == 'closed'`. #}
| SYMBOL | ACCT | QTY | BASIS | PROCEEDS | REALIZED | OPENED | CLOSED | HOLDING |
|---|---|---|---|---|---|---|---|---|
| No closed positions for this period. {% if selected_period == "ytd" %} Try switching to Lifetime, or import a Realized G/L CSV via Settings ⚙ → Imports. {% else %} Import a Realized G/L CSV via Settings ⚙ → Imports to populate this view. {% endif %} | ||||||||
| {{ row.display_symbol }} | {{ row.account }} | {{ fmt_quantity(row.qty) }} | {{ fmt_currency(row.cost_basis) }} | {{ fmt_currency(row.proceeds) }} | {% if row.realized_pl > 0 %}+{% endif %}{{ fmt_currency(row.realized_pl) }} {% if row.wash_sale %} W {% endif %} | {{ fmt_date(row.opened_date) }} | {{ fmt_date(row.closed_date) }} | {{ "LT" if row.term == "Long Term" else "ST" }} |