On Sat, Mar 7, 2020 at 2:12 PM <shekhawa...@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.6*3 *(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




>
> Thanks!
>
> Date Transaction Description Source Fund Name Quantity Price Transaction
> Amount
> 04/11/2019 Plan Initiated TransferIn 2018 ROTH IN PLAN CONVERSION Target
> Retire 2045 Tr 262.678 $100.0 $26,267.84
> 04/11/2019 Plan Initiated TransferOut 2018 ROTH IN PLAN CONVERSION Target
> Ret 2045 Tr Sel 525.36 $50.00 $26,267.84
>
> On Friday, March 6, 2020 at 11:47:24 PM UTC-8, Martin Blais wrote:
>>
>> 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}
>>
>>
>>
>>
>>
>>
>>
>>
>> On Sat, Mar 7, 2020 at 1:58 AM <shekh...@gmail.com> wrote:
>>
>>> 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.6*5* USD}
>>>  Equity:Transfer               250.14 USD
>>>
>>> 2017-08-30 Source to Source/Fund to Fund Transfer In
>>>  Assets:401k:Roth          7.219 {34.6*5* 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!
>>>
>>>
>>> Date Transaction Description Source Fund Name Quantity Price Transaction
>>> Amount
>>> 08/30/201
>>> 7 Source to Source/Fund to Fund Transfer Out AFTER-TAX Target Ret 2045
>>> Tr Sel 7.219 $34.65 $250.14
>>> 08/30/2017 Source to Source/Fund to Fund Transfer In 2017 ROTH
>>> CONVERSION Target Ret 2045 Tr Sel 7.219 $34.65 $250.14
>>> 08/21/2017 Plan Contribution AFTER-TAX Target Ret 2045 Tr Sel 7.219
>>> $34.63 $250.00
>>>
>>> --
>>> 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 bean...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beancount/f2cdca3b-e052-4e34-95dd-117436b13290%40googlegroups.com
>>> <https://groups.google.com/d/msgid/beancount/f2cdca3b-e052-4e34-95dd-117436b13290%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/f5ce4f9f-0a17-458f-8f16-3ba690ed770e%40googlegroups.com
> <https://groups.google.com/d/msgid/beancount/f5ce4f9f-0a17-458f-8f16-3ba690ed770e%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/CAK21%2BhN3W5fa7BOaHQGdO%3Doct6_Tx7Lt9%2BNizXndOa2pJvK2nQ%40mail.gmail.com.

Reply via email to