Initializing brokerage and 401k balances

16 views
Skip to first unread message

Ratnakar Vellanki

unread,
Sep 16, 2024, 9:07:20 AMSep 16
to hledger
I recently discovered ledger and looking to initialize balances. While this is straightforward for everything else, I could not find examples to initialize brokerage and 401k balances where one holds stocks or other investments.
Could any one point me to examples.

Thanks

Simon Michael

unread,
Sep 17, 2024, 2:38:48 PMSep 17
to hle...@googlegroups.com
Welcome Ratnakar. I think it's much the same as other accounts, you transfer an opening balance from equity. But you may be needing some more details - maybe some of the examples at https://hledger.org/cookbook.html#investing-and-trading or  https://plaintextaccounting.org/Investing-and-trading will help.
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+u...@googlegroups.com.

Ratnakar Vellanki

unread,
Sep 17, 2024, 10:09:28 PMSep 17
to hledger
Simon,
Thanks for the response.
I have seen these links prior. Lets assume a person has the following balances in a brokerage account 'Brokerage1'
1.Brokerage1 - Several lots of Apple stock totaling 100 units of stock with average cost basis of $10
2. Brokerage1- shares of a mutual fund 'XXX' totaling 50 units with average cost basis of $5

What is the best way to initialize this. I do understand how to record further purchases and sales of these lots from cookbook and manual

Thanks

Simon Michael

unread,
Sep 18, 2024, 3:09:58 PMSep 18
to Ratnakar Vellanki, hle...@googlegroups.com
I would do something like

2024-01-01 opening balances
    equity:start
    ;
    ; Several lots of Apple stock totaling 100 units of stock with average cost basis of $10
    assets:brokerage1:aapl:2022-12-15             20 AAPL @ $8
    assets:brokerage1:aapl:2023-01-20             30 AAPL @ $8
    assets:brokerage1:aapl:2023-09-14             50 AAPL @ $12
    ;
    ; shares of a mutual fund 'XXX' totaling 50 units with average cost basis of $5
    assets:brokerage1:xxx                         50 XXX @ $5
    
(I think people usually track individual lots of stocks, but just average cost of mutual funds.)
Reply all
Reply to author
Forward
0 new messages