On May 14, 2020 w20d135, at 10:16 PM, Jim DeLaHunt <[email protected]>
wrote:
I did a curious stock transaction, and I'm having trouble when I record this
transaction in GnuCash 3.10.
I bought some shares of a fund, DLR.U, which trades in US Dollar prices on the
Toronto Stock Exchange. I exchanged those shares for an identical quantity of shares
in that fund with a different name, DLR, which trades in Canadian Dollar prices on
the Toronto Stock Exchange. The purpose was to exchange US dollars for Canadian
dollars at lower cost, via the so-called Norbert's Gambit
<https://wealthsavvy.ca/norberts-gambit-questrade/>.
The basic idea of Norbert's Gambit is that if the same security trades in one
market in one currency, and also in a second market in a second currency, then
the ratio between the two prices will always be close to the market currency
exchange rate. If the prices ever diverge, this becomes an arbitrage
opportunity: buy shares on the first market in the first currency, sell the
same quantity shares on the second market for the second currency, convert
funds back to the first currency in the conventional foreign exchange market,
and profit. The net number of shares at the end of the transaction is zero. The
DLR/DLR.U fund was created to facilitate Norbert's Gambit, but the same
technique is possible with any stock which is traded in multiple liquid markets
in multiple currencies.
I had no trouble recording my purchase of DLR.U, in US dollars, in the US Dollar-denominated brokerage
account. I just followed the instructions in the GnuCash Guide, 9.5.
<https://gnucash.org/viewdoc.phtml?rev=3&lang=C&doc=guide>/Buying Shares
<https://gnucash.org/viewdoc.phtml?rev=3&lang=C&doc=guide>/.
The problem was recording the moving of the DLR.U shares to DLR, in Canadian dollars, in a
Canadian Dollar-denominated brokerage account. I started off by following the instructions
for a stock split in the GnuCash Guide, 9.10.2. /Moderately Complex Stock Merger/
<https://gnucash.org/viewdoc.phtml?rev=3&lang=C&doc=guide>. I took the example
of SBC shares turning into ATT shares plus cash, and changed it to have DLR.U shares exchange
for an equal number of DLR shares.
The transaction I entered was this (simplified a bit from my actual numbers):
*Account* *Shares* *Price* *Buy* *Sell*
Brokerage CAD:ETF:DLR 200 14.00 2,800.00
Brokerage USD:ETF:DLR.U -200 10.00
2,000.00
That is, move out 200 shares of the US-dollar DLR.UR, at the share price at
which I bought them, and bring in 200 shares of the Canadian-dollar DLR, at the
share prices they were at when I bought the DLR.U. That's pretty much what the
real-world journal transfer of shares in my brokerage account was like.
I expected that GnuCash would add in TRADING:FUND splits to balance the
quantity of DLR and DLR.U shares in the transaction. I expected to see:
*Account* *Shares* *Price* *Buy* *Sell*
Brokerage CAD:ETF:DLR 200 14.00 2,800.00
Trading:FUND:DLR.U 200
10.00
2,000.00
Brokerage USD:ETF:DLR.U -200 10.00
2,000.00
Trading:FUND:DLR -200 14.00
2,800.00
What I got was that, plus a Trading:CURRENCY:CAD split that was not motivated
by anything, and then an Imbalance-CAD split to balance the
Trading:CURRENCY:CAD split:
*Account* *Shares* *Price* *Buy* *Sell*
Brokerage CAD:ETF:DLR 200 14.00 2,800.00
Trading:FUND:DLR.U 200 10.00 2,000.00
Trading:CURRENCY:CAD
800.00
Brokerage USD:ETF:DLR.U -200 10.00
2,000.00
Trading:FUND:DLR -200 14.00
2,800
Imbalance-CAD
800
I will observe that the Trading:CURRENCY:CAD split amount is exactly the
difference between the ETF:DLR amount and the FUND:DLR.U amount, if you
disregard that one is in CAD and the other is in USD. It makes me suspicious
that GnuCash doesn't know how to handle a multi-currency stock swap transaction.
Should there be a way to record this transaction correctly in GnuCash? If so,
what do I do?
Or, is this a limitation in GnuCash? If so, I should file a bug about it.
I am running GnuCash 3.10 on macOS 10.16.5. I have trading accounts enabled.
I have not found anything about Norbert's Gambit or this kind of multi-currency
stock transaction in the documentation, the mailing list archives, the bug
database, or the wiki.
Best regards,
—Jim DeLaHunt, software engineer, Vancouver, Canada