-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dividend withholding tax not taken into account in some cases #136
Comments
The problem with this particular set of data is that it's wrong. Here's the sequence of events as far as I can understand them:
But the quantities are:
So the reversal quantity does not match the dividend it's reversing. The current code will match taxes with dividends one to one, but there seems to be 2 tax entries here for one actual dividend. It's not clear if tax entries can relate to reversed dividends. I guess one solution would be to just roll together all the dividends and taxes related to same stock and same day into one entry. But that wouldn't really work if reversal is done on another day. The code links a tax entry to the first entry, which gets reversed and then a new one is made. |
Also the current code will match tax to a dividend with lower transaction ID. https://github.com/jamsix/ib-edavki/blob/master/ib_edavki.py#L1158 Now if we look at the transactions, sorted by ID, your case, the order of events is nonsensical:
So it seems we cannot rely on IBKR to have these in a proper order. |
It's really odd that quanitites match perfectly regardless of the corporate action description:
So were first two transactions correctly placed and cancel one another? |
Withholding tax is not accounted for in some cases. In my case, I had a dividend that was paid like this:
The withholding tax that was related to this dividend was:
We need to look into this before the next tax season to not pay more taxes than required.
The text was updated successfully, but these errors were encountered: