I have the following trades:
Sequence Side Quantity @ Price
1. Buy 12 @ 100
2. Buy 17 @ 99
3. Buy 3 @ 103
4. Sell 9 @ 101
5. Sell 4 @ 105
with sold quantity = 9+4 = 13
and current position size = (12+17+3)-13 = 19
and markPrice = 99
I want to calculate the netPnL
, realizedPnl
and unrealizedPnl
by using the most precise valuation type. I only know 3 valuation types: FIFO, LIFO, WAC. I did not choose WAC because it is not precise enough. So I want to choose either FIFO or LIFO. Here the calculations:
FIFO:
realizedPnL = (9*101 + 4*105) - (12*100 + 1*99) = +30
unrealizedPnL = 19*99 - (16*99 + 3*103) = -12
netPnL = 30 + (-12) = 18
LIFO:
realizedPnL = (9*101 + 4*105) - (3*103 + 10*100) = +20
unrealizedPnL = 19*99 - (7*99 + 12*100) = -12
netPnL = 20 + (-12) = 8
Now my questions:
- Are the calculations right? I thought that the
netPnl
must be always the same - regardless of the valuation type. But this is not the case here. Why? - Which is more precise? FIFO or LIFO? Which should I use?
- Is there any other valuation type which is more precise than FIFO or LIFO? I need the most accurate valuation type.
EDIT:
The error was within the LIFO calculation:
Instead of
realizedPnL = (9*101 + 4*105) - (3*103 + 10*100) = +20
this must be used:
realized PnL = (9*101 + 4*105) - (3*103 + 10*99) = +30