Recording in-kind (ACATS) transfers

99 views
Skip to first unread message

Justus Pendleton

unread,
Aug 25, 2017, 11:11:34 AM8/25/17
to Beancount
In a post from last year[1] there is an example of how to record an in-kind transfer which seems straightforward enough.

2016-02-01 * "In-kind Transfer"
     Assets:BrokerageA:NYSE     -100 NYSE {10.00 USD}
     Assets:BrokerageA:NYSE     -100 NYSE {11.00 USD}
     Assets:BrokerageB:NYSE     100 NYSE {10.00 USD}
     Assets:BrokerageB:NYSE     100 NYSE {11.00 USD}

However, if you have lots of lots having to list them all (twice!) is a bit painful. Is there a shorter syntax that I haven't found?

The scenario is: imagine after doing years of monthly purchases you switch to a new brokerage. You might have 100+ lots. Ideally you just want to type something like

A related question: the date associated with each lot at BrokerageB is now the date of the transaction for the in-kind transfer. That's not strictly true under in-kind asset transfers (i.e. when calculating short vs long term capital gains); the date of the original transaction gets carried across to the new brokerage. Is there a way to maintain the date for each lot?

Cheers,
Justus


[1]: https://groups.google.com/forum/#!searchin/beancount/transfer|sort:relevance/beancount/Vh6ogvMTOHQ/MDO32hPuFgAJ

Daniel Clemente

unread,
Aug 25, 2017, 12:20:34 PM8/25/17
to bean...@googlegroups.com

> However, if you have lots of lots having to list them all (twice!) is a bit painful. Is there a shorter syntax that I haven't found?
>
> The scenario is: imagine after doing years of monthly purchases you switch to a new brokerage. You might have 100+ lots. Ideally you
> just want to type something like

When I need to move all lots, I write the transaction without the lots (so it doesn't balance), then in the web interface beancount shows me the error, and in some place it says the lots before the transaction, with all correct numbers, costs, dates, etc. Then I copy that text and paste it in my transaction, because it happens to use the same syntax. Then you need to do some editor macro to change signs. It's still a lot of lines but it's fast to do.

I prefer writing all numbers explicitly, it's stricter. But there could be a plugin to rename an account, or to move „everything“ from one to account to the other. Mmmm… maybe „pad“ can do this?


El Fri, 25 Aug 2017 08:11:34 -0700 (PDT) Justus Pendleton va escriure:
>
> [1 <multipart/alternative (7bit)>]
> [1.1 <text/plain; UTF-8 (7bit)>]
> [1.2 <text/html; UTF-8 (quoted-printable)>]
> --
> 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 post to this group, send email to bean...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/33c9ddfa-e7af-4073-9ab4-f6b2695047ce%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

Jason Chu

unread,
Aug 25, 2017, 12:49:13 PM8/25/17
to bean...@googlegroups.com
bean-doctor can give you the same sort of context as what you're seeing in the web interface.  Both the vim and emacs plugins support looking up a transaction's context (I know the vim plugin is <leader>c).  From there you can just copy and paste the lines.

When getting the context in this way, the lots also contain the acquisition date, it looks something like this:

 Assets:BrokerageB:NYSE     100 NYSE {10.00 USD, 2017-01-01}

That will totally do exactly what you want.  It is unfortunately verbose though.

Justus Pendleton

unread,
Aug 25, 2017, 7:30:06 PM8/25/17
to Beancount
On Friday, August 25, 2017 at 11:20:34 PM UTC+7, Daniel Clemente wrote:
When I need to move all lots, I write the transaction without the lots (so it doesn't balance)

How do you write this? I tried a few variants but I must be dim this morning....because I couldn't make it not balance like you suggest. If I just write

BrokerageA -100 NYSE
BrokerageB 100 NYSE

then it still balances.

Martin Blais

unread,
Aug 25, 2017, 8:19:33 PM8/25/17
to Beancount
On Fri, Aug 25, 2017 at 12:49 PM, Jason Chu <xen...@gmail.com> wrote:
bean-doctor can give you the same sort of context as what you're seeing in the web interface.  Both the vim and emacs plugins support looking up a transaction's context (I know the vim plugin is <leader>c).  From there you can just copy and paste the lines.

+1
That's what I'd do now.


 

When getting the context in this way, the lots also contain the acquisition date, it looks something like this:

 Assets:BrokerageB:NYSE     100 NYSE {10.00 USD, 2017-01-01}

That will totally do exactly what you want.  It is unfortunately verbose though.

A plugin could easily be implement which would interpret a custom directive type to do this - move everything of one currency from one account to another. If you have a lot of these, consider writing a plugin and having terse input syntax.



 

> To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscribe@googlegroups.com.

> To post to this group, send email to bean...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/33c9ddfa-e7af-4073-9ab4-f6b2695047ce%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

--
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+unsubscribe@googlegroups.com.

To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/87y3q7k4a8.wl-n142857%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.

To post to this group, send email to bean...@googlegroups.com.

Daniel Clemente

unread,
Aug 26, 2017, 11:00:24 AM8/26/17
to bean...@googlegroups.com
El Fri, 25 Aug 2017 16:30:05 -0700 (PDT) Justus Pendleton va escriure:
>
> When I need to move all lots, I write the transaction without the lots (so it doesn't balance)
>
> How do you write this? I tried a few variants but I must be dim this morning....because I couldn't make it not balance like you suggest. If
> I just write
>
> BrokerageA -100 NYSE
> BrokerageB 100 NYSE
>
> then it still balances.
>

Well, just add some error, like writing 101 NYSE. Or -100 NYSE {10.00 USD}
As other pointed out, bean-context can help too. But I like that when beancount finds an error, it provides context to help you diagnose it, in the same web interface..

Reply all
Reply to author
Forward
0 new messages