|
@ -282,7 +282,7 @@ export abstract class PortfolioCalculator { |
|
|
dataGatheringItems, |
|
|
dataGatheringItems, |
|
|
dateQuery: { |
|
|
dateQuery: { |
|
|
gte: parseDate(firstTransactionPoint?.date), |
|
|
gte: parseDate(firstTransactionPoint?.date), |
|
|
lt: end |
|
|
lt: endDate |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
@ -316,16 +316,16 @@ export abstract class PortfolioCalculator { |
|
|
: 1; |
|
|
: 1; |
|
|
|
|
|
|
|
|
let chartDates = eachDayOfInterval( |
|
|
let chartDates = eachDayOfInterval( |
|
|
{ end, start: chartStartDate }, |
|
|
{ end: endDate, start: chartStartDate }, |
|
|
{ step } |
|
|
{ step } |
|
|
).map((date) => { |
|
|
).map((date) => { |
|
|
return resetHours(date); |
|
|
return resetHours(date); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const includesEndDate = isSameDay(last(chartDates), end); |
|
|
const includesEndDate = isSameDay(last(chartDates), endDate); |
|
|
|
|
|
|
|
|
if (!includesEndDate) { |
|
|
if (!includesEndDate) { |
|
|
chartDates.push(resetHours(end)); |
|
|
chartDates.push(resetHours(endDate)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (firstIndex > 0) { |
|
|
if (firstIndex > 0) { |
|
@ -984,11 +984,6 @@ export abstract class PortfolioCalculator { |
|
|
totalTimeWeightedInvestmentValueWithCurrencyEffect |
|
|
totalTimeWeightedInvestmentValueWithCurrencyEffect |
|
|
} = values; |
|
|
} = values; |
|
|
|
|
|
|
|
|
console.log( |
|
|
|
|
|
'Chart: totalTimeWeightedInvestmentValue', |
|
|
|
|
|
totalTimeWeightedInvestmentValue.toFixed() |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const netPerformanceInPercentage = totalTimeWeightedInvestmentValue.eq(0) |
|
|
const netPerformanceInPercentage = totalTimeWeightedInvestmentValue.eq(0) |
|
|
? 0 |
|
|
? 0 |
|
|
: totalNetPerformanceValue |
|
|
: totalNetPerformanceValue |
|
|