Thanks, Martin and Ben. It sounds I should go ahead with the first step
of my plan, i.e. entering all the data from the US point of view. After
that I'll consult the resources you linked and see what I can put together.

Some responses inline...

On 2021-03-04 10:31 p.m., Martin Blais wrote:
> On Thu, Mar 4, 2021 at 4:01 PM James Cook <[email protected]
> <mailto:[email protected]>> wrote:
> 
>     Hi list,
> 
>     I file taxes in both the US and Canada, for which I have to calculate
>     capital gains differently:
> 
>     a) In Canada I'm deemed to have bought most of my assets on the date I
>        moved here. There's no such fiction on my US taxes.
> 
> 
> That's fascinating. So you have two completely independent cost bases?
> Crazy.
> Say, you bought AMZN at $2000, moved to Canada when it was $2600 (say
> this was $3100 CAD at the time), an AMZN is now at $3000, you have 
> - A $1000 unrealized gain to the US
> - Say, the 3100 CAD is now worth 3120 CAD due to currency fluctuation,
> you have a (1.2 x 3000 - 3100) unrealized gain to Canada
> Now you sell 1 share of it.
> You have two separate P/L.
> 
> Is that right?

The $1000 unrealized gain in the US sounds right.

In Canada I'm not sure where you're getting 1.2 x 3000 or where the 3120
CAD comes up. I believe in Canada, to compute my unrealized gain I just
need to measure the value of AMZN in CAD at two points in time: when I
moved here and now. So to continue your example, if the value is
currently 4000 CAD, then in Canada my unrealized gain is 4000-3100=900 CAD.

So when I sell one share I'll owe tax to Canada on a 900 CAD capital
gain, and tax to the US on a 1000 USD capital gain. Fortunately this
doesn't result in double taxation, as explained in my other email just now.


>     b) When calculating capital gains, Canada taxes use average cost
>        booking; for the US I can somewhat choose the booking method.
> 
> 
> On top of that... so in the US you'll book one way, in Canada another way.
> Christ...

Yes. And don't get me started on PFICs...

>     Has anyone dealt with this using beancount? My tentative plan is below,
>     but suggestions would be welcome.
> 
>     Plan:
> 
>     * In beancount, I'll enter all data from the US point of view:
>       individual lots get bought and sold, and it should be straightforward
>       to use beancount to compute my capital gains for US taxes.
> 
> 
> Taking care of commissions by hand, always (we haven't really automated
> that problem).

Thanks, I'll keep that in mind.


>     * In Canada, I will take advantage of the fact that average cost
>       booking is more-or-less deterministic: there are (almost) no choices
>       for me to make, so it should be possible to construct the average
>       cost basis just from the beancount leger after discarding all the lot
>       information.
> 
>       So: I'll cobble together some custom code, probably involving
>       bean-query, to compute the average cost for each of my sales. I'm not
>       afraid to write a bit of code, but I'm not sure how much effort this
>       will be.
> 
> 
> I think you're  going to need a script for that.
> What you could do is write a script which iterates through your
> transactions and computes and maintains the running Canadian basis on
> the side - in a mirrored hierarchy of Inventory objects (see
> "realization" in the source code).

Thanks, I'll take a look.

-- 
James

-- 
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 on the web visit 
https://groups.google.com/d/msgid/beancount/0cce3a23-ce8f-b930-9281-8ed3b2fc643a%40falsifian.org.

Reply via email to