Prepare EUR realised-gains workpapers for a Portugal Anexo J filing
An agent turns your broker's annual reports into a realised-gains table in EUR, using the exchange-rate method your accountant confirms, and flags dividend withholding, ready for your accountant to review.
How it works
- Before converting anything, confirm with your accountant and write down {{fx_method}}: rate source, trade date vs settlement date, whether cost and proceeds are converted on their own dates or the net gain at one date, and the fallback when no rate is published (weekends and holidays). Also confirm how gains, losses and dividends should be grouped for the foreign-income annex.
- Export the annual realised-trades and dividend reports from your broker.
- Run {{fx_script}} to convert each amount to EUR using the exchange-rate method your accountant has confirmed (for example official reference rates for the relevant dates); never type a rate by hand. The script computes every converted amount; the agent must not.
- Ask the agent to group realised gains, losses and dividends the way your accountant needs them for the foreign-income annex.
- Ask the agent to flag withholding tax on dividends and any rows with missing dates, rates or currencies.
- The agent shows you a preview of the tables and notes; you confirm before they are saved to your own journal or sheet.
- Save the tables and the assumptions notes to your journal.
- Your accountant reviews everything before anything is filed.
Copy-paste prompt
All processing must be done via the local {{fx_script}} you have already validated with your accountant. Do not query external APIs or type any rates yourself. Output must include full reconciliation of input row counts.
Prepare annual tax workpapers from {{eur_trades_csv}} and {{eur_dividends_csv}}, already produced by running {{fx_script}} under {{fx_method}}. This is not tax advice; my accountant reviews it.
1. Do not convert currencies and do not type or estimate any exchange rate. If a row is not already in EUR, flag it and stop.
2. Produce a realised-gains table and a dividends table with withholding tax shown separately.
3. Flag rows with missing dates, rates, currencies or descriptions.
4. Add a notes section listing {{fx_method}}, the rate source, date convention, weekend fallback, and any other assumptions.
5. Do not map figures onto Anexo J line numbers.Guardrails
- Your accountant reviews it; this is not tax advice.
- Exchange rates come from a script and a documented source.
- Assumptions listed explicitly.
- Shows a preview/diff of the workpaper rows before writing anything to your journal or sheet; nothing is written until you confirm.
- Run the Python conversion script locally on your own machine; never upload raw broker CSVs to cloud language models if the data contains personal identifiers. Use air-gapped or privacy-focused tools where possible.
What can go wrong
Mixing trade-date and settlement-date rates, or one average rate for the whole year, creates differences that are tedious to unpick later. Agree the method with your accountant first and record it in the workpapers. AI can silently drop rows, mis-map instrument types, or apply wrong settlement versus trade dates; always reconcile row counts and totals to the original broker reports before accountant review. An incorrect exchange-rate method choice can trigger tax authority queries years later.
Why it helps
The annual tax return is much easier when the data is clean and in EUR before you meet your accountant.
Note
Portuguese tax rules change. Treat the official Portal das Finanças documents and your accountant as the authority; this workflow only prepares the numbers.
Source and references
Original write-up by Agents for Traders. Background reading is linked below.
- Modelo 3 IRS, Anexo J (rendimentos obtidos no estrangeiro) · Portal das Finanças (Autoridade Tributária e Aduaneira) (checked 17 Oct 2026)
- Fiscalidade de Produtos Financeiros para Pessoas Singulares (guia) · Portal das Finanças (Autoridade Tributária e Aduaneira) (checked 17 Oct 2026)
- Euro foreign exchange reference rates · European Central Bank (checked 17 Oct 2026)
Spotted an error, or want your post removed? Email hello@agentsfortraders.com.
Educational content only. Not investment advice or a personal recommendation. No tickers, signals or trade alerts. Trading involves risk of loss.
Conteúdo exclusivamente educativo. Não constitui aconselhamento nem recomendação de investimento. Sem tickers, sinais ou alertas de negociação. Negociar envolve risco de perda.
Related use cases
The Daily 3
Three agent workflows for swing traders, free, on US trading days.