Resolution

All pages

The Dutch and EU owner

What the fund does for an owner who lives in the Netherlands and invests through EU brokers: Box 3, dividend withholding, broker CSV imports, EU product facts, exchange calendars, the euro risk-free rate, European benchmarks, GDPR export and erase, and the Dutch interface. Built for issue #3; the decision is 0012.

Everything on the tax page is information, not tax advice. The Belastingdienst's own figures and the owner's tax return decide. Every page, CSV and API answer that carries a tax figure says so.

Pages

RouteTitleFileWhat it holds
/taxTax (NL) / Belastingweb/views/tax.jsBox 3 on 1 January, the computation step by step, the cited parameters, the dividend ledger per country, the CSV export and a printable page
/importsImportweb/views/imports.jsBroker CSV upload with a dry-run preview, past imports, recent attested transactions, supported layouts, your data (GDPR), EU reference

Styles are in web/eu.css and use the app's variables only, so both themes and print work without their own rules.

Box 3

src/tax/params.ts, src/tax/box3.ts, src/tax/prices.ts.

Wealth on 1 January is built from the Record, line by line, and each line says where it came from:

  • you: a balance you state (POST /api/tax/balance), such as a savings account, another asset or a debt. The latest statement per label wins; 0 removes the line.
  • import: holdings rebuilt from imported transactions dated before 1 January, plus the last cash balance each broker reported before that date. Foreign-currency cash has no euro value until you state one; it is shown and left out of the total.
  • fund: the fund's own book. A paper book is an exercise, not wealth you own. It is shown for illustration and is not in the total. Once the fund trades real money, its positions and cash count.

Prices are looked up in this order:

  1. A year-end close you state (POST /api/tax/valuation), such as the close on your broker's annual statement.
  2. The market's last close before 1 January. In demo mode this is a simulated close, and the page says so.
  3. The last trade price, labelled as not a close.
  4. Nothing: the line shows "no price" and stays out of the totals rather than being guessed.

The computation follows the method in force since 2023: deemed returns per category, then the allowance, then the rate. Each step is returned with its formula. A fiscal partner doubles the allowance and the debt threshold. The page does not compute counter-evidence (tegenbewijs), the actual-return route; it only explains it.

Parameters and the null policy

YearAllowanceDebt thresholdRateBankOtherDebtsStatus
202357,0003,40032%0.92%6.17%2.46%definitive
202457,0003,70036%1.44%6.04%2.61%definitive
202557,6843,80036%1.37%5.88%2.70%definitive
202659,3573,80036%1.28%6.00%2.70%bank and debts provisional (voorlopig)
2027nullnullnullnullnullnullnot published
  • Each row cites the Belastingdienst page it was read from (berekening-box-3-inkomen-<year>) and the day it was read (2026-09-25).
  • A figure that is not published or not verified is null. It is never carried over from the previous year and never estimated. With any null, no computation is made and the page says why.
  • A year outside the table returns not_verified everywhere.
  • Update a row only from the Belastingdienst's page, and update its read_on date when you do.

Dividends and withholding

src/tax/dividends.ts. Dividends come from imported account statements (dividend.recorded) or from a manual entry (POST /api/tax/dividend).

  • Countries. A dividend is grouped by the country in the event, or else by the ISIN prefix. For a fund, the ISIN prefix is the fund's domicile, not the country of the underlying shares.
  • Corrections. A later row with the same fingerprint replaces the earlier one.
  • Foreign currency. A payment in a foreign currency without a euro rate is listed as unconverted and left out of the totals.
  • Treaty rates. TREATY_REFERENCE holds statutory and treaty rates for NL, US, DE, FR, BE, CH, DK, ES and GB. They are a reference, not a determination: the treaty text and its conditions decide. "Above treaty" is the withholding above the treaty rate, which may be reclaimable from the source country. The page shows the caveat next to the table.
  • Empty state. With no dividends, the page says which exports bring them in.

Export

GET /api/tax/export.csv?year=&partner=1 returns one UTF-8 CSV with a BOM, so Excel reads the euro sign correctly. It holds the Box 3 lines, the totals, the computation steps, the parameters with their source, and the dividend ledger. Numbers use a decimal point. The page's Print button prints the same content; the print styles hide the controls.

The cost of a trade

Analytics → Costs splits every fill into three parts:

  • Commission: from the broker's statement.
  • Spread: shown as not recorded until fills carry the mid price.
  • FX markup: for a Dutch investor buying a USD or GBP listing, the FX markup is usually the largest of the three, and the easiest to miss.

The FX markup comes from the first source that exists, in this order:

  1. The figure the broker stated.
  2. The gap to the ECB reference rate, once you have fetched the rates.
  3. The broker's published tariff.
  4. Otherwise, unknown.

Every tariff row names its source and the date it was read. The approval ticket shows the expected cost before you sign (GET /api/eu/costs/quote).

Box 3 actual return (tegenbewijs)

Tax → Actual return computes the actual return on your investments for a calendar year and compares it with the two deemed returns. That is the evidence the tegenbewijsregeling asks for.

It computes no tax. It exports a CSV for you or your adviser, and marks which parts of the reform timeline are still contested.

Its limits, stated on the page:

  • Fees are not deducted.
  • Dividends are gross.
  • The comparison basis still needs checking against the Belastingdienst's own guidance.

ETF look-through

Book → Look-through reads an issuer's holdings file and shows what an ETF actually holds, by name, sector and country, so you can see concentrations the caps would miss.

It is LOG grade only: the kernel's caps still act on the ETF itself. Only the iShares layout has been checked against a real file; Vanguard and Xtrackers files are marked unchecked. A fund with no holdings file says so rather than guessing.

Regulatory position

regulatory-position.md explains why one person managing only their own money with a self-hosted tool falls outside the MiFID II and Wft licence regimes, and what would change that. It is not legal advice; have it checked once.

Broker CSV imports

src/imports/csv.ts, src/imports/brokers.ts, src/imports/engine.ts. Fixtures are in test/fixtures/imports/.

The model. Imported rows are the owner's attested history. They are never orders of this fund and never enter its book.

  • Preview. POST /api/imports/preview is a dry run and writes nothing. It returns:
    • the layout recognised;
    • every row, normalised as a trade, dividend, cash movement or skip;
    • a fingerprint per row, with duplicates against the Record marked;
    • warnings for an unverified layout, a layout mismatch, a file imported before, or rows without a euro rate.
  • Commit. POST /api/imports/commit needs attest: true. It appends one import.recorded event, then a transaction.attested, dividend.recorded or cash.attested event per new row, all with producer owner, through the Record like every other event.
  • Duplicates. A row's fingerprint hashes the broker and the row's content, with an occurrence counter, so two identical rows in one file stay two rows. Importing an overlapping file adds only the rows not already in the Record.
  • Limits. 4 MB and 5,000 rows per file.
  • Encoding. The browser tries UTF-8 first and falls back to Windows-1252, which older Flatex and Bolero exports use. The delimiter (comma or semicolon) and the decimal comma are detected.

Layout provenance

LayoutStatusWhere the columns come from
DEGIRO Transactions.csv (NL, EN)verifiedHeaders match DEGIRO's export as documented by existing open-source importers and public samples
DEGIRO Account.csvverifiedAs above. The description column carries the kind: Dividend, Dividendbelasting, Storting and so on
Saxo Transactions reportverifiedAs above. Dividends are net, and the tax withheld is not in this file
Trade Republicverified through pytrTrade Republic has no CSV export. This layout is the community tool pytr's export_transactions output, not a Trade Republic product
BUXverifiedAs above
Flatex Depot/Kontocommunity-sourcedBuilt from layouts in other open-source importers; not confirmed against an official sample
BolerounverifiedNo published layout found. Read by common column names; the preview warns and asks for a row-by-row check. Never auto-detected unless its beurstaks column is present

The fixtures in test/fixtures/imports/ are written by hand to those layouts; none is a real owner's export. No real export from any of these brokers has been run through the importer yet. "Verified" means the column set matches published real exports. It does not mean that every broker's variant has been seen.

EU product facts and L-EU-KID

src/eu/instruments.ts gives each universe instrument:

  • its ISIN (checksum-validated) and domicile;
  • whether it is a PRIIP (packaged retail product: a fund, an ETF or a structured product; a share is not);
  • UCITS status, whether it has a KID, accumulating or distributing, and its MIC.

The owner can correct any field (POST /api/eu/metadata). The correction is recorded (eu.metadata_attested) and wins over the table.

Kernel rule L-EU-KID (compliance family, default grade SOFT, overridable per mandate grade row). A buy of a PRIIP without a KID, by an EU retail investor, warns: EU brokers may not sell such a product to retail, and a US-domiciled ETF usually has none. The rule has these cases:

  • Shares always pass.
  • Sells pass.
  • Instruments without EU facts are not evaluated.
  • HARD blocks.
  • LOG records silently.

The kernel has 26 rules; each one is listed in the rules reference.

Exchange calendars

src/eu/calendar.ts covers XAMS and XPAR (Euronext), XETR (Xetra), XLON (LSE) and XNYS (NYSE).

  • Holidays. Holidays are computed from rules: Easter (the anonymous Gregorian algorithm), Good Friday, Easter Monday, 1 May, Christmas, and so on.
  • London. London's bank holidays follow its substitution rules, as do NYSE's observed holidays.
  • Early closes. Early closes are listed.

GET /api/eu/calendar?year=&mic= returns closures, early closes, today's session and the next session. formatCet/cetLabel show Amsterdam time with the correct CET or CEST label. Tests pin 2026 closures for each venue, London's 2021–2023 substitute days and the daylight-saving switches.

These are rule-based calendars. A one-off closure an exchange announces (a state funeral, a coronation, a technical outage) is not in them.

€STR, the euro risk-free rate

src/eu/estr.ts. The rate comes from the ECB Data Portal (series EST.B.EU000A2X2A25.WT), which is public and needs no key. It is cached in <data>/estr.json and refreshed at most every 6 hours.

  • Live market mode always fetches.
  • Demo mode fetches only with ESTR_FETCH=1.
  • Otherwise, and on any failure, it uses the cache, then a fixed fallback (2.44%, observed 2026-09-24).

Analytics' Sharpe and Sortino use this rate, and the answer's risk_free names which rate was used and where it came from. The label names the fallback as a fallback.

European benchmarks

src/eu/benchmarks.ts compares the fund with:

  • AEX (^AEX);
  • Euro Stoxx 50 (^STOXX50E);
  • MSCI Europe, through a UCITS ETF that tracks it. MSCI's own levels are licensed, so this is a proxy and is labelled as one.

They are fetched from Yahoo in live mode. The demo market simulates only the fund's universe, so in demo mode each benchmark is reported as unavailable with the reason; no series is invented.

GDPR: export and erase

  • GET /api/gdpr lists what is held and the files in the data folder.
  • GET /api/gdpr/export is one JSON file with every Record event and every blob. Secrets (model keys, tokens, anything whose file name says key, secret, token, credential or roster) are never exported; their files are listed by name so the owner can delete them.
  • npm run erase [-- --data ./data] asks for the word ERASE to be typed.
    • It refuses while a server is running on that folder, and refuses / and the home directory.
    • It deletes the data folder, which holds the Record, blobs, caches, the access token, model keys and backups written inside it.
    • With DATABASE_URL it also drops every table the fund created.
    • Backups written elsewhere are the owner's to delete. There is no undo; export first.

Language

web/lib/i18n.js provides:

  • t(key, vars), with {name} placeholders and {n|one|other} plurals;
  • money (€ 1.234,56 in nl-NL), num, pct and day (25 sep 2026).

The locale comes from a saved setting passed to initI18n, else from localStorage['resolution-locale'], else English. Dictionaries are web/i18n/en.json and web/i18n/nl.json. The Dutch uses the Belastingdienst's, the AFM's and Dutch brokers' own terms. The glossary section (about 100 terms) is the reference for the translation pass. Choose the language under Settings, or on the first step of the founding wizard (English or Nederlands). The whole app re-renders in place: the navigation, the tape, the palette and every page. Amounts and dates on screen follow the language (€ 1.234,56 and 25 sep 2026 in Dutch); exports and the Record keep their own fixed formats.

What stays English: text the server writes, such as theses, falsifiers, objections, Record entries, kernel check detail, ladder criteria and connector descriptions. The Next strip on Today is the exception: its fixed titles, reasons and buttons are looked up by their English text and shown in Dutch, and a line it does not know is shown as sent. Kernel check names in Approvals and Settings translate through the rule catalogue when the server sends the catalogue's own wording.

API summary

MethodPathPurpose
GET/api/tax/yearsParameter table, cited
GET/api/tax/box3?year=&partner=1Box 3 overview
GET/api/tax/dividends?year=Dividend ledger per country
GET/api/tax/export.csv?year=&partner=1Year export
POST/api/tax/balance{year, category: bank|other|debts, label, amount, note?}
POST/api/tax/valuation{year, key, price_eur, on, source?}
POST/api/tax/dividend{date, instrument, isin?, gross, withholding, currency, fx?}
GET/api/importsLayouts, history, recent transactions, counts
POST/api/imports/preview{text, file_name?, broker?}, dry run
POST/api/imports/commitSame, plus attest: true
GET/api/eu/instrumentsEU product facts
POST/api/eu/metadata{symbol, isin?, domicile?, mic?, priip?, ucits?, kid?, distribution?, source?}
GET/api/eu/calendar?year=&mic=Venue calendars
GET/api/eu/benchmarksAEX, Euro Stoxx 50, MSCI Europe (live only)
GET/api/eu/risk-free€STR used by analytics
GET/api/gdprWhat is held
GET/api/gdpr/exportEverything, as JSON