How to handle transfers within 401k

116 views
Skip to first unread message

shekh...@gmail.com

unread,
Mar 7, 2020, 1:58:10 AM3/7/20
to Beancount
I have transactions like those in the below table in my 401k plan.
I am trying to import those into beancount journal. I opened asset accounts with booking method "NONE".
Can someone guide me how to create transactions for these? I tried following

2017-08-21 Plan contribution
 Assets:401k:After-tax    7.219 {34.63 USD}
 Income:Salary               250 USD

2017-08-30 Source to Source/Fund to Fund Transfer Out
 Assets:401k:After-tax    -7.219 {34.65 USD}
 Equity:Transfer               250.14 USD

2017-08-30 Source to Source/Fund to Fund Transfer In
 Assets:401k:Roth          7.219 {34.65 USD}
 Equity:Transfer               -250.14 USD

But it leaves some residual amount in the Assets:401k:After-tax account. Although this number is small here it quickly adds up. Is there a better way of doing this? Can I somehow make the Assets:401k:After-tax balance go zero after this transfer? 

Thanks a lot in advance for your help!


DateTransaction DescriptionSourceFund NameQuantityPriceTransaction Amount
08/30/201
7
Source to Source/Fund to Fund Transfer OutAFTER-TAXTarget Ret 2045 Tr Sel7.219$34.65$250.14
08/30/2017Source to Source/Fund to Fund Transfer In2017 ROTH CONVERSIONTarget Ret 2045 Tr Sel7.219$34.65$250.14
08/21/2017Plan ContributionAFTER-TAXTarget Ret 2045 Tr Sel7.219$34.63$250.00

Martin Blais

unread,
Mar 7, 2020, 2:47:24 AM3/7/20
to Beancount
plugin "beancount.plugins.auto"

option "inferred_tolerance_default" "USD:0.01"
option "inferred_tolerance_default" "TGT2045:0.0005"


2017-08-21 * "Plan contribution"
  Assets:401k:After-tax    7.219 TGT2045 {34.63 USD}
  Income:Salary               -250 USD

2017-08-30 * "Source to Source/Fund to Fund Transfer Out"
  Assets:401k:After-tax    -7.219 TGT2045 {34.63 USD} @ 34.65 USD
  Income:PnL
  Equity:Transfer               250.14 USD

2017-08-30 * "Source to Source/Fund to Fund Transfer In"
  Assets:401k:Roth          7.219 TGT2045 {34.65 USD}
  Equity:Transfer               -250.14 USD


;; Or, merging the last two:                                                        
;;                                                                                  
;; 2017-08-30 * "Source to Source/Fund to Fund Transfer Out"                        
;;   Assets:401k:After-tax    -7.219 TGT2045 {34.63 USD} @ 34.65 USD                
;;   Income:PnL                                                                    
;;   Assets:401k:Roth          7.219 TGT2045 {34.65 USD}                            







--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/f2cdca3b-e052-4e34-95dd-117436b13290%40googlegroups.com.

shekh...@gmail.com

unread,
Mar 7, 2020, 2:12:12 PM3/7/20
to Beancount
Thanks, Martin! Highly appreciate the quick response. However, I am doing this import with python code. So in this case for the middle transaction I don't know that cost was 34.63 (unless I keep track of that in program somehow). 

I encounter same problem (old accounts being left with non-zero amount) when the fund changes. For example, when all stocks are liquidated in Target Ret 2045 Tr Sel and converted to Target Ret 2045 Tr (below table)If I were to use what you are suggesting for that case also, then I will have to keep track of all the previous prices and the quantities. Is there a better way for doing this programmatically?

Thanks!

DateTransaction DescriptionSourceFund NameQuantityPriceTransaction Amount
04/11/2019Plan Initiated TransferIn2018 ROTH IN PLAN CONVERSIONTarget Retire 2045 Tr262.678$100.0$26,267.84
04/11/2019Plan Initiated TransferOut2018 ROTH IN PLAN CONVERSION
Target Ret 2045 Tr Sel
525.36$50.00$26,267.84
To unsubscribe from this group and stop receiving emails from it, send an email to bean...@googlegroups.com.

Martin Blais

unread,
Mar 7, 2020, 6:25:31 PM3/7/20
to Beancount
On Sat, Mar 7, 2020 at 2:12 PM <shekh...@gmail.com> wrote:
Thanks, Martin! Highly appreciate the quick response. However, I am doing this import with python code. So in this case for the middle transaction I don't know that cost was 34.63 (unless I keep track of that in program somehow). 

Just change the booking method,  leave it out and use {} and let beancount match it.


I encounter same problem (old accounts being left with non-zero amount) when the fund changes. For example, when all stocks are liquidated in Target Ret 2045 Tr Sel and converted to Target Ret 2045 Tr (below table)If I were to use what you are suggesting for that case also, then I will have to keep track of all the previous prices and the quantities. Is there a better way for doing this programmatically?

Use automated matching if you can (see above)
If you cannot, do it by hand and move on (you do this once/year).
You can produce the list of lots by running the bean-doctor context command over a transaction that includes the account in question, it will list all the available lots, which you can then cut-n-paste into your file


 
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/f5ce4f9f-0a17-458f-8f16-3ba690ed770e%40googlegroups.com.

shekh...@gmail.com

unread,
Mar 8, 2020, 3:32:35 PM3/8/20
to Beancount
Thanks, Martin! I manually entered the reduction of all existing lots in the previous fund. A pad directive for this discontinued fund combined with balance assertion would have been handy here. But I see it is not supported yet.

Thanks a lot for your time!
Reply all
Reply to author
Forward
0 new messages