ghostfolio / ghostfolio/ghostfolio

[BUG] Incorrect Performance % when dividends are received before later buys

Open
#5,451 5 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
TypeScript
Stars
9.3k
Forks
1.3k
Avg merge
22h 5m
Merged PRs (30d)
172

Description

Image

**Bug Description**

Performance % is calculated incorrectly when dividends are received before later buys. The absolute values (Investment, Current Value, Change) are correct, but the Performance % is distorted (e.g. –60.47% instead of –4.65%).

**To Reproduce**

- Buy 1 share of stock on 20/12/2024
Price: $10.80
Fee: $2.00
Total: $12.80

- Receive dividends on 17/04/2025
$0.17 + $0.10 = $0.27

- Buy 14 additional shares on 29/08/2025
Price: $12.00
Fee: $2.00
Total: $170.00

**Expected Behaviour**

Investment = $182.80

Current Value = $174.30

Change = –$8.50

Performance = –4.65%

**Screenshots**

**Logs**

**Environment**

- Ghostfolio Version 2.195.0
- Self-hosted
- Experimental Features enabled
- Chrome
- Mac OS

**Additional Context**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.