Browse Source

Remove Stake from index order date

pull/5027/head
Dan 10 months ago
parent
commit
bfa3e2b1b3
  1. 2
      apps/api/src/app/portfolio/calculator/twr/portfolio-calculator.ts

2
apps/api/src/app/portfolio/calculator/twr/portfolio-calculator.ts

@ -641,7 +641,7 @@ export class TWRPortfolioCalculator extends PortfolioCalculator {
// the time weighted investment // the time weighted investment
if ( if (
valueOfInvestmentBeforeTransaction.gt(0) && valueOfInvestmentBeforeTransaction.gt(0) &&
['BUY', 'SELL', 'STAKE'].includes(order.type) ['BUY', 'SELL'].includes(order.type)
) { ) {
// Calculate the number of days since the previous order // Calculate the number of days since the previous order
const orderDate = new Date(order.date); const orderDate = new Date(order.date);

Loading…
Cancel
Save