I just shared my fava extension that takes care of most of these. Let me know if you use fava. Detail:
> * It requires argcomplete & tabulate; you might want to mention that in the github README. Will add. > * You only show the leaf part of the account name. That's understandable but in my hierarchy I have Assets:Vanguard:Brokerage and Assets:Schwab:Brokerage and Assets:WellsFargo:Brokerage and they all just show up as "Brokerage" :-(. Off the top of my head, I don't have a great solution to this problem. Maybe have a --full-account-names flag? In the fava extension, the 'account_field' config option defaults to 'LEAF(account)' but you can set it to 'account'. > * My script has a command line arg to group results by security. I have a fair number of lots so when I run yours I get (especially today!) about two pages of results (98 lines). A bit about my workflow. My tlh script gets run daily so I just want a fairly high-level summary at that time. When I actually go to my broker to sell things is when I want the full detailed version of things. Makes sense. Reporting so it works for everyone is tricky. In this case, allowing custom reporting is also tricky. One idea: split the 'units' column into a number and currency so you can at least sort by currency, which approximates your group-by-security. What do you think? If that helps, feel free to send me a patch, else I'll get to it at some point. Other proposals welcome. > * I don't quite understand what --wash-pattern-exclude is for? Tax deferred accounts can generate wash sales. (They're even worse than normal accounts because if they generate a wash sale, the lowered basis is useless.) You're right. Removed. > * The market value get printed in scientific notation if it is large. Presumably other values do as well but I don't have $1.58433e+06 in capital losses yet to test out ;) Not a problem in the fava version, since it uses fava/beancount to render. > * Consider adding commas when printing the the Qty, Market, and Loss numbers; it makes it easier for humans to read IMHO. Fixed (in fava) > * The wash sales table formatting looks off to me. There are extra lines of -------. I guess that's a bug or something? Here's what I mean: N/A for the fava version. But I basically print one table for each security, hence the header/footer. Thanks a bunch for the feedback! On Monday, March 9, 2020 at 6:30:06 PM UTC-7, Red S wrote: > > Great feedback, thanks! Fixes for all your points coming very soon. > > Meanwhile, I'm working on a fava plugin version. I'm considering > continuing further development only on the fava version, given it's > additional effort to maintain both. Curious: do you use fava, and would you > prefer having this in fava? > > On Monday, March 9, 2020 at 5:54:55 PM UTC-7, Justus Pendleton wrote: >> >> On Sunday, March 8, 2020 at 7:54:03 AM UTC+7, Red S wrote: >>> >>> I cleaned up a tool I've been using to find opportunities to do tax loss >>> harvesting from my beancount file, and am sharing it here >>> <https://github.com/redstreet/beancount_tax_loss_harvester>. >>> >> >> Nice work! I have a similar script I've been using. Some notes based on >> trying yours: >> >> * Showing wash sales is a nice touch! >> * It requires argcomplete & tabulate; you might want to mention that in >> the github README. >> * You only show the leaf part of the account name. That's understandable >> but in my hierarchy I have Assets:Vanguard:Brokerage and >> Assets:Schwab:Brokerage and Assets:WellsFargo:Brokerage and they all just >> show up as "Brokerage" :-(. Off the top of my head, I don't have a great >> solution to this problem. Maybe have a --full-account-names flag? >> * My script has a command line arg to group results by security. I have a >> fair number of lots so when I run yours I get (especially today!) about two >> pages of results (98 lines). A bit about my workflow. My tlh script gets >> run daily so I just want a fairly high-level summary at that time. When I >> actually go to my broker to sell things is when I want the full detailed >> version of things. >> * I don't quite understand what --wash-pattern-exclude is for? Tax >> deferred accounts can generate wash sales. (They're even worse than normal >> accounts because if they generate a wash sale, the lowered basis is >> useless.) >> * The market value get printed in scientific notation if it is large. >> Presumably other values do as well but I don't have $1.58433e+06 in capital >> losses yet to test out ;) >> * Consider adding commas when printing the the Qty, Market, and Loss >> numbers; it makes it easier for humans to read IMHO. >> * The wash sales table formatting looks off to me. There are extra lines >> of -------. I guess that's a bug or something? Here's what I mean: >> >> Wash sales: recent purchase (within 30 days): >> ---------- ------------------- ---- ------ ---- >> 2020-03-02 Interactive-Brokers -500 -12955 REET >> ---------- ------------------- ---- ------ ---- >> ---------- ------------------- ----- ------- --- >> 2020-02-28 Interactive-Brokers -6182 -385117 RZV >> ---------- ------------------- ----- ------- --- >> ---------- ------------------- ---- -------- ---- >> 2020-03-02 Interactive-Brokers 500 57921.5 VIOV >> 2020-02-28 Interactive-Brokers 1000 115940 VIOV >> 2020-02-28 Interactive-Brokers 1300 150936 VIOV >> ---------- ------------------- ---- -------- ---- >> ---------- -------- ------ ------ ----- >> 2020-02-28 Rollover 19.539 512.31 VEGBX >> ---------- -------- ------ ------ ----- >> ---------- ---- ------ ------ ----- >> 2020-02-28 Roth 79.342 465.74 VWEAX >> ---------- ---- ------ ------ ----- >> >> Overall, nice job! >> > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/4c5f0845-201c-4da0-afb2-13689af59f93%40googlegroups.com.