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

Question about offsetting accounts #108

Open
emin63 opened this issue Jul 23, 2020 · 1 comment
Open

Question about offsetting accounts #108

emin63 opened this issue Jul 23, 2020 · 1 comment

Comments

@emin63
Copy link
Contributor

emin63 commented Jul 23, 2020

I have another question; this time it is about offsetting accounts.

Before I get to it, however, I want to say that I think l-a is awesome and so that's why I'm digging into it and finding these questions. Please let me know if I'm over-posting and I will slow down.

I'm having some trouble with the ofsetting accounts when downloading a bunch of transactions for my Vanguard account. I have various things like a dividend received or interest or a stock sale or something and I end up with the following result from l-a in my *.dat file:

YYYY/MM/DD=YYYY/MM/DD+2 SELL
    My Traditional IRA             -1000.0 "ABC" @ $1.23
    Assets:Unknown                                       $1230.00

That is I sold some stock in the account My Traditional IRA and that then gets an offsetting entry to Assets:Unknown. The thing is the stock was sold from My Traditional IRA and the cash went into My Traditional IRA. I think I want a way to tell l-a that for some kinds of transactions or files both accounts should be the same.

Arguably I'm just a noob with ledger and don't know what I'm doing. For example, usually the above SELL is followed by a transaction named MONEY FUND PURCHASE where the $1230.00 of cash gets swept into my money market fund VMFXX and offset against Assets:Unknown and so the Assets:Unknown part cancels out.

But there are a variety of cases where things don't cancel out and it gets confusing. For example, if a stock pays a cash dividend then l-a marks the offsetting account as Income:Dividends which seems cool at first. But then Vanguard sweeps the cash into VMFXX and offsets that with Assets:Unknown which makes it look like I have an "extra" $69 in my account and a deficit of $69 in Assets:Unknown. I can fix this by making the cash sweep into VMFXX come from My Traditional IRA instead of Assets:Unknown and preserve the information that I am getting Income:Dividends but it is kind of a hassle when there are a lot of transactions.

Maybe if I do this a few times then the payee matching will automatically figure it out?

Again, I'm a noob with ledger and you could argue I should go look for all the Assets:Unknown and figure out how to fix them. I could do that, but it might be simpler if l-a had a way to understand that most of the stuff going on in my Vanguard account is trading cash for stock and stock for cash and it is all in the same account.

Also, there is another case with dividend reinvestment where I get something like:

YYYY/MM/DD    DIVIDEND REINVESTMENT
    My Traditional IRA                           4.56 VMFXX @ $1.0
    Income:Interest                                       -$4.56

That actually seems correct (and a pretty cool feature of l-a). It is recognizing that I basically earned interest and so in this case the offsetting account is Income:Interest. In this particular case I think this is exactly correct. In this case, Vanguard is giving me more shares of VMFXX as a dividend and so if the offsetting account was My Traditional IRA instead of Income:Interest that would definitely cause problems.

To summarize:

  1. For the dividends paid in STOCK I think I want current behavior as anything else will probably be an error.
  2. For BUY/SELL I don't think I want the offsetting account to be Assets:Unknown but the same account (although it is not a huge deal in this case as it will cancel out on the sweep to a money market).
  3. For the dividends pain in CASH, I think I want the offsetting account to be the same account. If the offsetting account is Income:Dividends then the register report gets messed up.

What do you think? Possibly the fix is in docs and not in code. For example, the solution might be some hints on setting up payee matching before running l-a to bring in a year of transactions.

@501st-alpha1
Copy link
Contributor

Yes, the payee matching and the offsetting account are related, because ledger-autosync uses the matched payee (either the raw payee from your imported file, or the one found by finding a transaction with the matching AutosyncPayee tag) to find the offsetting account. I'm not super happy with the latter part yet, but I think some of the issues you mentioned here are mainly a case of ledger-autosync not knowing how your accounts are laid out, and can be fixed pretty easily.

That is I sold some stock in the account My Traditional IRA and that then gets an offsetting entry to Assets:Unknown. The thing is the stock was sold from My Traditional IRA and the cash went into My Traditional IRA. I think I want a way to tell l-a that for some kinds of transactions or files both accounts should be the same.

That's fair, but I don't think it's something that ledger-autosync could assume by default, because I could see someone having separate sub-accounts for cash vs. stock, e.g. My Traditional IRA:Cash vs. My Traditional IRA:Stock.

I think the easiest way to fix the example you mentioned would be to paste that transaction into your Ledgerfile, replace Assets:Unknown with My Traditional IRA, and run ledger-autosync again. Assuming the payee is sufficiently unique, that should pick up the change for any future transactions.

I think you should be able to fix most of the problems you mention here by doing that, but I'm a little confused by your summary point 3. For dividends paid in cash, does ledger-autosync output a transaction moving cash from Income:Dividends to My Traditional IRA? What would you rather have it do instead, and how does it mess up the register reports?

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