From 0e94112dc77dd9de6e10f0f51265fe2b6f62aebe Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 12 Dec 2023 19:54:58 +0100 Subject: [PATCH] Feature/adjust holdings weight threshold in trackinsight data enhancer (#2742) * Adjust holdings weight threshold * Update changelog --- CHANGELOG.md | 1 + .../data-enhancer/trackinsight/trackinsight.service.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4451972b1..ea9a42479 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Adjusted the threshold to skip the data enhancement (_Trackinsight_) if data is inaccurate - Upgraded `prisma` from version `5.6.0` to `5.7.0` ## 2.29.0 - 2023-12-09 diff --git a/apps/api/src/services/data-provider/data-enhancer/trackinsight/trackinsight.service.ts b/apps/api/src/services/data-provider/data-enhancer/trackinsight/trackinsight.service.ts index 4de08fcef..c949a1f22 100644 --- a/apps/api/src/services/data-provider/data-enhancer/trackinsight/trackinsight.service.ts +++ b/apps/api/src/services/data-provider/data-enhancer/trackinsight/trackinsight.service.ts @@ -13,6 +13,7 @@ export class TrackinsightDataEnhancerService implements DataEnhancerInterface { private static countriesMapping = { 'Russian Federation': 'Russia' }; + private static holdingsWeightTreshold = 0.85; private static sectorsMapping = { 'Consumer Discretionary': 'Consumer Cyclical', 'Consumer Defensive': 'Consumer Staples', @@ -113,7 +114,9 @@ export class TrackinsightDataEnhancerService implements DataEnhancerInterface { }); }); - if (holdings?.weight < 0.95) { + if ( + holdings?.weight < TrackinsightDataEnhancerService.holdingsWeightTreshold + ) { // Skip if data is inaccurate return response; }