Bugfix/fix issue in annualized performance calculation (#6310)

* Fix issue in annualized performance calculation: Handle case where growthFactor is Infinity

* Update changelog
pull/6311/head^2
Thomas Kaul 6 days ago committed by GitHub
parent ddb859408b
commit ed29c2ceab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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
### Changed

@ -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);
}
}

Loading…
Cancel
Save