{% extends "base.html" %} {% block title %}{{ name }} · Wealth Dashboard{% endblock %} {% block heading %}{{ name }}{% endblock %} {% block lede %}

{{ isin }}{% if symbol %} · {{ symbol }}{% endif %} · {{ accounts | join(', ') }}

{% endblock %} {% block content %} {% if options | length > 1 %}
{{ _("Show in") }}
{% for c_ in options %} {{ c_ }} {% if roles[c_] == 'paid' %}{{ _("paid in") }}{% elif roles[c_] == 'quoted' %}{{ _("quoted in") }}{% else %}{{ _("base") }}{% endif %} {% endfor %}
{% if shown != currency %}{{ _f("every amount at its own day's ECB rate; today's price at today's. The rows below stay as booked, in {currency}.", currency=currency) }}{% endif %}
{% endif %}
{{ _("Held") }}
{{ qty(quantity) }}
{{ _("the running sum of every row below") }}
{{ _("Net invested") }}
{{ money(net_invested, shown) }}
{% if realised.open_quantity > 0 and realised.avg_cost and shown == currency %}{{ _f("units held cost {amount}, {avg} each", amount=money(realised.open_cost, currency), avg=qty(realised.avg_cost | round(2))) }}{% else %}{{ _("buys minus sales, fees included") }}{% endif %}
{{ _("Income") }}
{{ money(income, shown) }}
{{ _("dividends and interest") }}{% if costs.fees or costs.taxes %} · {{ _f("fees {fees}, tax {taxes} paid", fees=money(costs.fees, shown), taxes=money(costs.taxes, shown)) }}{% endif %}
{{ _("Return (TWR)") }}
{% if perf.twr is not none %}{{ '%+.1f' | format(100 * perf.twr) }} %{% else %}—{% endif %}
{% if perf.twr_annual is not none %}{{ _f("{pct} % a year, since {date}", pct='%+.1f' | format(100 * perf.twr_annual), date=d(perf.since)) }}{% elif perf.since %}{{ _f("since {date}", date=d(perf.since)) }}{% else %}{{ _("no price history yet — it arrives with the next price refresh") }}{% endif %}
{{ _("Your money (MWR)") }}
{% if perf.mwr is not none %}{{ '%+.1f' | format(100 * perf.mwr) }} %{% else %}—{% endif %}
{{ _("a year, on what went in and came out") }}
{{ _("Value") }}
{% if price %}{{ money(quantity * price.price, price.currency) }}{% else %}—{% endif %}
{% if unrealised is not none %}{{ _f("{amount} unrealised", amount=money(unrealised, price.currency)) }} · {% endif %}{% if price %}{{ _f("at {price} on {date}", price=qty(price.price | round(2)), date=d(price.as_of)) }}{% if price.quoted %} · {{ _f("quoted {price} {currency}", price=qty(price.quoted.price | round(2)), currency=price.quoted.currency) }}{% endif %}{% else %}{{ _("no market price yet") }}{% endif %}

{{ _("Since the first purchase") }}

{{ _("what it was worth against what went in, day by day") }}

{{ _("Value is the units held times the price of the day — the market price where the app has one, the last price paid before that. Invested is buys minus sales, fees included. Dividends and interest are drawn as their own line, because they are return that never shows in the value.") }} {{ _("A price quoted in another currency than the shares were paid in is turned into theirs at the day's ECB rate, so the lines are one currency.") }}

{% from "_benchmark.html" import benchmark_card with context %} {{ benchmark_card(benchmarks, isin, shown) }} {% if realised.sales %}

{{ _("Realised gains") }}

{{ _n(realised.sales | length, "{n} sale", "{n} sales") }} · {{ _("FIFO") if realised.method == 'fifo' else _("average cost") }} · {{ _("change") }}
{% for s_ in realised.sales | reverse %} {% endfor %} {% for y, v in realised.by_year.items() | reverse %} {% endfor %}
{{ _("Date") }}{{ _("Account") }}{{ _("Units sold") }} {{ _("Proceeds") }}{{ _("Cost of those units") }}{{ _("Gain") }}
{{ d(s_.date) }} {{ s_.account }} {{ qty(s_.quantity) }} {{ money(s_.proceeds, s_.currency) }} {{ money(s_.cost, s_.currency) }} {{ money(s_.gain, s_.currency) }}{% if s_.cost %}{{ '%+.1f' | format(100 * s_.gain / s_.cost) }} %{% endif %}
{{ y }}{{ money(v, currency) }}
{{ _("All time") }}{{ money(realised.total, currency) }}

{{ _("Each sale against the cost of the units it sold, lots kept per account — a unit bought at one broker is never sold at another. Under FIFO the oldest units go first, which is how Germany taxes; under average cost every unit costs the average paid, the French prix moyen pondéré. Units that arrived without a purchase — a transfer in — cost what their row says, or nothing; units that left without a sale realise nothing.") }}

{% endif %}

{{ _("Every row behind this holding") }}

{{ _n(rows | length, "{n} row", "{n} rows") }} · {{ _("by year and month, newest first") }} · {{ _("Export as CSV") }}

{{ _("If a figure is wrong — a quantity a statement read badly, a price in the wrong currency — correct it here. A correction stays: the next import recognises the row and leaves it alone. Sizes are typed unsigned; the kind supplies the sign. The amount is the whole cash effect as the broker booked it, fees and taxes included.") }}

{% for y in groups %}
{{ y.year }} {{ _n(y.count, "{n} row", "{n} rows") }} {% if y.bought %} · {{ _f("{amount} bought", amount=money(y.bought, currency)) }}{% endif %} {% if y.sold %} · {{ _f("{amount} sold", amount=money(y.sold, currency)) }}{% endif %} {% if y.income %} · {{ _f("{amount} paid out", amount=money(y.income, currency)) }}{% endif %}
{% for mo in y.months %}
{{ mon(mo.month) }} {{ _n(mo.count, "{n} row", "{n} rows") }} {% if mo.bought %} · {{ _f("{amount} bought", amount=money(mo.bought, currency)) }}{% endif %} {% if mo.sold %} · {{ _f("{amount} sold", amount=money(mo.sold, currency)) }}{% endif %} {% if mo.income %} · {{ _f("{amount} paid out", amount=money(mo.income, currency)) }}{% endif %}
{% for r in mo.rows %}
{{ kind_label(r.kind) }} {{ d(r.txn_date) }}
{{ r.account_name }} · {{ r.source or '—' }}{% if r.edited_at %} · {{ _f("corrected {date}", date=d(r.edited_at)) }}{% endif %} {{ r.description[:80] }}
{{ _("fee") }} {{ qty(r.fee) if r.fee else '—' }} {{ _("tax") }} {{ qty(r.tax) if r.tax else '—' }}
{{ money(r.amount, r.currency) }} {% if r.quantity is not none %}{{ qty(r.quantity) }}×{% endif %} {% if r.price %}{{ qty(r.price) }}{% endif %} → {{ qty(r.running) }} {% if r.sale %}{{ _f("{amount} realised", amount=money(r.sale.gain, r.currency)) }} · {{ _f("cost {amount}", amount=money(r.sale.cost, r.currency)) }}{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}

{{ _("A correction survives the next import: the row is recognised by its id and left as you set it. So does a removal — the id is remembered, and an import or a sync leaves that row out.") }}

{{ _("Add a transaction") }}

{{ _("for this holding — the ISIN and the name are filled in") }}
{% if add_error %}
{{ add_error }}
{% endif %} {% if add_accounts %}

{{ _("In the account's currency. A dividend, a fee or a tax added here is filed against this holding, so it shows among its rows and in its income above. Sizes are typed unsigned — whether the money went in or out follows from what happened.") }}

{% else %}

{{ _("There is no broker account to add it to — create one under Accounts first.") }}

{% endif %}

{{ _("Record a split") }}

{{ _("when the units changed and the money did not") }}

{{ _("A split adds a row per account — the units that appeared, at no cost — so the quantity above is right from that day on. Earlier rows keep the units and prices of their day; the chart values them in today's units, as Yahoo's history is, and a lot keeps its cost, so a later sale realises the same gain it would have in the old units. Write 1:10 for a reverse split.") }}

{% endblock %} {% block scripts %} {% endblock %}