Bugfix/fix performance chart calculation (#1267)

* Respect end date in performance chart calculation

Co-Authored-By: gizmodus <11334553+gizmodus@users.noreply.github.com>

* Update changelog

Co-Authored-By: gizmodus <11334553+gizmodus@users.noreply.github.com>
This commit is contained in:
Thomas Kaul 2022-09-17 08:33:04 +02:00 committed by GitHub
parent 637f31ae3b
commit 263f6b32f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -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`) - Improved the language localization for German (`de`)
### Fixed
- Respected the end date in the performance chart calculation
### Todo ### Todo
Set `NODE_ENV: production` as in [docker-compose.yml](https://github.com/ghostfolio/ghostfolio/blob/main/docker/docker-compose.yml) Set `NODE_ENV: production` as in [docker-compose.yml](https://github.com/ghostfolio/ghostfolio/blob/main/docker/docker-compose.yml)

View File

@ -967,6 +967,10 @@ export class PortfolioCalculator {
feesAtStartDate = fees; feesAtStartDate = fees;
grossPerformanceAtStartDate = grossPerformance; grossPerformanceAtStartDate = grossPerformance;
} }
if (i === indexOfEndOrder) {
break;
}
} }
timeWeightedGrossPerformancePercentage = timeWeightedGrossPerformancePercentage =