Calculate Realized and Unrealized Profit/Loss

Lammy

New Member
Joined
Dec 14, 2014
Messages
22
Hi everyone,

Thanks for taking time out of your day to help.

I am stuck at this task where I need to calculate the Unrealized Profit/Loss (also called Mark-To-Market) and Realized Profit/Loss.

Consider the following example showing the PnL over time (A) of an hypothetical stock XYZ with the number of shares (Column E) and Price (Column B).

1655285792611.png


I highlighted the columns green that I want to achieve in my calculation. You should see that the "Net Position" can also be negative (i.e. "short selling"), hence if the price drops, the PnL increases.
I buy 5 shares on 02.01.2022 and sell 10 shares on the 04.01.2022. This means I have a realized loss of 15 € and at the same time a short position of 5 shares. I hope the calculation makes sense :)
Unit Cost referes to the price of the share when buying/selling.

I hope someone can guide me in the right direction.

Best Regards,

Björn
 

Attachments

  • 1655285517193.png
    1655285517193.png
    16.1 KB · Views: 78

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Apologies,

There was a mistake in the screenshot above. The expected ouput (column L/M) is cumulative. Hence the value in K6 should also be in K7/K8. This also affects the total PnL (column L)

1655291567598.png
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,179
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top