Thank you both - really appreciate your responsiveness and willingness to 
help me understand this better. I'm going to work on this some more, and I 
might come back with some additional clarifications as I work through it. 
Thank you again!

On Saturday, June 21, 2025 at 4:01:41 PM UTC-7 Red S wrote:

> I have been struggling with how to manage retirement accounts in 
> beancount. I think my problem may be primarily a conceptual one.
>
>
> IMHO, you’re spot on: truly understanding what’s going on at a conceptual 
> level will then make the syntax and the rest of it very simple. So let me 
> respond at that level.
> ​
>  
>
> Where I get particularly confused is in how to handle trades within 
> retirement accounts for stocks/funds that have gained value. In these cases 
> we havent realized income but there are trades that depend on the value 
> gained for certain stocks/funds.
>
>
> Just to clarify: income is actually realized, even within a retirement 
> account when a stock is sold. Whether or not that income is taxed is 
> immaterial do the bookkeeping itself.
> ​
>
> I've included a minimal ledger below where I have tried to create an 
> example of where I get confused. In the case of a retirement account when 
> the rebalance transaction is performed there are gains relative to the 
> average cost of STOCK1. Right now this ledger will throw an error because 
> the rebalance transaction lot selection is ambiguous. The ambiguity could 
> be resolved with FIFO or LIFO bookkeeping but this is beside the point.
>
> Say we set it to use FIFO bookkeeping. In this case the trade transaction 
> as it is currently written does not balance. In beancount where should we 
> say that $5 has come from? It isn't really income but it is necessary to 
> balance the transaction. I thought about using Equity but then this becomes 
> difficult to track the gains of the retirement account as a whole.
>
>
> Issue #1: Realizing and booking income: See above. I book these to (for 
> example) Income:Investments:Roth:Capital-Gains:Account1
>
> Issue #2: Cost basis matters, because they will determine the cash balance 
> in your account after any sale of stock. So how do you get that right? If 
> your broker uses average cost booking within retirement accounts, note that 
> Beancount does not currently support that method, automatically at least. A 
> way for you to simulate it is to book this by 1) selling all your stock, 2) 
> buying all them back at the average cost, and then 3) booking your actual 
> sale.
>
> ​
> Hope that helps.
>

-- 
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 visit 
https://groups.google.com/d/msgid/beancount/b9eab350-5dc1-468b-bf7c-1289718bb462n%40googlegroups.com.

Reply via email to