|
|
|
@ -7,10 +7,10 @@ import { UserService } from '@ghostfolio/api/app/user/user.service';
|
|
|
|
|
import { getFactor } from '@ghostfolio/api/helper/portfolio.helper';
|
|
|
|
|
import { AccountClusterRiskCurrentInvestment } from '@ghostfolio/api/models/rules/account-cluster-risk/current-investment';
|
|
|
|
|
import { AccountClusterRiskSingleAccount } from '@ghostfolio/api/models/rules/account-cluster-risk/single-account';
|
|
|
|
|
import { AllocationClusterRiskDevelopedMarkets } from '@ghostfolio/api/models/rules/allocation-cluster-risk/developed-markets';
|
|
|
|
|
import { AllocationClusterRiskEmergingMarkets } from '@ghostfolio/api/models/rules/allocation-cluster-risk/emerging-markets';
|
|
|
|
|
import { CurrencyClusterRiskBaseCurrencyCurrentInvestment } from '@ghostfolio/api/models/rules/currency-cluster-risk/base-currency-current-investment';
|
|
|
|
|
import { CurrencyClusterRiskCurrentInvestment } from '@ghostfolio/api/models/rules/currency-cluster-risk/current-investment';
|
|
|
|
|
import { EconomicMarketClusterRiskDevelopedMarkets } from '@ghostfolio/api/models/rules/economic-market-cluster-risk/developed-markets';
|
|
|
|
|
import { EconomicMarketClusterRiskEmergingMarkets } from '@ghostfolio/api/models/rules/economic-market-cluster-risk/emerging-markets';
|
|
|
|
|
import { EmergencyFundSetup } from '@ghostfolio/api/models/rules/emergency-fund/emergency-fund-setup';
|
|
|
|
|
import { FeeRatioInitialInvestment } from '@ghostfolio/api/models/rules/fees/fee-ratio-initial-investment';
|
|
|
|
|
import { DataProviderService } from '@ghostfolio/api/services/data-provider/data-provider.service';
|
|
|
|
@ -1193,16 +1193,16 @@ export class PortfolioService {
|
|
|
|
|
userSettings
|
|
|
|
|
)
|
|
|
|
|
: undefined,
|
|
|
|
|
allocationClusterRisk:
|
|
|
|
|
economicMarketClusterRisk:
|
|
|
|
|
summary.ordersCount > 0
|
|
|
|
|
? await this.rulesService.evaluate(
|
|
|
|
|
[
|
|
|
|
|
new AllocationClusterRiskDevelopedMarkets(
|
|
|
|
|
new EconomicMarketClusterRiskDevelopedMarkets(
|
|
|
|
|
this.exchangeRateDataService,
|
|
|
|
|
marketsTotalInBaseCurrency,
|
|
|
|
|
markets.developedMarkets.valueInBaseCurrency
|
|
|
|
|
),
|
|
|
|
|
new AllocationClusterRiskEmergingMarkets(
|
|
|
|
|
new EconomicMarketClusterRiskEmergingMarkets(
|
|
|
|
|
this.exchangeRateDataService,
|
|
|
|
|
marketsTotalInBaseCurrency,
|
|
|
|
|
markets.emergingMarkets.valueInBaseCurrency
|
|
|
|
|