Portfolio PNL

mickeystanford_alumni

Board Regular
Joined
May 11, 2022
Messages
129
Office Version
  1. 2021
Platform
  1. Windows
  2. MacOS
Hi, I am trying building a portfolio PNL where I calculate the daily pnl and weighted average.
I am struggling to find a formula which allows me to by just plugging the new trades in a row, calculates the daily PNL and the weighted avg.
The issue here is that for 1 trade is easy to build, but once you start mixing up new trades in different days, then it all becomes extremely messy.

Is there any idea on how i could achieve something clean but easy to automate and calculate the daily return and weighted average as if I were creating my own brokerage/portfolio account?

Basically the sheet looks like:
Starting A1:
As an example of day 1:
New trade (position in shares): +100
Total Position: +100
Purchase/sell price: 50$
Current Live Price: 51$
Daily PNL: +100$
Weighted average: ??
Total PNL: +100

Day 2
New trade (position in shares): +350
Total Position: +350
Purchase/sell price: 51$ (only for the new trades)
Current Live Price: 52$
Daily PNL: +250$ (proxy, as here the daily PNL would calculate the total position * (closing price - current live price)
Weighted average: ??
Total PNL: +350$ (proxy)

Thanks in advance.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,223,886
Messages
6,175,191
Members
452,616
Latest member
intern444

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