[GNC] Stock "split" exchanging shares of different currencies?

Adrien Monteleone adrien.monteleone at lusfiber.net
Fri May 15 00:59:05 EDT 2020


I’m not familiar with GC for stocks and such trades, but just looking at the form of the debits/credits I would hazard the guess that:

Imbalance-CAD 800.00

should be:

Trading:CURRENCY:USD 800.00

instead.

I’m basing this guess on how I see other Trading account related transactions balanced by GC.

The fact it used Imbalance-CAD might indeed be a bug.

Does it accept you changing the Imbalance split accordingly? (the two CURRENCY splits should be opposite dr/cr of each other)

Regards,
Adrien

> On May 14, 2020 w20d135, at 10:16 PM, Jim DeLaHunt <list+gnucash at jdlh.com> 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




More information about the gnucash-user mailing list