Browse Source

Merge branch 'main' into bugfix/expand-date-range-to-cover-full-day-in-exchange-rate-calculation

pull/6311/head
Thomas Kaul 2 months ago
committed by GitHub
parent
commit
b3a9a09abe
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 4
      libs/common/src/lib/calculation-helper.ts

1
CHANGELOG.md

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Fixed an issue in the annualized performance calculation
- Fixed an issue with the exchange rate calculation by expanding the date range to cover the full day (start to end of day) - Fixed an issue with the exchange rate calculation by expanding the date range to cover the full day (start to end of day)
## 2.237.0 - 2026-02-08 ## 2.237.0 - 2026-02-08

4
libs/common/src/lib/calculation-helper.ts

@ -9,7 +9,7 @@ import {
subDays, subDays,
subYears subYears
} from 'date-fns'; } from 'date-fns';
import { isNumber } from 'lodash'; import { isFinite, isNumber } from 'lodash';
import { resetHours } from './helper'; import { resetHours } from './helper';
import { DateRange } from './types'; import { DateRange } from './types';
@ -28,7 +28,7 @@ export function getAnnualizedPerformancePercent({
exponent exponent
); );
if (!isNaN(growthFactor)) { if (isFinite(growthFactor)) {
return new Big(growthFactor).minus(1); return new Big(growthFactor).minus(1);
} }
} }

Loading…
Cancel
Save