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

Adrien Monteleone adrien.monteleone at lusfiber.net
Fri May 15 14:21:33 EDT 2020



> On May 15, 2020 w20d136, at 2:02 AM, Jim DeLaHunt <list+gnucash at jdlh.com> wrote:
> 
> Adrien:
> 
> > Does it accept you changing the Imbalance split accordingly?
> 
> No. When I change the account Imbalance-CAD to Trading:CURRENCY:USD in that split, when I save the transaction, GnuCash changes the amount of the Trading:CURRENCY:USD split to zero, and adds another Imbalance-CAD of 800.

Then there is something amiss with how it is seeing currency balances in those other splits. It is not seeing them as balancing.

> 
> > (the two CURRENCY splits should be opposite dr/cr of each other)
> 
> My understanding is for each currency, the splits with that currency should sum to zero. I suspect that for this stock-type transaction, GnuCash is treating all the splits as being in the same currency, even though they are not.

Yes, the splits in each single currency have balancing credits and debits. But the two Trading:CURRENCY accounts lie opposite. Here’s an example from my book, when I had an old ‘Cinco Peso’ silver coin I gave as a gift based on the price that day ($15+43895/86807:


Dr. Expenses:Gifts		$13.46
Dr. Trading:CURRENCY:XAG	0.868070
  Cr. Assets:Metals:Silver			0.868070
  Cr. Trading:CURRENCY:USD			$13.46

The Gifts and USD accounts are in USD and their credit/debit balance is zero here. The XAG and Silver account are set to XAG, and they too have balancing credits and debits.

It was difficult to tell from your original post, because the tabbing/spacing didn’t quite line up, but I’d say perhaps you have a split in the wrong column. (dr/cr, buy/sell— my example above might not line up either, so I added the Dr/Cr labels just in case.)

The proper end transaction might be one with both CAD and USD currency account splits, or else one without either. I too would think if all splits otherwise balance, there shouldn’t be any currency splits.


> 
> In my expected transaction, there are two pairs of matching splits, one for USD & DLR.U, one for CAD & DLR. Each pair of splits affects the fund account and the corresponding TRADING:FUND account, e.g. Buy Brokerage CAD:ETF:DLR, sell Trading:FUND:DLR. No currency changes hands in this transaction, so I don't see why there should be any Trading:CURRENCY splits at all.

You traded CAD-2800 for USD-2000, was the price 10/14 (USD/CAD) that day in your price db? (or since you noted, those were simplified, do the real price moves reflect the entry in the price db for that day?) If the price db entry is off, that might account for why GC is trying to balance it further. It sees you are conducting transactions using accounts with two different currencies and trying to make them balance based on a price between those currencies. If it doesn’t ask for a price, or for whatever reason uses the wrong one, you’ll get an Imbalance situation.

If you received what looked like a transfer window when entering the transaction, be sure to enter the price using the debit/credit radio button, and do not fetch the price or grab one from the db. This way, you are specifying the FX rate and GC will create a new entry in the price db.


Regards,
Adrien



More information about the gnucash-user mailing list