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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/d052d6c8-f34c-4d9d-a8d0-4da7bbfa272a%40googlegroups.com.
