That's a good query, red. That seems about right. I was concerned with dividends throwing things off since I would have them go to the cash account, but ensuring the transaction comes from a specific asset (via regex) seems perfect. I'll likely use this approach. Thanks for all the suggestions everyone!
On Sun, Apr 25, 2021, 2:59 PM redst...@gmail.com <redstre...@gmail.com> wrote: > > Oh I see. That makes sense. (And it's probably pro-rata as well, e.g. if >> you have 100k in contribs on an account worth 120k and you take out $1200, >> $200 would be taxable? That's what I'd expect the govt would do) >> I'd probably write a script to compute the contribution amount instead of >> tracking it explicitly >> > > In this particular case, the contributions are seen as "yours always to > withdraw any time" and therefore, is not subject to a pro-rata rule. One > can withdraw contribs clear and free, any time. > > OP: I simply run this query: > *select year,account,sum(number) where > account~"Assets:Investments:Tax-Free:.*Roth.*" AND joinstr(other_accounts) > ~ 'Assets:Z' GROUP BY year,account* > > Replace "Assets:Z" with whatever regexp describes accounts from which you > likely make contribs from (eg: 'Assets:Bank:.*'). This also helps me verify > my contributions for the year. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Beancount" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/beancount/KNih957Ar28/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > beancount+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beancount/600e1882-bf57-4829-8a8a-c735ac2e28e0n%40googlegroups.com > <https://groups.google.com/d/msgid/beancount/600e1882-bf57-4829-8a8a-c735ac2e28e0n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAO0DHEDEq15Yj14W8qdPV_Lftx%3D_tuBdEG1zLuO48ncySk%3DCFQ%40mail.gmail.com.