[GNC] How do I add stock trades?

John Ralls jralls at ceridwen.us
Sat May 2 18:11:44 EDT 2020


Not quite right. While it's correct that in GnuCash's code a currency is a commodity with a special namespace, and that an account has only one commodity member variable, it's not quite right about a non-currency commodity account not having a currency.

Remember that a split has two commodity fields, amount and value, and that transactions have a transaction currency field. It's called transaction currency because it *must* be a currency, and it's the currency in which all of the value fields are denominated.

If you begin a transaction in an account register whose commodity is non-currency GnuCash will look up the hierarchy until it finds a parent account in currency and use the first one it finds for the transaction currency. It does the same in reports, in the Accounts page, and in the summary bar when applying prices from the pricedb. That currency of the first parent account with a currency for its commodity is sometime referred to in the documentation as that child account's currency.

Regards,
John Ralls

> On May 2, 2020, at 10:16 AM, Adrien Monteleone <adrien.monteleone at lusfiber.net> wrote:
> 
> Yes, I misspoke. Thank you. Technically it is denominated in itself. And technical accuracy is no minor point, especially with accounting, and leads to clearer understanding.
> 
> Regards,
> Adrien
> 
> 
>> On May 2, 2020 w18d123, at 11:42 AM, D. <sunfish62 at yahoo.com> wrote:
>> 
>> Adrien,
>> 
>> I'm sure I have this wrong, but my understanding is that stock and currencies are both commodities, and that any given account is denominated in one. So a stock's "currency" is that commodity (that is, the ABC account is denominated in the ABC commodity). How it gets converted into a different currency (e.g., AUD) depends on the parent account.
>> 
>> That is, of course, all technicalities. The rest is correct.
>> 
>> David
> 
> 
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.



More information about the gnucash-user mailing list