Describe the bug
When importing an IBKR Flex Query XML containing a dividend reversal, Portfolio Performance imports the reversed dividend as a positive cash amount.
The number of shares is imported as negative, but the dividend amount remains positive. This causes an incorrect cash account balance.
Example from the IBKR Flex Query import:
Date: 2026-06-16
-
Dividend: +0.70 USD
Shares: -8
-
Dividend: +0.76 USD
Shares: +9
-
Transfer (Outbound): -0.06 USD
The first dividend is a reversal of the original dividend and should therefore reduce the cash account by 0.70 USD.
Actual calculation:
+0.70 USD + 0.76 USD - 0.06 USD = +1.40 USD
Expected calculation:
-0.70 USD + 0.76 USD - 0.06 USD = 0.00 USD
As a result, the USD cash account incorrectly shows a balance of 1.40 USD.
To Reproduce
Steps to reproduce the behavior:
- Create an IBKR Flex Query containing a dividend and its subsequent reversal.
- Export the Flex Query as XML.
- Import the XML into Portfolio Performance.
- Check the import preview.
- Observe that the reversed dividend has a negative number of shares but a positive dividend amount.
- Complete the import.
- Check the related cash account balance.
- The reversed dividend increases the balance instead of decreasing it.
Expected behavior
A dividend reversal should be imported with a negative cash amount or should reverse the original dividend transaction.
For this example, the resulting cash balance should be:
-0.70 USD + 0.76 USD - 0.06 USD = 0.00 USD
I have attached screenshots showing:
- the import preview with the reversed dividend imported as
+0.70 USD and -8 shares,
- the resulting USD cash account balance of
1.40 USD.
Screenshots
- OS: Windows
- Version: 0.86.1 (jul 2026)
Describe the bug
When importing an IBKR Flex Query XML containing a dividend reversal, Portfolio Performance imports the reversed dividend as a positive cash amount.
The number of shares is imported as negative, but the dividend amount remains positive. This causes an incorrect cash account balance.
Example from the IBKR Flex Query import:
Date: 2026-06-16
Dividend: +0.70 USD
Shares: -8
Dividend: +0.76 USD
Shares: +9
Transfer (Outbound): -0.06 USD
The first dividend is a reversal of the original dividend and should therefore reduce the cash account by 0.70 USD.
Actual calculation:
+0.70 USD + 0.76 USD - 0.06 USD = +1.40 USD
Expected calculation:
-0.70 USD + 0.76 USD - 0.06 USD = 0.00 USD
As a result, the USD cash account incorrectly shows a balance of 1.40 USD.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A dividend reversal should be imported with a negative cash amount or should reverse the original dividend transaction.
For this example, the resulting cash balance should be:
-0.70 USD + 0.76 USD - 0.06 USD = 0.00 USD
I have attached screenshots showing:
+0.70 USDand-8shares,1.40 USD.Screenshots