Browse Source

Add findings

pull/1399/head
Thomas 3 years ago
parent
commit
ae6145dac7
  1. 8
      apps/api/src/app/portfolio/portfolio-calculator.ts

8
apps/api/src/app/portfolio/portfolio-calculator.ts

@ -40,7 +40,7 @@ export class PortfolioCalculator {
private static readonly CALCULATE_PERCENTAGE_PERFORMANCE_WITH_MAX_INVESTMENT = private static readonly CALCULATE_PERCENTAGE_PERFORMANCE_WITH_MAX_INVESTMENT =
true; true;
private static readonly ENABLE_LOGGING = false; private static readonly ENABLE_LOGGING = true;
private currency: string; private currency: string;
private currentRateService: CurrentRateService; private currentRateService: CurrentRateService;
@ -287,7 +287,9 @@ export class PortfolioCalculator {
date, date,
netPerformanceInPercentage, netPerformanceInPercentage,
netPerformance: totalNetPerformanceValues[date].toNumber(), netPerformance: totalNetPerformanceValues[date].toNumber(),
// TODO
totalInvestment: totalInvestmentValues[date].toNumber(), totalInvestment: totalInvestmentValues[date].toNumber(),
// TODO
value: totalInvestmentValues[date] value: totalInvestmentValues[date]
.plus(totalNetPerformanceValues[date]) .plus(totalNetPerformanceValues[date])
.toNumber() .toNumber()
@ -1262,7 +1264,9 @@ export class PortfolioCalculator {
Fees per unit: ${feesPerUnit.toFixed(2)} Fees per unit: ${feesPerUnit.toFixed(2)}
Net performance: ${totalNetPerformance.toFixed( Net performance: ${totalNetPerformance.toFixed(
2 2
)} / ${netPerformancePercentage.mul(100).toFixed(2)}%` )} / ${netPerformancePercentage.mul(100).toFixed(2)}%
Investment at end date: ${totalInvestment}
`
); );
} }

Loading…
Cancel
Save