apps icon indicating copy to clipboard operation
apps copied to clipboard

Add realized & unrealized P&L to Portfolio and Prime pages

Open hieronx opened this issue 1 year ago • 2 comments

Holdings

  • [ ] Add Realized P&L column (after Market value) to the Holdings table
    • Data: based on the sum of InvestorTransaction.realizedProfitFifo from the subquery, where pool, tranche and account match the given user and pool/tranche for the Holdings row
    • Should have tooltip on the Realized P&L column header with copy: Realized profit / loss from executed redemptions
  • [ ] Add Unrealized P&L column (after Realized P&L) to the Holdings table
    • Data: using the TrancheBalance.unrealizedProfit property from the subquery
    • Should have tooltip on the Realized P&L column header with copy: Unrealized profit / loss from current holdings (based on FiFo-weighted sales at the current token price)

Overview

  • [ ] Add Total P&L next to Current portfolio value in the Overview section, that is the sum of all the Realized P&L + Unrealized P&L values in the Holdings table
    • Value should be green, and have + or - at the start depending on whether the value is positive or negative.
    • Should have tooltip on the Total P&L name with copy: Total realized profit / loss from executed redemptions + unrealized profit / loss from current holdings (based on FiFo-weighted sales at the current token price)

Design

image

hieronx avatar Aug 14 '24 07:08 hieronx

Do we want the same data for the portfolio page? since we are sharing the component @hieronx

kattylucy avatar Aug 26 '24 18:08 kattylucy

Yep @kattylucy! Just the screenshot is from the Prime page, but the ticket applies to both.

hieronx avatar Aug 26 '24 20:08 hieronx

@kattylucy this should already be covered in the Prime/Portfolio tickets that we have. If you have all the info you need for realized/unrealized P&L in the other tickets, this ticket can be closed.

sonam-jo avatar Feb 03 '25 11:02 sonam-jo