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

FYI: Vanguard qfx files: possibility of dividend reinvest transactions with unitprice set to 0. #15

Closed
savingsandloan opened this issue Dec 21, 2021 · 3 comments

Comments

@savingsandloan
Copy link
Contributor

Hi, using your vanguard ofx importer again (thanks!). Perhaps it may be an anomaly but noticed that vanguard has a possibility of generating a dividend reinvestment with a unitprice of 0, triggering the "Either price ({}) or cost ({}) must be specified".format(price_number, cost_number) in libtransactionbuilder/common.py . This is more of a heads-up as I'm not sure yet if it's better to have a special case around this or expect the user to make a minor edit to their ofx file to deal with this. This may just be a a one-off anomaly since I don't see it with other dividend reinvest transactions.

Sample of what it looks like:

<REINVEST><INVTRAN><FITID>999999999<DTTRADE>20210922160000.000[-5:EST]<DTSETTLE>20210622160000.000[-5:EST]<MEMO>DIVIDEND REINVEST</INVTRAN><SECID><UNIQUEID>999999999<UNIQUEIDTYPE>CUSIP</SECID><INCOMETYPE>DIV<TOTAL>-9.99<SUBACCTSEC>CASH<UNITS>9.99<UNITPRICE>0.0</REINVEST>

Transaction(meta={'filename':                                                   
'/home/savingsandloan/OfxDownload.qfx', 'lineno': 106},        
date=datetime.date(2021, 9, 22), flag='*', payee='DIVIDEND REINVEST',           
narration='[VMRXX] Vanguard Cash Reserves Federal Money Market Fund - Admiral   
Shares', tags=frozenset(), links=frozenset(), postings=[])

Things also appear this way on the transactions table on their website, and the csv output.

@redstreet
Copy link
Owner

redstreet commented Dec 22, 2021

Ah yes, I ran into this exactly once in the last four years. Hadn't plumbed a handler to fix this because I figured it was a bug at Vanguard's end specific to my one single instance. Since you're seeing it too, I went ahead and made that fix. Check it out above. pypi not released, so you'll have to use pip install ..

Thanks for including the sample and output, which let me locate my own qfx, and also helped debug quickly!

@savingsandloan
Copy link
Contributor Author

Seems to work, thanks!

@savingsandloan
Copy link
Contributor Author

For anyone curious, this may happen on the rare occasion where vanguard moves to a different money market account (e.g. VMMXX to VMRXX which happened around june 2021) - you may also end up with a duplicate dividend transaction (just comment it out manually)

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