Browse Source

Add type and TODOs

pull/3393/head
Thomas Kaul 1 year ago
parent
commit
559983039a
  1. 10
      apps/api/src/app/portfolio/calculator/portfolio-calculator.ts

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

@ -616,6 +616,7 @@ export abstract class PortfolioCalculator {
netPerformance: totalNetPerformanceValue.toNumber(), netPerformance: totalNetPerformanceValue.toNumber(),
netPerformanceWithCurrencyEffect: netPerformanceWithCurrencyEffect:
totalNetPerformanceValueWithCurrencyEffect.toNumber(), totalNetPerformanceValueWithCurrencyEffect.toNumber(),
netWorth: 0, // TODO
totalInvestment: totalInvestmentValue.toNumber(), totalInvestment: totalInvestmentValue.toNumber(),
totalInvestmentValueWithCurrencyEffect: totalInvestmentValueWithCurrencyEffect:
totalInvestmentValueWithCurrencyEffect.toNumber(), totalInvestmentValueWithCurrencyEffect.toNumber(),
@ -1096,7 +1097,7 @@ export abstract class PortfolioCalculator {
const { chartData } = this.snapshot; const { chartData } = this.snapshot;
const newChartData = []; const newChartData: HistoricalDataItem[] = [];
let netPerformanceAtStartDate; let netPerformanceAtStartDate;
let netPerformanceWithCurrencyEffectAtStartDate; let netPerformanceWithCurrencyEffectAtStartDate;
@ -1147,7 +1148,12 @@ export abstract class PortfolioCalculator {
netPerformanceInPercentageWithCurrencyEffect: netPerformanceInPercentageWithCurrencyEffect:
(netPerformanceWithCurrencyEffectSinceStartDate / (netPerformanceWithCurrencyEffectSinceStartDate /
timeWeightedInvestmentValue) * timeWeightedInvestmentValue) *
100 100,
// TODO: Add net worth with valuables
// netWorth: totalCurrentValueWithCurrencyEffect
// .plus(totalAccountBalanceWithCurrencyEffect)
// .toNumber()
netWorth: 0
}); });
} }
} }

Loading…
Cancel
Save