Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Bugfix/fix issue in annualized performance calculation (#6310)
Thomas Kauled29c2ceab54
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex edbfa5460d..696ed2dbd2 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- Upgraded `twitter-api-v2` from version `1.27.0` to `1.29.0`+### Fixed++- Fixed an issue in the annualized performance calculation+## 2.237.0 - 2026-02-08### Changeddiff --git a/libs/common/src/lib/calculation-helper.ts b/libs/common/src/lib/calculation-helper.tsindex d67384a309..76b38f9b24 100644--- a/libs/common/src/lib/calculation-helper.ts+++ b/libs/common/src/lib/calculation-helper.ts@@ -9,7 +9,7 @@ import {subDays,subYears} from 'date-fns';-import { isNumber } from 'lodash';+import { isFinite, isNumber } from 'lodash';import { resetHours } from './helper';import { DateRange } from './types';@@ -28,7 +28,7 @@ export function getAnnualizedPerformancePercent({exponent);- if (!isNaN(growthFactor)) {+ if (isFinite(growthFactor)) {return new Big(growthFactor).minus(1);}}