|
@ -42,10 +42,12 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { |
|
|
public sectors: { |
|
|
public sectors: { |
|
|
[name: string]: { name: string; value: number }; |
|
|
[name: string]: { name: string; value: number }; |
|
|
}; |
|
|
}; |
|
|
|
|
|
public symbols: { |
|
|
|
|
|
[name: string]: { name: string; value: number }; |
|
|
|
|
|
}; |
|
|
public user: User; |
|
|
public user: User; |
|
|
|
|
|
|
|
|
private unsubscribeSubject = new Subject<void>(); |
|
|
private unsubscribeSubject = new Subject<void>(); |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @constructor |
|
|
* @constructor |
|
|
*/ |
|
|
*/ |
|
@ -108,6 +110,12 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { |
|
|
}; |
|
|
}; |
|
|
this.positions = {}; |
|
|
this.positions = {}; |
|
|
this.positionsArray = []; |
|
|
this.positionsArray = []; |
|
|
|
|
|
this.symbols = { |
|
|
|
|
|
[UNKNOWN_KEY]: { |
|
|
|
|
|
name: UNKNOWN_KEY, |
|
|
|
|
|
value: 0 |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
this.sectors = { |
|
|
this.sectors = { |
|
|
[UNKNOWN_KEY]: { |
|
|
[UNKNOWN_KEY]: { |
|
|
name: UNKNOWN_KEY, |
|
|
name: UNKNOWN_KEY, |
|
@ -139,6 +147,12 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { |
|
|
}; |
|
|
}; |
|
|
this.positionsArray.push(position); |
|
|
this.positionsArray.push(position); |
|
|
|
|
|
|
|
|
|
|
|
if(this.symbols[symbol] === undefined) { |
|
|
|
|
|
this.symbols[symbol] = { name: symbol, value: position.value }; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.symbols[symbol].value += position.value; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (position.assetClass !== AssetClass.CASH) { |
|
|
if (position.assetClass !== AssetClass.CASH) { |
|
|
// Prepare analysis data by continents, countries and sectors except for cash
|
|
|
// Prepare analysis data by continents, countries and sectors except for cash
|
|
|
|
|
|
|
|
|