๐ Period PnL (Profit and Loss)
๐ก What is Period PnL?
The absolute monetary gain or loss generated by your portfolio within \([t_0, t_1]\), adjusted for external cash flows.
๐งฎ Formula
The baseline delta comes from cumulative_external_cash_flow, so it includes cash flows and priced in-kind ADJUSTMENT/TRANSFER capital. An outgoing ADJUSTMENT has no value and takes nothing out (Deposited Capital โ Outgoing Adjustments).
๐งฎ Decomposition
| Component | Definition |
|---|---|
| \(\Delta\mathrm{UGL}\) | Change in unrealized gain/loss over the period: market value โ open cost basis of the positions held at each boundary, securities in transit left out (the period unrealized) โ for assets priced in another currency, including the exchange-rate effect on their historical cost |
| Realized | Sum of (proceeds โ historical cost of the units given up) for the SELLs in period and the outgoing ADJUSTMENTs not linked to a split, whose proceeds are zero; proceeds are converted at the transaction's date (Portfolio Engine โ ยง8) |
| Income | DIVIDEND + INTEREST in period |
| FeesTaxes | FEE + TAX in period |
| Other | What closes the identity: the exchange result on cash held in another currency (FX on cash), the gain securities accrued outside the view before crossing its boundary (transfers at market value), plus a residual |
Other is computed as:
Because the cost basis keeps its historical exchange rates (see Book Value), the effect of exchange rates on foreign assets is part of \(\Delta\mathrm{UGL}\), not of Other. Cash held in another currency is different: NAV and Book both value it at each day's rate, so its exchange-rate effect cancels in the unrealized gain/loss and is not in \(\Delta\mathrm{UGL}\). It is the first part of Other, the FX on cash of each broker \(b\), which the Period view shows per broker. The second part, the transfers at market value, is shown per broker too:
The residual holds what neither the four components, the exchange result on cash nor the transfers at market value can see:
- the exchange-rate move of cash while it travels between two brokers: in transit, it belongs to no broker's balance;
- the cost of a currency exchange, at one broker or across two: โ1,000 USD worth โฌ920 at the day's rate, exchanged into +โฌ900, gives โโฌ20, which is neither a fee nor a sale;
- the value of assets travelling between two brokers on a boundary day;
- a sale left out of Realized because its proceeds could not be converted, or a sale or an outgoing ADJUSTMENT left out because its position's cost is incomplete.
- the cost of dust: a sale that leaves \(10^{-5}\) units or fewer in a position takes what is left out of the open cost basis without selling it, so its cost is in neither \(\Delta\mathrm{UGL}\) nor Realized โ 0.00001 units bought at 100,000 leave โ1.00 here (ยง7).
๐ต FX on Cash
For each broker \(b\) holding cash in a currency other than \(C^*\), over the period \((t_0, t_1]\), \(t_0\) being the opening state:
\(N_{b,c}(t)\) is the balance \(b\) holds in currency \(c\) on \(t\), scaled by the broker's share, and \(\mathrm{fx}\) the latest rate on or before the day. The second sum runs over \(b\)'s movements in a foreign currency dated in the period: each amount, scaled by the share \(s_m\), at the rate of its own date \(d_m\). The first term is the change in value of the foreign cash, the second what the movements brought in or took out: the difference is what the exchange rates did to the cash the broker held. It equals the exchange results the engine books on the period's rate-change days (Portfolio Engine โ ยง6). Cash in \(C^*\) has none.
Example: dollars at a broker on a euro dashboard
A broker holds 1,000 USD for the whole period while the rate goes from 0.90 to 0.92 EUR per USD:
With a deposit of 500 USD in the middle of the period at 0.91, and 0.92 at the end:
The deposit entered the capital at โฌ455; the +โฌ25 is what the dollars gained against the euro while the broker held them.
๐ Transfers at Market Value
In a view that selects only some brokers, a TRANSFER leg whose other side is outside the view โ securities sent to a broker that is not selected, received from one, or a transfer with no counterpart โ is in-kind capital at its market value on its date, while the position's cost moves with it (Deposited Capital). The gain the units accrued at the other broker is therefore in neither \(\Delta\mathrm{UGL}\) nor Realized, and used to end up in the residual. It is the second part of Other. For each broker \(b\) of the view, over the legs \(\ell\) dated in \((t_0, t_1]\):
\(\mathrm{Capital}_\ell\) is the market value the leg adds to the capital (positive when received, negative when sent) and \(\mathrm{Cost}_\ell\) the cost it moves in the position (same sign), both in \(C^*\) at the broker's share. For units with market value \(\mathrm{MV}\) and cost \(C\):
| Leg | \(\mathrm{Capital}\) | \(\mathrm{Cost}\) | Contribution |
|---|---|---|---|
| Sent out of the view | \(-\mathrm{MV}\) | \(-C\) | \(+(\mathrm{MV} - C)\) |
| Received from outside the view | \(+\mathrm{MV}\) | \(+C\) | \(-(\mathrm{MV} - C)\) |
The sender's view takes the gain the units made while it held them as a result of its own; the receiver's view starts from the value they arrive with, so what they gained before is not its result and is taken out. A figure below the rounding threshold is not shown, and the residual drops by the amount shown. With both brokers selected nothing changes: the pair is internal, and the units only split the result between the two rows (see the internal transfer under Per-Asset Contribution below).
Example: units bought at one broker and sent to another
10 units bought at 50 each (cost โฌ500) on broker A are sent to broker B when worth โฌ800.
- View on A only: the units leave at โฌ800 of capital and take โฌ500 of cost with them: \(\mathrm{TMV}_A = -500 + 800 = +300\) EUR.
- View on B only: the units arrive at โฌ800 of capital with โฌ500 of cost: \(\mathrm{TMV}_B = 500 - 800 = -300\) EUR.
- View on A and B: no such row.
๐ฑ Unrealized Change by Currency
\(\Delta\mathrm{UGL}\) is split by the currency \(A\) the assets are priced in. For the positions in currency \(A\) on day \(t\), let
| Symbol | Meaning |
|---|---|
| \(\mathrm{MV}_A(t)\) | Their market value in \(C^*\), at the day's price and rate |
| \(\mathrm{Cost}^{A}_A(t)\) | Their historical cost in \(A\) |
| \(\mathrm{Cost}^{*}_A(t)\) | Their historical cost in \(C^*\) |
| \(r_A(t) = \mathrm{fx}(A, C^*, t)\) | The day's exchange rate |
Each acquisition's cost in \(A\) comes from its cost in \(C^*\) at the acquisition date, \(c^{A} = c^{*} \cdot \mathrm{fx}(C^*, A, d)\) (or the amount paid, when paid in \(A\)). The unrealized gain/loss then splits exactly into an asset effect and an exchange-rate effect:
For a mark quoted in \(A\), \(\mathrm{MV}_A(t) = \frac{q}{qbq} \cdot \mathrm{mark}_A(t) \cdot r_A(t)\), so the asset effect is the assets' own change in their currency, translated at the day's rate: \(E^{\text{asset}}_A(t) = \bigl(\frac{q}{qbq} \cdot \mathrm{mark}_A(t) - \mathrm{Cost}^{A}_A(t)\bigr)\, r_A(t)\). The exchange-rate effect is zero on the day of each purchase. For \(A = C^*\), \(r = 1\) and \(\mathrm{Cost}^{A} = \mathrm{Cost}^{*}\): the exchange-rate effect vanishes, and assets already in the report currency have an asset effect only.
A position in a currency \(A \neq C^*\) that cannot be split on day \(t\) โ no market value, no rate \(r_A(t)\), or a cost incomplete in either currency โ adds its whole \(\mathrm{MV} - \mathrm{Cost}^{*}\) (with \(\mathrm{MV} = 0\) when it has no market value) to an unsplit part \(E^{\text{unsplit}}_A(t)\) instead. Positions in \(C^*\) always count in the asset effect. A position valued at its cost because its asset has no mark at all (Portfolio Engine โ ยง3) has \(\mathrm{MV} = \mathrm{Cost}^{*}\) and adds to no part: splitting it would invent an asset effect and an exchange-rate effect of opposite sign.
The period rows are the changes between the period's two boundary states โ the last state on or before \(t_0\) (zero if there is none) and the state at \(t_1\) โ, the same two states as \(\Delta\mathrm{UGL}\):
Example: a US ETF on a euro dashboard
10 units bought for โฌ400 when they were worth 500 USD, so \(\mathrm{Cost}^{*} = 400\) EUR and \(\mathrm{Cost}^{A} = 500\) USD.
| Day | Value in USD | \(r_{USD}\) | MV in EUR | \(E^{\text{asset}}\) | \(E^{\text{fx}}\) | \(\mathrm{UGL}\) |
|---|---|---|---|---|---|---|
| \(t_0\) | 520 USD | 0.78 | 405.60 | \((520-500) \times 0.78 = 15.60\) | \(500 \times 0.78 - 400 = -10.00\) | 5.60 |
| \(t_1\) | 550 USD | 0.75 | 412.50 | \((550-500) \times 0.75 = 37.50\) | \(500 \times 0.75 - 400 = -25.00\) | 12.50 |
The ETF gained in dollars (+โฌ21.90), the dollar lost ground against the euro (โโฌ15.00): together, the +โฌ6.90 of the period's unrealized change.
๐ฏ Per-Asset Contribution
For each position \((a,b)\):
The position set includes all activity in the period:
A position's start and end values are the portfolio's own valuation of it at the end of \(t_0\) and of \(t_1\), the two states of \(\Delta\mathrm{UGL}\) (Portfolio Engine โ ยง3):
- its mark (ยง2): a market quote, or else a BUY/SELL price โ or, for an asset with nothing else yet, the cost of an incoming transfer as an estimate โ, a trade price being restated through any later split;
- its cost basis, for a holding whose asset has no mark at all (
ESTIMATED_AT_COST); - converted at the exchange rate of the boundary day itself.
The rows therefore add up to the portfolio: when every row is known, \(\sum_{(a,b)} \Delta\mathrm{UGL}(a,b) = \Delta\mathrm{UGL}\), and the rows plus the other period effects โ unallocated income and costs, FX on cash, transfers at market value, the residual โ close \(\mathrm{PnL}_{\text{period}}\). Other holds no valuation difference. A position left with \(10^{-5}\) units or fewer โ dust โ is held neither by a row nor by the portfolio, so it changes nothing in the identity (ยง3); its cost is in the residual (above).
- Internal transfer. A security moved between two of your brokers inside the period splits its result: the sending broker's row answers for the units until they arrive, the receiving broker's from their arrival, and the total is unchanged. A transfer already in transit at \(t_0\), or still in transit at \(t_1\), keeps the plain boundary values (ยง7).
- Unknown values. A position held at a boundary whose unrealized gain/loss is unknown there โ a missing exchange rate, an incomplete cost โ has an unknown \(\Delta\mathrm{UGL}(a,b)\), never the known side minus zero.
Annualized period return clamps its window start to the later of the requested start and the oldest open lot date. It uses \(|\mathrm{StartValue}|\) as annualization base, falling back to end cost basis for positions opened mid-period. See Net Annualized Return.
A position closed in the period โ nothing left at \(t_1\) โ annualizes differently: on the historical cost of the units that left it in the period โ sold, or moved to another broker of the scope โ over the time it was held inside it, from the later of \(t_0\) and its first opening to the day its last units left. Its period percentage keeps \(|\mathrm{StartValue}|\) as base. See Net Annualized Return โ Positions Closed in the Period.
๐ See Portfolio Engine โ ยง7 Period Contribution for details.
๐ Example
- NAV at \(t_0\): โฌ27,000
- Capital baseline increase in period: โฌ1,000
- NAV at \(t_1\): โฌ33,000
๐ Related
- ๐ผ NAV โ endpoint of every PnL formula
- ๐ Book Value โ historical cost basis behind the unrealized gain/loss
- ๐ธ Deposited Capital โ inception-to-date Total PnL
- โ๏ธ Portfolio Engine โ full mathematical model
- ๐ Performance Metrics Overview โ all performance metrics at a glance