I have several records of various transaction types (buy, long, short, cover...
) on various asset types (stocks, bonds, options, futures...
).
I am looking for a way to calculate the unrealized P&L on these records.
Obviously, when buying and shorting stock, we can the unrealized p&l by smth. like: (market price - avg price/share)*quantity
(or alternatively smth. with FIFO/LIFO.
However, how do you go about for other, perhaps more complex/asset classes? Suddenly its not just comparing the current price to the price of the contract, or is it?
I am asking cause there are millions of types of contracts with different characteristics. Its impossible to keep track of everything.
So how is this done in practice?
max(St-K, c0)
wherect
is the market price now andc0
when I bought it. What do you do then?