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

Bug: Issue with Dividends? #26

Closed
tynorton opened this issue Nov 11, 2024 · 4 comments
Closed

Bug: Issue with Dividends? #26

tynorton opened this issue Nov 11, 2024 · 4 comments

Comments

@tynorton
Copy link

Problem
Seeing a very large sum that doesn't make sense in dividend view for AMAT symbol.

image

Expected
Dividend values should make sense

@tynorton
Copy link
Author

Refreshed this morning without any data changes and the shares used by the first dividend jumped up even more.
image

@hackerESQ
Copy link
Collaborator

That's wild. Can you share an export of that portfolio so I can take a look?

@hackerESQ
Copy link
Collaborator

Disregard the request for an export. Looks like you are using the hosted version as well. Seeing multiple rows in the dividends table for AMAT. Specifically for Aug 22. Investigating.

hackerESQ added a commit that referenced this issue Nov 14, 2024
@hackerESQ
Copy link
Collaborator

Hi @tynorton, I've identified the issue and it should be resolved by the referenced commit above. I am tagging a new release now. Hoping you can confirm this resolves the issue?

Even once you update, you may still have erroneous dividends. To clear the previous / erroneous dividends, you can use the following query which is what I just ran for the hosted version:

WITH RankedDividends AS (
    SELECT 
        id,
        symbol,
        date,
        dividend_amount,
        ROW_NUMBER() OVER (PARTITION BY symbol, date ORDER BY id) AS row_num
    FROM dividends
)
DELETE FROM dividends
WHERE id IN (
    SELECT id
    FROM RankedDividends
    WHERE row_num > 1
);

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

No branches or pull requests

2 participants