diff --git a/src/components/landing/PortfolioSection.tsx b/src/components/landing/PortfolioSection.tsx index 1502bfea..d7051951 100644 --- a/src/components/landing/PortfolioSection.tsx +++ b/src/components/landing/PortfolioSection.tsx @@ -203,7 +203,11 @@ function getDisplayPnl(item: any) { } function getHoldingValue(item: any) { - return firstNumber(item?.holding_value, getEffectiveQuantity(item) * getLastPrice(item)); + const brokerValue = Number(item?.holding_value); + if (Number.isFinite(brokerValue) && brokerValue >= 0) { + return brokerValue; + } + return Math.abs(getEffectiveQuantity(item)) * Math.abs(getLastPrice(item)); } function getPortfolioItemKey(item: any, idx: number) {