diff --git a/CHANGELOG.md b/CHANGELOG.md index 0774d9f8..2d60fa90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the language localization for German (`de`) +### Fixed + +- Respected the end date in the performance chart calculation + ### Todo Set `NODE_ENV: production` as in [docker-compose.yml](https://github.com/ghostfolio/ghostfolio/blob/main/docker/docker-compose.yml) diff --git a/apps/api/src/app/portfolio/portfolio-calculator.ts b/apps/api/src/app/portfolio/portfolio-calculator.ts index 9905eadb..6b53e574 100644 --- a/apps/api/src/app/portfolio/portfolio-calculator.ts +++ b/apps/api/src/app/portfolio/portfolio-calculator.ts @@ -967,6 +967,10 @@ export class PortfolioCalculator { feesAtStartDate = fees; grossPerformanceAtStartDate = grossPerformance; } + + if (i === indexOfEndOrder) { + break; + } } timeWeightedGrossPerformancePercentage =