@ -82,7 +82,7 @@ describe('PortfolioCalculator', () => {
averagePrice: new Big('0'),
currency: 'CHF',
dataSource: 'YAHOO',
fees: new Big('3.2'),
fee: new Big('3.2'),
firstBuyDate: '2021-11-22',
grossPerformance: new Big('-12.6'),
grossPerformancePercentage: new Big('-0.0440867739678096571'),
@ -71,7 +71,7 @@ describe('PortfolioCalculator', () => {
averagePrice: new Big('136.6'),
fees: new Big('1.55'),
fee: new Big('1.55'),
firstBuyDate: '2021-11-30',
grossPerformance: new Big('24.6'),
grossPerformancePercentage: new Big('0.09004392386530014641'),
averagePrice: new Big('320.43'),
fees: new Big('0'),
fee: new Big('0'),
firstBuyDate: '2015-01-01',
grossPerformance: new Big('27172.74'),
grossPerformancePercentage: new Big('42.40043067128546016291'),
averagePrice: new Big('75.80'),
fees: new Big('4.25'),
fee: new Big('4.25'),
firstBuyDate: '2022-03-07',
grossPerformance: new Big('21.93'),
grossPerformancePercentage: new Big('0.14465699208443271768'),
@ -102,7 +102,7 @@ describe('PortfolioCalculator', () => {
grossPerformance: new Big('19.86'),
grossPerformancePercentage: new Big('0.13100263852242744063'),
@ -431,7 +431,7 @@ export class PortfolioCalculator {
: item.investment.div(item.quantity),
currency: item.currency,
dataSource: item.dataSource,
fees: item.fee,
fee: item.fee,
firstBuyDate: item.firstBuyDate,
grossPerformance: !hasErrors ? grossPerformance ?? null : null,
grossPerformancePercentage: !hasErrors
@ -746,7 +746,7 @@ export class PortfolioService {
averagePrice,
currency,
dataSource,
fees,
fee,
firstBuyDate,
marketPrice,
quantity,
@ -851,7 +851,7 @@ export class PortfolioService {
averagePrice: averagePrice.toNumber(),
dividendInBaseCurrency: dividendInBaseCurrency.toNumber(),
feeInBaseCurrency: this.exchangeRateDataService.toCurrency(
fees.toNumber(),
fee.toNumber(),
SymbolProfile.currency,
userCurrency
),
@ -5,7 +5,7 @@ export interface TimelinePosition {
averagePrice: Big;
currency: string;
dataSource: DataSource;
fees: Big;
fee: Big;
firstBuyDate: string;
grossPerformance: Big;
grossPerformancePercentage: Big;