beangrow icon indicating copy to clipboard operation
beangrow copied to clipboard

Returns: add new option to make verification easier: --configured-accounts-only

Open redstreet opened this issue 4 years ago • 3 comments

From this doc: After building a basic config file and perhaps making a few simple changes to your ledger, compute_returns.py spits out numbers. How can the correctness of these numbers be verified?

Something that has been tripping me up a lot: an underspecified config. For example:

investment {
  currency "ABCD"
  asset_account: "Assets:Investments:ABCD"
  cash_accounts: "Assets:BankOrange"
  dividend_accounts: "Income:Diidends:ABCD"   ; <-- spelling error causes silent underspecification, and incorrect results
  dividend_accounts: "Income:Interest:ABCD"   ; <-- If I forget to include this line, postings with it are silently ignored
}

The problem is, these are all silent failures unless one examines investments/*.org in the output, of which I have tons, too many to manually inspect.

A --configured-accounts-only would work only if all accounts found in all relevant postings are specified in the config. It could further list all the unspecified accounts. Even better, it could auto-generate a new config with them with a comment for the user to complete specifying them.

redstreet avatar Jan 25 '21 09:01 redstreet

Thanks for the bug reports Red. I have to review the returns code. Planning to move to its own repo under name "beangrow".

blais avatar Jan 25 '21 14:01 blais

Good idea, and I like the name!

I'll probably file more improvement requests/bugs as I find them if that's okay. I plan to work on patches for these when I can find the time.

I've got it up and running for most of my portfolio in the past couple of weeks, and it's been very helpful in providing insights that I've wanted for a long time. Thanks again for writing and sharing this!

redstreet avatar Jan 26 '21 03:01 redstreet

Great suggestion by redstreet on "--configured-accounts-only", and in my opinion and should be default setting. (to make function less error / misspelling prone)

gety9 avatar Sep 13 '21 15:09 gety9