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
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`)
### 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)

View File

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