[GNC] Lots report?

Brent McBride mcbridebt at hotmail.com
Fri Sep 2 02:18:10 EDT 2022


Hi GnuCash experts,

Does GnuCash have a report that shows the current unrealized gain/loss of open lots?

Such a report would help answer questions such as:

  *   Which lots held longer than one year have the largest unrealized gains, and would therefore be most advantageous (tax-wise) if donated to charity?
  *   Which lots would be the best candidates for tax loss/gain harvesting?

The Lots UI has almost everything needed to answer these questions: Date opened, balance, realized gains. But it is missing one key piece of info: Unrealized gains (what would the gain/loss be if the remaining balance was sold at the most recent price?).

Further, the Lots UI only shows a single commodity. The ideal would be a report that shows open lots in all accounts (perhaps configurable by date, accounts, gain/loss amount, etc). I thought maybe one of the existing reports would have this info, but haven't yet found one.

The "Investment Portfolio" report seems close. It shows accounts, but not lots within the accounts.

Any suggestions?

My background:
I recently moved ~20 years of data from Quicken to GnuCash, and am still learning the ropes.

I've written some scripts using the super-useful piecash and openpyxl tools to update/create various Excel docs from my GnuCash db. I suppose I could write a similar script to generate a Lots report in Excel.

Or if I'm in the mood for pain, I could relearn Scheme enough to create a custom GnuCash report (I briefly taught Scheme as a TA in college over 20 years ago—all I remember now is it uses lots of parentheses 🙂).

But before going either route, I want to verify with you experts that there is no preexisting report.

Thanks for your help!

-Brent


More information about the gnucash-user mailing list