Feature/rename allocation cluster risk x ray rule (#3994)
* Rename Allocation Cluster Risk to Economic Market Cluster Risk * Update changelog
This commit is contained in:
parent
6a195a7a36
commit
5de176a7ef
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
### Changed
|
||||
|
||||
- Restructured the resources page
|
||||
- Renamed the static portfolio analysis rule from _Allocation Cluster Risk_ to _Economic Market Cluster Risk_ (Developed Markets and Emerging Markets)
|
||||
- Improved the language localization for German (`de`)
|
||||
- Switched the `consistent-generic-constructors` rule from `warn` to `error` in the `eslint` configuration
|
||||
- Switched the `consistent-type-assertions` rule from `warn` to `error` in the `eslint` configuration
|
||||
@ -29,15 +30,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Fixed an issue with the X-axis scale of the dividend timeline on the analysis page
|
||||
- Fixed an issue with the X-axis scale of the investment timeline on the analysis page
|
||||
- Fixed an issue with the X-axis scale of the portfolio evolution chart on the analysis page
|
||||
- Fixed an issue in the calculation of the static portfolio analysis rule: Allocation Cluster Risk (Developed Markets)
|
||||
- Fixed an issue in the calculation of the static portfolio analysis rule: Allocation Cluster Risk (Emerging Markets)
|
||||
- Fixed an issue in the calculation of the static portfolio analysis rule: _Allocation Cluster Risk_ (Developed Markets)
|
||||
- Fixed an issue in the calculation of the static portfolio analysis rule: _Allocation Cluster Risk_ (Emerging Markets)
|
||||
|
||||
## 2.118.0 - 2024-10-23
|
||||
|
||||
### Added
|
||||
|
||||
- Added a new static portfolio analysis rule: Allocation Cluster Risk (Developed Markets)
|
||||
- Added a new static portfolio analysis rule: Allocation Cluster Risk (Emerging Markets)
|
||||
- Added a new static portfolio analysis rule: _Allocation Cluster Risk_ (Developed Markets)
|
||||
- Added a new static portfolio analysis rule: _Allocation Cluster Risk_ (Emerging Markets)
|
||||
- Added support for mutual funds in the _EOD Historical Data_ service
|
||||
|
||||
### Changed
|
||||
|
@ -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
|
||||
|
@ -4,10 +4,10 @@ import { environment } from '@ghostfolio/api/environments/environment';
|
||||
import { PortfolioChangedEvent } from '@ghostfolio/api/events/portfolio-changed.event';
|
||||
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 { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service';
|
||||
@ -217,14 +217,14 @@ export class UserService {
|
||||
undefined,
|
||||
{}
|
||||
).getSettings(user.Settings.settings),
|
||||
AllocationClusterRiskDevelopedMarkets:
|
||||
new AllocationClusterRiskDevelopedMarkets(
|
||||
EconomicMarketClusterRiskDevelopedMarkets:
|
||||
new EconomicMarketClusterRiskDevelopedMarkets(
|
||||
undefined,
|
||||
undefined,
|
||||
undefined
|
||||
).getSettings(user.Settings.settings),
|
||||
AllocationClusterRiskEmergingMarkets:
|
||||
new AllocationClusterRiskEmergingMarkets(
|
||||
EconomicMarketClusterRiskEmergingMarkets:
|
||||
new EconomicMarketClusterRiskEmergingMarkets(
|
||||
undefined,
|
||||
undefined,
|
||||
undefined
|
||||
|
@ -3,7 +3,7 @@ import { Rule } from '@ghostfolio/api/models/rule';
|
||||
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service';
|
||||
import { UserSettings } from '@ghostfolio/common/interfaces';
|
||||
|
||||
export class AllocationClusterRiskDevelopedMarkets extends Rule<Settings> {
|
||||
export class EconomicMarketClusterRiskDevelopedMarkets extends Rule<Settings> {
|
||||
private currentValueInBaseCurrency: number;
|
||||
private developedMarketsValueInBaseCurrency: number;
|
||||
|
||||
@ -13,7 +13,7 @@ export class AllocationClusterRiskDevelopedMarkets extends Rule<Settings> {
|
||||
developedMarketsValueInBaseCurrency: number
|
||||
) {
|
||||
super(exchangeRateDataService, {
|
||||
key: AllocationClusterRiskDevelopedMarkets.name,
|
||||
key: EconomicMarketClusterRiskDevelopedMarkets.name,
|
||||
name: 'Developed Markets'
|
||||
});
|
||||
|
@ -3,7 +3,7 @@ import { Rule } from '@ghostfolio/api/models/rule';
|
||||
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service';
|
||||
import { UserSettings } from '@ghostfolio/common/interfaces';
|
||||
|
||||
export class AllocationClusterRiskEmergingMarkets extends Rule<Settings> {
|
||||
export class EconomicMarketClusterRiskEmergingMarkets extends Rule<Settings> {
|
||||
private currentValueInBaseCurrency: number;
|
||||
private emergingMarketsValueInBaseCurrency: number;
|
||||
|
||||
@ -13,7 +13,7 @@ export class AllocationClusterRiskEmergingMarkets extends Rule<Settings> {
|
||||
emergingMarketsValueInBaseCurrency: number
|
||||
) {
|
||||
super(exchangeRateDataService, {
|
||||
key: AllocationClusterRiskEmergingMarkets.name,
|
||||
key: EconomicMarketClusterRiskEmergingMarkets.name,
|
||||
name: 'Emerging Markets'
|
||||
});
|
||||
|
@ -22,9 +22,9 @@ import { takeUntil } from 'rxjs/operators';
|
||||
})
|
||||
export class FirePageComponent implements OnDestroy, OnInit {
|
||||
public accountClusterRiskRules: PortfolioReportRule[];
|
||||
public allocationClusterRiskRules: PortfolioReportRule[];
|
||||
public currencyClusterRiskRules: PortfolioReportRule[];
|
||||
public deviceType: string;
|
||||
public economicMarketClusterRiskRules: PortfolioReportRule[];
|
||||
public emergencyFundRules: PortfolioReportRule[];
|
||||
public feeRules: PortfolioReportRule[];
|
||||
public fireWealth: Big;
|
||||
@ -204,15 +204,15 @@ export class FirePageComponent implements OnDestroy, OnInit {
|
||||
}
|
||||
) ?? null;
|
||||
|
||||
this.allocationClusterRiskRules =
|
||||
portfolioReport.rules['allocationClusterRisk']?.filter(
|
||||
this.currencyClusterRiskRules =
|
||||
portfolioReport.rules['currencyClusterRisk']?.filter(
|
||||
({ isActive }) => {
|
||||
return isActive;
|
||||
}
|
||||
) ?? null;
|
||||
|
||||
this.currencyClusterRiskRules =
|
||||
portfolioReport.rules['currencyClusterRisk']?.filter(
|
||||
this.economicMarketClusterRiskRules =
|
||||
portfolioReport.rules['economicMarketClusterRisk']?.filter(
|
||||
({ isActive }) => {
|
||||
return isActive;
|
||||
}
|
||||
|
@ -176,7 +176,7 @@
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<h4 class="align-items-center d-flex m-0">
|
||||
<span i18n>Allocation Cluster Risks</span>
|
||||
<span i18n>Economic Market Cluster Risks</span>
|
||||
@if (user?.subscription?.type === 'Basic') {
|
||||
<gf-premium-indicator class="ml-1" />
|
||||
}
|
||||
@ -188,7 +188,7 @@
|
||||
user?.settings?.isExperimentalFeatures
|
||||
"
|
||||
[isLoading]="isLoadingPortfolioReport"
|
||||
[rules]="allocationClusterRiskRules"
|
||||
[rules]="economicMarketClusterRiskRules"
|
||||
[settings]="user?.settings?.xRayRules"
|
||||
(rulesUpdated)="onRulesUpdated($event)"
|
||||
/>
|
||||
|
@ -1,10 +1,10 @@
|
||||
export interface XRayRulesSettings {
|
||||
AccountClusterRiskCurrentInvestment?: RuleSettings;
|
||||
AccountClusterRiskSingleAccount?: RuleSettings;
|
||||
AllocationClusterRiskDevelopedMarkets?: RuleSettings;
|
||||
AllocationClusterRiskEmergingMarkets?: RuleSettings;
|
||||
CurrencyClusterRiskBaseCurrencyCurrentInvestment?: RuleSettings;
|
||||
CurrencyClusterRiskCurrentInvestment?: RuleSettings;
|
||||
EconomicMarketClusterRiskDevelopedMarkets?: RuleSettings;
|
||||
EconomicMarketClusterRiskEmergingMarkets?: RuleSettings;
|
||||
EmergencyFundSetup?: RuleSettings;
|
||||
FeeRatioInitialInvestment?: RuleSettings;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user