|
|
|
|
@ -1872,18 +1872,17 @@ export class PortfolioService {
|
|
|
|
|
netPerformanceWithCurrencyEffect
|
|
|
|
|
} = performance;
|
|
|
|
|
|
|
|
|
|
const dividendInBaseCurrency =
|
|
|
|
|
await portfolioCalculator.getDividendInBaseCurrency();
|
|
|
|
|
|
|
|
|
|
const totalEmergencyFund = this.getTotalEmergencyFund({
|
|
|
|
|
emergencyFundHoldingsValueInBaseCurrency,
|
|
|
|
|
userSettings: user.settings?.settings as UserSettings
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const fees = await portfolioCalculator.getFeesInBaseCurrency();
|
|
|
|
|
const dateOfFirstActivity = portfolioCalculator.getStartDate();
|
|
|
|
|
|
|
|
|
|
const firstOrderDate = portfolioCalculator.getStartDate();
|
|
|
|
|
const dividendInBaseCurrency =
|
|
|
|
|
await portfolioCalculator.getDividendInBaseCurrency();
|
|
|
|
|
|
|
|
|
|
const fees = await portfolioCalculator.getFeesInBaseCurrency();
|
|
|
|
|
const interest = await portfolioCalculator.getInterestInBaseCurrency();
|
|
|
|
|
|
|
|
|
|
const liabilities =
|
|
|
|
|
@ -1941,7 +1940,7 @@ export class PortfolioService {
|
|
|
|
|
.minus(liabilities)
|
|
|
|
|
.toNumber();
|
|
|
|
|
|
|
|
|
|
const daysInMarket = differenceInDays(new Date(), firstOrderDate);
|
|
|
|
|
const daysInMarket = differenceInDays(new Date(), dateOfFirstActivity);
|
|
|
|
|
|
|
|
|
|
const annualizedPerformancePercent = getAnnualizedPerformancePercent({
|
|
|
|
|
daysInMarket,
|
|
|
|
|
@ -1960,6 +1959,7 @@ export class PortfolioService {
|
|
|
|
|
annualizedPerformancePercent,
|
|
|
|
|
annualizedPerformancePercentWithCurrencyEffect,
|
|
|
|
|
cash,
|
|
|
|
|
dateOfFirstActivity,
|
|
|
|
|
excludedAccountsAndActivities,
|
|
|
|
|
netPerformance,
|
|
|
|
|
netPerformancePercentage,
|
|
|
|
|
@ -1972,7 +1972,6 @@ export class PortfolioService {
|
|
|
|
|
}).length,
|
|
|
|
|
committedFunds: committedFunds.toNumber(),
|
|
|
|
|
currentValueInBaseCurrency: currentValueInBaseCurrency.toNumber(),
|
|
|
|
|
dateOfFirstActivity: firstOrderDate,
|
|
|
|
|
dividendInBaseCurrency: dividendInBaseCurrency.toNumber(),
|
|
|
|
|
emergencyFund: {
|
|
|
|
|
assets: emergencyFundHoldingsValueInBaseCurrency,
|
|
|
|
|
|