Guide · Module 3
How we compute what you gain when you sell —lot by lot, from the oldest buy to the newest, as the Spanish tax rule requires— and where your history lives.
7 min read · Public
01
FIFO (first in, first out) means each sale consumes the shares you bought earliest first. It is the Spanish income-tax rule for homogeneous securities (art. 37.2 of the IRPF Act) and the one My portfolio uses to compute the realized result.
The average cost stays visible as information —in Holdings and on the «My position» card— but is never used to compute a gain. The Simulator, by contrast, uses average cost: those are practice portfolios, not your real register.
02
Three made-up trades in dollars: two buys and one sale that eats the whole first buy and part of the second. The figures are not typed by hand: the same code as your portfolio computes them.
| Date | Side | Units | Price | Fees | EUR per 1 USD |
|---|---|---|---|---|---|
| 3 Mar 2025 | Buy | 100 | 10.00 | 5.00 | 0.92 |
| 15 Sept 2025 | Buy | 50 | 12.00 | 5.00 | 0.95 |
| 10 Feb 2026 | Sale | 120 | 14.00 | 6.00 | 0.9 |
| Lot bought on | Units | Cost per unit | Cost | Net proceeds | Gain | In EUR | Days |
|---|---|---|---|---|---|---|---|
| 3 Mar 2025 | 100 | 10.05 | 1,005.00 | 1,395.00 | +390.00 | +330.90 | 344 |
| 15 Sept 2025 | 20 | 12.10 | 242.00 | 279.00 | +37.00 | +21.20 | 148 |
| Total | 120 | 1,247.00 | 1,674.00 | +427.00 | +352.10 |
Look at the first row: the buy fee (5.00) lifts the cost per unit from 10.00 to 10.05. And the sale fee (6.00) lowers the net price from 14.00 to 13.95 on every row.
Realized with FIFO
+427.00 USD
+352.10 EUR in the tax report
With average cost it would be
+386.00 USD
average cost 10.73, only as a contrast: not your tax return's figure
What is left, at FIFO cost
363.00 USD
30 units of the second lot · unrealized +42.00 at 13.50
IRR at 30 Jun 2026
+36.5%
money-weighted, with what is left valued at 13.50
03
Everything is computed in the deal's currency. The euro only enters the tax report.
Added to the lot's cost, spread per unit.
Deducted from the sale amount, spread across the lots it consumes.
We never add different currencies: each currency has its own figures.
For the report, the buy goes at its own date's rate and the sale at its own. If you leave the rate empty, we use that day's EURUSD close (or the nearest earlier one, within a week); if we do not have it, we ask you. For other currencies, enter your broker's.
04
My portfolio is a consistent register: these rules prevent impossible figures.
You cannot sell more than you held on the sale date, nor edit or delete a buy if that leaves a later sale short.
If you buy and sell on the same day, the buy goes first.
Any change recomputes the whole FIFO from the first trade.
Lots, P&L and IRR are recomputed from your trades every time you open the page.
05
They answer different questions, which is why you see both.
Money-weighted annual return: it counts when and how much you put in and took out, and values what you still hold at the latest quote. With under a year of history it shows the period's return, not annualised.
A time-weighted base-100 index (TWR): it neutralises your deposits and measures the picks, not how much you put in.
Unrealized is what you would gain by selling what you hold today; realized is what you have already closed with sales.
06
It is all in the Portfolio tab of My space.
Every buy and sale, with its net amount and its value in euros. Edit or delete from here.
What you have sold in full: days held, realized result, IRR and how the deal ended.
Grouped by the sale's calendar year, in euros, with gains and losses apart, as in the tax return.
Your transactions and the tax-year report, in files Excel opens.
Your track record with us on one page: what you followed, invested and closed, with its figures computed on the fly. It opens from the Overview.
My space needs an account with a verified email.
Check that you recorded the same fees and the same exchange rate. Many brokers show average cost, which gives another figure; FIFO is what counts for the tax return.
The deal settled in cash. If your broker already paid you, confirm the proposed sale and the position moves to closed; if not, dismiss it.
Some trade became inconsistent (a deleted buy, for instance). To keep computing, we cap that sale at what you held; review your trades and fix them.
No artificial intelligence: figures and text computed with fixed rules from official sources. Information, never an investment recommendation or personalised advice. Full legal notice