|
|
|
@ -42,6 +42,10 @@ export class AllocationsPageComponent implements OnDestroy, OnInit {
|
|
|
|
|
public sectors: {
|
|
|
|
|
[name: string]: { name: string; value: number };
|
|
|
|
|
};
|
|
|
|
|
public symbols: {
|
|
|
|
|
[name: string]: { name: string; value: number };
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
public user: User;
|
|
|
|
|
|
|
|
|
|
private unsubscribeSubject = new Subject<void>();
|
|
|
|
@ -114,6 +118,12 @@ export class AllocationsPageComponent implements OnDestroy, OnInit {
|
|
|
|
|
value: 0
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
this.symbols = {
|
|
|
|
|
[UNKNOWN_KEY]: {
|
|
|
|
|
name: UNKNOWN_KEY,
|
|
|
|
|
value: 0
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
for (const [name, { current, original }] of Object.entries(
|
|
|
|
|
this.portfolioDetails.accounts
|
|
|
|
@ -208,6 +218,15 @@ export class AllocationsPageComponent implements OnDestroy, OnInit {
|
|
|
|
|
: this.portfolioDetails.holdings[symbol].value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (position.assetSubClass !== AssetClass.CASH) {
|
|
|
|
|
// Prepare analysis data by symbols except for cash
|
|
|
|
|
|
|
|
|
|
this.symbols[symbol] = {
|
|
|
|
|
name: symbol,
|
|
|
|
|
value: aPeriod === 'original' ? position.investment : position.value
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|