[GNC] Price editor uses old entry

Rainer Dorsch ml at bokomoko.de
Sun Nov 7 03:46:41 EST 2021


Am Samstag, 6. November 2021, 03:51:55 CET schrieb john:
> > On Nov 5, 2021, at 1:48 PM, Rainer Dorsch <ml at bokomoko.de> wrote:
> > 
> > Am Freitag, 5. November 2021, 16:39:28 CET schrieben Sie:
> >>> On Nov 5, 2021, at 4:22 AM, Rainer Dorsch via gnucash-user
> >>> <gnucash-user at gnucash.org> wrote:
> >>> 
> >>> Hi,
> >>> 
> >>> I noticed that if the price editor has an entry in EUR and an entry in
> >>> USD, it used the EUR entry, even if the USD entry has a newer date. My
> >>> account currency is EUR.
> >>> 
> >>> Is that intended and is there an option to change this behavior?
> >>> 
> >>> I usually get the EUR entry, if I buy or sell stock or funds, which are
> >>> accounted in USD.
> >> 
> >> GnuCash always prefers a direct conversion over an indirect one
> >> regardless
> >> of the date. It's not optional. I suppose the problem arises because
> >> you're
> >> trading USD-priced stocks from an EUR-denominated brokerage account and
> >> the
> >> trades create the EUR prices. The simplest work around is to remove those
> >> EUR prices from the pricedb; it won't affect the transaction or reports
> >> using the average-cost price source. To avoid the problem going forward
> >> create an intermediary USD bank account in your brokerage account
> >> hierarchy
> >> and when recording the trade make separate splits for USD<->EUR and
> >> stock<->USD. Chris Lam is working on a stock trading assistant to make
> >> this
> >> a bit less cumbersome; we hope it will be finished in time for GnuCash 5.
> > 
> > Thanks John for your quick reply.
> > 
> > The scenario you describe matches well my use case.
> > 
> > Yes, I manually delete the EUR entries in the pricedb
> > 
> > I am looking forward to the stock trading assistant.
> > 
> > Can you tell why GnuCash always prefers a direct conversion over an
> > indirect one regardless of the date? Is this a bug or a feature :-) ?
> 
> Please remember to copy the list on all replies.

I remembered immediately and resent it also to the list.

The current implementation works well for me, just have to remember that for 
each new transaction (could also be earnings), I need to delete the "new 
price" from the price editor otherwise I lose my quote updates silently. I 
just wanted to find out if I am doing something wrong.

But I have to admit: from a pure user perspective, all the arguments given so 
far, do not convince me at all. I thought it might be useful to share it since 
there might be more users which have by far not the experience with accounting 
tools and insight in the gnucash implementation, which you have.

> I don't think it's either a bug or a feature that GnuCash prefers direct
> conversion, it's just a more efficient way to find a price given the way
> price database is arranged in a sort of tree structure of linked lists.

Frank worte:
> you will end in very complex scenarios of the graph theory:
> multiple pathes with different costs.

When I read this first, I was not sure if the comment was pure irony or if it 
was serious. Since Johns argument is similar, I assume it is serious:

The price editor manages to sort the quotes by date, so there must be already 
code which does that :-)

David wrote:
> When a transaction has an embedded price Gnucash assumes that it is a
> purchase or sale and the price is exact for that trade.   Quotes are
> generally assumed to be estimates, therefore somewhat soft like newspaper
> quotes.

I which usecase would I be more interested in an exact historic price than in 
a current estimate?

As written before, with the current implementation there are workarounds for 
me, just wanted to give my humble user perspective.

Thanks for keeping gnucash up to date and running for so many years!
Rainer

-- 
Rainer Dorsch
http://bokomoko.de/




More information about the gnucash-user mailing list