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

John Ralls jralls at ceridwen.us
Fri May 15 15:35:34 EDT 2020



> On May 15, 2020, at 11:48 AM, Jim DeLaHunt <list+gnucash at jdlh.com> wrote:
> 
> 
> On 2020-05-15 11:21, Adrien Monteleone wrote:
>> 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.) 
> 
> I formatted my original message using HTML tables for the transactions. My hope was that the table would survive in the message everyone read, making it clear which numbers were credits and which were debits. I see now that the list flattened the table out in a way that was unclear. I will resend my message with the transactions formatted differently.
> 
> However, in my examples, I believe the amounts were in the correct credit/debit columns.
> 
>> 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.
> 
> Then we agree. The fund trading splits otherwise balance, so I expect to see no currency splits. But one currency split and one offsetting imabalance split appear.
> 
> 
>> 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. 
> The prices of 10 USD / 14 CAD are simplifications I entered into the example transaction. (More precisely: the split amounts of 2000 USD / 28000 USD are also in the transaction, and matter more.) You make a good point that the price database might be involved. However, the simplified transaction is set in the future, so the only entries in the price database would be from this example transaction.
>> 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.
> 
> This transaction did not put up a transfer funds dialogue. I'm familiar with that dialogue, so I'm confident it did not appear.
> 
> I appreciate your interest in the question. I will re-send my message, with the transactions formatted in a way better able to survive the email list.

Jim,

Use plain text with a fixed-width typeface to be sure that the formatting survives the list server.

GnuCash only knows how to balance transactions in currency so there's always a currency involved, it's the one for the account that you start from or if that account has a non-currency commodity like a stock, it's the currency of the first parent account that has a currency.

For a transfer between commodity accounts you use only the currency of the account you start in. The price doesn't really matter, it's just there so that GnuCash can make sure that the transaction is balanced, but to make things look good you probably want to use the (average) purchase price of the shares. If you try to do it in basic mode GnuCash thinks you're just selling the stock and screws it up, so start in split view and create the two splits *using the same price for each*. This is starting from DLR.U:

5/15/2020     Transfer to DLR
                                   USD:ETF:DLR.U      -200         10.00                2,000.00
                                   CAD:ETF:DLR         200         10.00     2,000.00

When you commit the transaction GnuCash will add the trading account splits:
                                  Trading:FUND:DLR.U   200         10.00     2,000.00
                                  Trading:FUND:DLR    -200         10.00                2,000.00

Regards,
John Ralls




More information about the gnucash-user mailing list