|
@ -1604,7 +1604,7 @@ export class PortfolioService { |
|
|
userId = await this.getUserId(impersonationId, userId); |
|
|
userId = await this.getUserId(impersonationId, userId); |
|
|
const user = await this.userService.user({ id: userId }); |
|
|
const user = await this.userService.user({ id: userId }); |
|
|
|
|
|
|
|
|
const performanceInformation = await this.getPerformance({ |
|
|
const { performance } = await this.getPerformance({ |
|
|
impersonationId, |
|
|
impersonationId, |
|
|
userId |
|
|
userId |
|
|
}); |
|
|
}); |
|
@ -1694,7 +1694,7 @@ export class PortfolioService { |
|
|
.toNumber(); |
|
|
.toNumber(); |
|
|
|
|
|
|
|
|
const netWorth = new Big(balanceInBaseCurrency) |
|
|
const netWorth = new Big(balanceInBaseCurrency) |
|
|
.plus(performanceInformation.performance.currentValue) |
|
|
.plus(performance.currentValue) |
|
|
.plus(valuables) |
|
|
.plus(valuables) |
|
|
.plus(excludedAccountsAndActivities) |
|
|
.plus(excludedAccountsAndActivities) |
|
|
.minus(liabilities) |
|
|
.minus(liabilities) |
|
@ -1704,21 +1704,19 @@ export class PortfolioService { |
|
|
|
|
|
|
|
|
const annualizedPerformancePercent = this.getAnnualizedPerformancePercent({ |
|
|
const annualizedPerformancePercent = this.getAnnualizedPerformancePercent({ |
|
|
daysInMarket, |
|
|
daysInMarket, |
|
|
netPerformancePercent: new Big( |
|
|
netPerformancePercent: new Big(performance.currentNetPerformancePercent) |
|
|
performanceInformation.performance.currentNetPerformancePercent |
|
|
|
|
|
) |
|
|
|
|
|
})?.toNumber(); |
|
|
})?.toNumber(); |
|
|
|
|
|
|
|
|
const annualizedPerformancePercentWithCurrencyEffect = |
|
|
const annualizedPerformancePercentWithCurrencyEffect = |
|
|
this.getAnnualizedPerformancePercent({ |
|
|
this.getAnnualizedPerformancePercent({ |
|
|
daysInMarket, |
|
|
daysInMarket, |
|
|
netPerformancePercent: new Big( |
|
|
netPerformancePercent: new Big( |
|
|
performanceInformation.performance.currentNetPerformancePercentWithCurrencyEffect |
|
|
performance.currentNetPerformancePercentWithCurrencyEffect |
|
|
) |
|
|
) |
|
|
})?.toNumber(); |
|
|
})?.toNumber(); |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
...performanceInformation.performance, |
|
|
...performance, |
|
|
annualizedPerformancePercent, |
|
|
annualizedPerformancePercent, |
|
|
annualizedPerformancePercentWithCurrencyEffect, |
|
|
annualizedPerformancePercentWithCurrencyEffect, |
|
|
cash, |
|
|
cash, |
|
@ -1740,7 +1738,7 @@ export class PortfolioService { |
|
|
filteredValueInPercentage: netWorth |
|
|
filteredValueInPercentage: netWorth |
|
|
? filteredValueInBaseCurrency.div(netWorth).toNumber() |
|
|
? filteredValueInBaseCurrency.div(netWorth).toNumber() |
|
|
: undefined, |
|
|
: undefined, |
|
|
fireWealth: new Big(performanceInformation.performance.currentValue) |
|
|
fireWealth: new Big(performance.currentValue) |
|
|
.minus(emergencyFundPositionsValueInBaseCurrency) |
|
|
.minus(emergencyFundPositionsValueInBaseCurrency) |
|
|
.toNumber(), |
|
|
.toNumber(), |
|
|
interest: interest.toNumber(), |
|
|
interest: interest.toNumber(), |
|
|