Browse Source

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>
pull/1269/head
Thomas Kaul 2 years ago
committed by GitHub
parent
commit
263f6b32f2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      CHANGELOG.md
  2. 4
      apps/api/src/app/portfolio/portfolio-calculator.ts

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

4
apps/api/src/app/portfolio/portfolio-calculator.ts

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

Loading…
Cancel
Save