Skip to content
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

Better tax to dividend matching #45

Merged
merged 3 commits into from
Feb 6, 2022
Merged

Better tax to dividend matching #45

merged 3 commits into from
Feb 6, 2022

Conversation

jamsix
Copy link
Owner

@jamsix jamsix commented Feb 4, 2022

Fix for the problem described in #42 (comment)
When there are multiple dividends from the same company on the same day, but not all of them taxed (such as what happened with GOLD in 2021) we need to match the tax to the right dividend entry.

@jamsix
Copy link
Owner Author

jamsix commented Feb 4, 2022

@pronebird če boš imel 5 minut, vrži prosim uč :)

@pronebird
Copy link
Contributor

NAT dividend reversal was properly detected:

NAT 20211221;202000 dividend of XXX has been reversed, removing.

Screen Shot 2022-02-05 at 13 46 05

@pronebird
Copy link
Contributor

pronebird commented Feb 5, 2022

Speaking of GOLD, looks like all transactions marked as (Return on Capital) are exported with zero foreign tax; suppose those aren't subject to withholding tax.

I see bunch of negative dividends in IB's XML output, but looks like the DohDiv report is correct, seems to match the dividend statement on my account.

I haven't noticed any issues so far. I'll upload the reports to e-davki sometime soon and let you know if I see some cheesy errors they usually give me.

@jamsix
Copy link
Owner Author

jamsix commented Feb 6, 2022

It seems to work on Urban's data as well.

@jamsix jamsix merged commit fd2e957 into master Feb 6, 2022
@pronebird
Copy link
Contributor

pronebird commented Feb 6, 2022

@jamsix awesome! Thanks!

One more question, do "payment in lieu of dividend" count as losses against dividends? I never thought of that before but I had a few short positions where I had to pay dividend.

I see some reference in the source code but not sure how negative amounts are handled:

in ["Dividends", "Payment In Lieu Of Dividends"]

@jamsix
Copy link
Owner Author

jamsix commented Feb 6, 2022

@pronebird

in ["Dividends", "Payment In Lieu Of Dividends"]
is meant to handle the cases when you are on the receiving end of "payment in lieu of dividend" (i.e. when you are lending the stock to short sellers).

Current code doesn't handle "negative dividends" unless they are reversals. "negative dividends" are removed in

if round(dividend["amountEUR"], 2) <= 0:

Primary reason is technical, Doh-Div doesn't accept entries with negative values. I could not find any explanation of how if at all "payment in lieu of dividend" you need to pay when in short position affects your taxes. I think you'll need to ask FURS about that.

@pronebird
Copy link
Contributor

@jamsix right, thanks.

@jamsix jamsix deleted the div-tax-fix branch March 2, 2022 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants