Cool. I can get pretty far with the existing plugin. I just have to add a posting flag when withdrawing. Attached the updated ledger using the ira_contribs plugin.
Ryan On Mon, Nov 16, 2020 at 9:46 PM Martin Blais <[email protected]> wrote: > You got it, precisely that. > If you want to get more hip (hipper?) you could modify this plugin: > > https://github.com/beancount/beancount/blob/master/beancount/plugins/ira_contribs.py > which automates something similar for IRAs, or perhaps even generalize it > so it's not IRA specific and can work in any such scenario. > This way you wouldn't even have to explicitly update those accounts. > I think the plugin can be generalized. > > > > > > On Mon, Nov 16, 2020 at 11:25 PM Ryan Mulligan <[email protected]> wrote: > >> Hi. >> >> Thanks! Just so we're all clear, I made a ledger about how I would expect >> Martin's proposal to play out and attached it. >> >> Sincerely, >> Ryan Mulligan >> >> On Mon, Nov 16, 2020 at 10:41 AM Martin Blais <[email protected]> wrote: >> >>> Yes. I was going to suggest something very similar, using a fake >>> commodity and some level of discipline. Basically, when you spend on health >>> care, decrease A / increase B some other pair of accounts, and when you >>> withdraw from the HSA, decrease B / increase C. B tracks how much $ you >>> should be allowed to withdraw from the account at any time. >>> >>> A: Expenses:Healthcare:Spent >>> B: Assets:BalanceClearedToWithdraw (choose a better name) >>> C: Expenses:Healthcare:Withdrawn >>> >>> Commodity: HSAUSD ("HSA withdrawal dollars") >>> >>> >>> >>> >>> >>> >>> On Mon, Nov 16, 2020 at 11:14 AM Aaron Lindsay <[email protected]> >>> wrote: >>> >>>> Why does the cost basis of the investment in your HSA matter in terms >>>> of tracking the amount you can withdraw? >>>> >>>> My understanding is that the amount you are allowed to withdraw is >>>> accounted using the cash value you withdraw *at the time you make the >>>> withdrawal*. If my understanding is correct, you would not need to account >>>> the cost basis of your investments in the HSA any differently than any >>>> other brokerage. The accounting of how much you are allowed to withdraw >>>> could be done independently. >>>> >>>> What if you setup two accounts like: >>>> Expenses:Medical:HSA-Qualified >>>> Expenses:Medical:HSA-Withdrawn >>>> >>>> And whenever you incurred a qualified medical expense, book it against >>>> 'Expenses:Medical:HSA-Qualified'. Then, whenever you pull money out of your >>>> HSA, move that same amount to 'HSA-Withdrawn'? It would probably be >>>> preferable to come up with some way to tie the two events together, but I >>>> haven't conceived of a simple way to do so. >>>> >>>> -Aaron >>>> >>>> On Sunday, November 15, 2020 at 6:56:26 PM UTC-5 Ryan Mulligan wrote: >>>> >>>>> Hi. >>>>> >>>>> In the USA, you can fund a Health Savings Account (HSA) with pretax >>>>> dollars that you can invest. If you incur a qualified medical expense, you >>>>> are allowed to withdraw money from the HSA account tax free. As long as >>>>> you >>>>> properly record them, you can withdraw money equal to these expenses at >>>>> any >>>>> later date tax free. >>>>> >>>>> In my particular case, almost 100% of my HSA balance is invested in a >>>>> stock market ETF. >>>>> >>>>> How would you set up accounts to track the amount you can withdraw >>>>> from the HSA account tax free? It seems like maybe it has to do with >>>>> setting the cost basis of the ETF in the HSA, but I wouldn't be surprised >>>>> if that was overly complicating things. >>>>> >>>>> Sincerely, >>>>> Ryan Mulligan >>>>> >>>> -- >>>> 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/619d082d-f719-44a5-b5da-82af5aab7083n%40googlegroups.com >>>> <https://groups.google.com/d/msgid/beancount/619d082d-f719-44a5-b5da-82af5aab7083n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >>> 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/FtV-1YJ17GA/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/beancount/CAK21%2BhPDOnjG3S9AEHpyNbj9Qpc%2BbRxJ6Gk1cfqAN3gF4wT%2Bnw%40mail.gmail.com >>> <https://groups.google.com/d/msgid/beancount/CAK21%2BhPDOnjG3S9AEHpyNbj9Qpc%2BbRxJ6Gk1cfqAN3gF4wT%2Bnw%40mail.gmail.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 [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/beancount/CA%2B56x29_pFXZ5EibEuEvd6z8%3D5o2oap-D6gXSR6%2B%2B0PTDqpA%3DQ%40mail.gmail.com >> <https://groups.google.com/d/msgid/beancount/CA%2B56x29_pFXZ5EibEuEvd6z8%3D5o2oap-D6gXSR6%2B%2B0PTDqpA%3DQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > 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/FtV-1YJ17GA/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beancount/CAK21%2BhPvMK6XFOMSaNfT9FE7OT1P1afDLbm6kqO2-GRx4VuSQQ%40mail.gmail.com > <https://groups.google.com/d/msgid/beancount/CAK21%2BhPvMK6XFOMSaNfT9FE7OT1P1afDLbm6kqO2-GRx4VuSQQ%40mail.gmail.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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CA%2B56x28qQX6ro5_5jxYp_RwJTBQJQovQyhDikkztGFuhA%3DDL%3DQ%40mail.gmail.com.
ledger.beancount
Description: Binary data
