|
@ -704,17 +704,19 @@ export class PortfolioService { |
|
|
|
|
|
|
|
|
const dividendYieldPercent = this.getAnnualizedPerformancePercent({ |
|
|
const dividendYieldPercent = this.getAnnualizedPerformancePercent({ |
|
|
daysInMarket: differenceInDays(new Date(), parseDate(firstBuyDate)), |
|
|
daysInMarket: differenceInDays(new Date(), parseDate(firstBuyDate)), |
|
|
netPerformancePercent: dividendInBaseCurrency.div( |
|
|
netPerformancePercent: timeWeightedInvestment.eq(0) |
|
|
timeWeightedInvestment |
|
|
? new Big(0) |
|
|
) |
|
|
: dividendInBaseCurrency.div(timeWeightedInvestment) |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const dividendYieldPercentWithCurrencyEffect = |
|
|
const dividendYieldPercentWithCurrencyEffect = |
|
|
this.getAnnualizedPerformancePercent({ |
|
|
this.getAnnualizedPerformancePercent({ |
|
|
daysInMarket: differenceInDays(new Date(), parseDate(firstBuyDate)), |
|
|
daysInMarket: differenceInDays(new Date(), parseDate(firstBuyDate)), |
|
|
netPerformancePercent: dividendInBaseCurrency.div( |
|
|
netPerformancePercent: timeWeightedInvestmentWithCurrencyEffect.eq(0) |
|
|
timeWeightedInvestmentWithCurrencyEffect |
|
|
? new Big(0) |
|
|
) |
|
|
: dividendInBaseCurrency.div( |
|
|
|
|
|
timeWeightedInvestmentWithCurrencyEffect |
|
|
|
|
|
) |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const historicalData = await this.dataProviderService.getHistorical( |
|
|
const historicalData = await this.dataProviderService.getHistorical( |
|
|