|
|
@ -392,7 +392,10 @@ export abstract class PortfolioCalculator { |
|
|
const includeInTotalAssetValue = |
|
|
const includeInTotalAssetValue = |
|
|
item.assetSubClass !== AssetSubClass.CASH; |
|
|
item.assetSubClass !== AssetSubClass.CASH; |
|
|
|
|
|
|
|
|
if (includeInTotalAssetValue) { |
|
|
// Cash positions are included in the chart (value, net worth and
|
|
|
|
|
|
// performance) so that the home screen reflects the entire portfolio.
|
|
|
|
|
|
// They remain excluded from the overall performance aggregate (see
|
|
|
|
|
|
// includeInTotalAssetValue) which keeps the FIRE wealth asset-only.
|
|
|
valuesBySymbol[item.symbol] = { |
|
|
valuesBySymbol[item.symbol] = { |
|
|
currentValues, |
|
|
currentValues, |
|
|
currentValuesWithCurrencyEffect, |
|
|
currentValuesWithCurrencyEffect, |
|
|
@ -404,7 +407,6 @@ export abstract class PortfolioCalculator { |
|
|
timeWeightedInvestmentValues, |
|
|
timeWeightedInvestmentValues, |
|
|
timeWeightedInvestmentValuesWithCurrencyEffect |
|
|
timeWeightedInvestmentValuesWithCurrencyEffect |
|
|
}; |
|
|
}; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
positions.push({ |
|
|
positions.push({ |
|
|
includeInTotalAssetValue, |
|
|
includeInTotalAssetValue, |
|
|
@ -610,9 +612,10 @@ export abstract class PortfolioCalculator { |
|
|
netPerformance: totalNetPerformanceValue.toNumber(), |
|
|
netPerformance: totalNetPerformanceValue.toNumber(), |
|
|
netPerformanceWithCurrencyEffect: |
|
|
netPerformanceWithCurrencyEffect: |
|
|
totalNetPerformanceValueWithCurrencyEffect.toNumber(), |
|
|
totalNetPerformanceValueWithCurrencyEffect.toNumber(), |
|
|
netWorth: totalCurrentValueWithCurrencyEffect |
|
|
// Cash is now reflected through the cash positions in
|
|
|
.plus(totalAccountBalanceWithCurrencyEffect) |
|
|
// totalCurrentValueWithCurrencyEffect, so the account balance must no
|
|
|
.toNumber(), |
|
|
// longer be added here to avoid counting cash twice in the net worth.
|
|
|
|
|
|
netWorth: totalCurrentValueWithCurrencyEffect.toNumber(), |
|
|
totalAccountBalance: totalAccountBalanceWithCurrencyEffect.toNumber(), |
|
|
totalAccountBalance: totalAccountBalanceWithCurrencyEffect.toNumber(), |
|
|
totalInvestment: totalInvestmentValue.toNumber(), |
|
|
totalInvestment: totalInvestmentValue.toNumber(), |
|
|
totalInvestmentValueWithCurrencyEffect: |
|
|
totalInvestmentValueWithCurrencyEffect: |
|
|
|